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

标签:#ens

找到 1425 篇相关文章

AI 资讯

Your repo has whitespace problems you can't see — I built a zero-dep CLI that finds and fixes them all

Whitespace problems are the ones you can't see until they bite. A pull request where half the "changes" are trailing-space diffs. A shell script that breaks in CI because someone's editor saved it CRLF. A .env with a UTF-8 BOM that makes the first variable name mysteriously not match. A file with no final newline that turns one-line changes into two-line diffs forever. None of it shows up on screen. All of it shows up in git blame . Today, catching this takes three or four tools stitched together — and I got tired of that, so I built wssweep : one zero-config command that finds all the common whitespace smells and, with --fix , cleans them in place. $ npx wssweep src/app.js (2) 14: trailing-whitespace trailing whitespace - missing-final-newline no newline at end of file config.yml (1) - mixed-eol mixed line endings (CRLF×3, LF×1) ✖ 3 whitespace issues in 2 files (mixed-eol=1, missing-final-newline=1, trailing-whitespace=1) $ npx wssweep --fix # clean them It checks seven things: trailing whitespace, mixed CRLF/LF line endings, lone CRs, a missing final newline, extra trailing blank lines, a UTF-8 BOM, and tabs mixed with spaces in one indent. Non-zero exit on findings, so it's a CI gate. pip install wssweep gets the same tool in Python — byte-for-byte identical output and fixes. Why not editorconfig-checker / pre-commit / prettier? Because each does part of it: editorconfig-checker reports — but you have to author an .editorconfig first, and it can't fix anything. pre-commit 's trailing-whitespace / end-of-file-fixer / mixed-line-ending hooks do fix, but only inside the pre-commit framework, and they're three separate hooks. Nobody runs them ad-hoc on a fresh checkout. prettier fixes whitespace only as a side effect of reformatting all your code, and won't touch files it can't parse. dos2unix does line endings and nothing else. wssweep is the one npx / pip command, no config and no framework, that does the whole set at once and drops into any CI regardless of toolch

2026-06-20 原文 →
AI 资讯

I built an AI priority inbox for GitHub pull requests — and went BYOK instead of running my own AI backend

The problem GitHub shows your pull requests in whatever order they happened to be opened — not in the order they actually need your attention. A one-line typo fix and a PR touching authentication code get exactly the same visual weight in your inbox. Multiply that across a dozen open PRs and you spend more time deciding what to look at than actually reviewing. What I built PR Focus is a Chrome extension (Manifest V3) that sits on top of GitHub's PR pages. It combines three signals into a single priority queue: CI status — failing checks bubble up PR age — stale PRs don't get forgotten AI risk score (0–100) — weighted toward changes touching auth, database, or infra code Each PR also gets a plain-English summary generated from the actual diff (not the title someone wrote at 11pm), and you can generate an approve / request-changes draft review in one click, edit it, and send — without leaving the extension. Why BYOK instead of my own AI backend This was the decision I spent the most time on. Running my own AI backend would have meant: A server in the data path of every PR diff users review — a much bigger trust ask, especially for private repos. Either eating the AI cost myself (unsustainable as a solo dev) or marking it up into a subscription. Going BYOK (bring your own key — OpenAI, Groq, Mistral, or a local Ollama instance) flips both of those: Your GitHub token and AI key live in chrome.storage.local . There's no server of mine in the path — PR diffs only ever go to the AI provider you explicitly configure. Groq's free tier is generous enough to run the AI features for free for most individual workflows. You're paying provider cost directly, with zero markup, if you pay anything at all. How it's built Manifest V3 — required rethinking persistence patterns that worked under MV2's persistent background page; service worker lifecycle and content script injection needed more careful handling. GitHub REST + GraphQL APIs rather than DOM scraping — more upfront work, but

2026-06-20 原文 →
AI 资讯

Tracking token usage across OpenAI, Anthropic, and Gemini: every streaming gotcha I hit

OpenAI, Anthropic, and Gemini each report token usage differently, and it stops being trivia the moment you track LLM cost. I build Spanlens, an open-source LLM observability tool that sits in front of all three as a proxy and records every call with its model, latency, tokens, and cost. To do the cost part I read the token usage back out of every response, including the streaming ones. I assumed the three providers would report usage in roughly the same way. They send the same kind of data, after all: input tokens, output tokens, maybe a cached count. How different could it be. Pretty different, it turns out. Here is the whole thing in one table, then each gotcha in detail with the real parser code from the repo. Provider Where usage lives (streaming) Cache accounting Field names OpenAI final chunk, needs stream_options: { include_usage: true } prompt_tokens includes cache prompt_tokens / completion_tokens Anthropic split across message_start + message_delta input_tokens excludes cache, so add it input_tokens / output_tokens Gemini usageMetadata , two stream formats not applicable promptTokenCount / candidatesTokenCount Gotcha 1: the usage numbers live in different places in the stream For a non-streaming call this is boring. Every provider hands you a usage object on the response body and you read it. Streaming is where it gets weird, because the token counts are not in the content chunks. They show up somewhere else, and "somewhere else" is different for each provider. OpenAI puts the usage in a final chunk, after all the content, right before [DONE] . You only get it if you ask for it with stream_options: { include_usage: true } . Miss that flag and you stream the whole response and end up with no usage at all. export function parseOpenAIStreamChunk ( line : string ): Partial < ParsedUsage > | null { if ( ! line . startsWith ( ' data: ' )) return null const data = line . slice ( 6 ). trim () if ( data === ' [DONE] ' ) return null const json = JSON . parse ( data

2026-06-20 原文 →
AI 资讯

Hermes Agent Skills — Self-Evolving, Persona-Aware Skill Collection for Hermes Agent

Body: Hey everyone 👋 I've been building hermes-agent-skills — a production-grade skill collection for Hermes Agent that does three things no other skill pack does: 1. Self-Evolving Skills Skills aren't static YAML. The built-in EvolutionEngine tracks 5 health dimensions (usage frequency, success rate, user corrections, freshness, command validity), assigns a health score, and tells you which skills are rotting. Think of it as npm audit for your AI assistant's capabilities. 2. SOUL.md Persona Awareness Drop a SOUL.md in your Hermes config — naming conventions, comment density, architecture preferences, commit style — and every skill that touches code output adapts to it. hermes-skill soul generate bootstraps one in one command. The persona-aware-coding skill reads it at runtime so your agent writes code that actually looks like you wrote it. 3. CLI Toolchain hermes-skill create my-workflow # scaffold a standards-compliant SKILL.md hermes-skill validate skills/ # validate against the Agent Skills Standard hermes-skill list skills/ -f json # enumerate with health metadata hermes-skill soul generate # bootstrap a persona file What's in the box (v1.1.0): | Skill | Phase | Hermes-only Feature | |---|---|---| | requirement-analyzer | Define | Persistent memory across sessions | | spec-driven-dev | Spec | /skills chain forming workflows | | test-driven-dev | Build | delegate_task parallel test execution | | debugger-coordinator | Verify | browser + terminal + vision tri-tool | | code-quality-guardian | Review | patch auto-fix + /curator tracking | | cicd-orchestrator | Ship | cronjob scheduling + webhook triggers | | skill-curator | Evolve | Direct /curator integration | | persona-aware-coding | Identity | Native SOUL.md persona system | Why this is different: Most agent skill collections are portable but shallow — they can't use any platform's unique superpowers. These skills go deep on Hermes specifically: slash commands, delegate_task, persistent memory, vision+browser+t

2026-06-20 原文 →
AI 资讯

I Built an AI That Turns 2 Hours of Compliance Paperwork Into 3 Minutes — Full Architecture Teardown

Financial advisors have a dirty secret: they spend almost half their working hours not advising anyone. The culprit? Compliance documentation. After every client meeting, advisors must document what was discussed, what was recommended, whether those recommendations were suitable, and whether they followed FINRA and SEC rules — all in a format their CRM can ingest. A 45-minute meeting routinely generates 2 hours of paperwork. I built an open-source tool that does it in about 3 minutes. Here's exactly how — every architectural decision, every trade-off, and every line of code that matters. The Problem Is More Specific Than You Think When I started talking to advisory firms, I expected "meetings take too long" or "we need better CRM software." Instead, every compliance officer said the same thing: "We're not worried about the notes. We're worried about what's NOT in the notes." The real pain isn't documentation speed — it's the compliance gap. If a client says "I can't afford to lose this money" and the advisor recommends an aggressive growth fund, that's a FINRA 2111 suitability violation. But if the note-taker (usually the advisor, writing from memory hours later) forgets that quote? No record of the red flag. This changed my entire system design. It's not a transcription tool with formatting. It's a compliance engine that listens for mismatches. Architecture Four-stage pipeline: Audio → Transcription → Structured Extraction → Compliance Check → CRM Note (Whisper) (Claude via (Rule engine) (Formatter) OpenRouter) Stack: Python/FastAPI + React frontend + Whisper (local) + Claude via OpenRouter Two key design choices: Whisper runs locally. Advisory meetings contain PII and legally privileged information. Sending audio to third-party APIs isn't optional for most firms — it's a regulatory non-starter. Compliance engine is NOT an LLM. You can't have a probabilistic system making deterministic compliance judgments. The compliance check uses hardcoded rules against structur

2026-06-20 原文 →
AI 资讯

Why I scrub AI prose with regex, not a second LLM

Written by Stephanie Dover, Software Engineer 10+ YOE, ex GitHub, Twitch, Microsoft. Creator of Klaussy. LinkedIn · GitHub · Klaussy Desktop · Klaussy Agents TL;DR klaussy-agents is a free, MIT-licensed CLI ( pip install klaussy-agents ) that makes the prose an AI coding agent writes, PR comments, review notes, commit messages, read like a person wrote them. It works in two layers: a humanization spec baked into the agent's skills so it writes clean prose up front, and a deterministic klaussy humanize pass that scrubs the output afterward. The scrubber is rule-based regex, not an LLM, and it never touches code. There's also a part I didn't expect going in: once the AI tells are gone, what's left can read curt and run long, so the spec also handles tone (don't be rude) and length (one sentence for a reply, one to five for a review comment). Repo: github.com/steph-dove/klaussy-agents. The problem You can spot AI-written text now. Everyone can. And the place it grates most is a code review comment or a commit message, where the prose sits next to your name in a thread your teammates read. The tells are consistent. The em-dash is the biggest one. Right behind it: filler openers like "It's worth noting that…" and "I wanted to point out that…", chatbot scaffolding like "Hope this helps!" and "Let me know if you have questions!", and stacked hedges like could potentially . An agent that leaves those in your PR reads like a bot, and people notice. The obvious fix is to tell the model not to do it. Add "don't sound like AI" to the prompt and move on. That helps, inconsistently, and it regresses silently the moment you change the model or the prompt drifts. Editing every comment by hand works too, but hand-editing every comment defeats the point of having an agent write them. I wanted something I could trust without rereading. Why "just tell the model" wasn't enough The honest answer to "why not just prompt for it" is: a prompt asks, it doesn't enforce. The model tries to com

2026-06-20 原文 →
AI 资讯

Stop Wasting Tokens: I Built a File-Mapping Standard for AI-Assisted Development

Every time I started a new AI chat session, it read my entire codebase. 50 files. Thousands of tokens. On every single message. Whether I was asking about authentication, database schema, or a single UI component — the AI read everything. I'm 16 and building AI-powered products. Token costs add up fast. Context windows fill up. The AI loses track of older files. Responses slow down. So I built something to fix it. The Problem When you work with AI on large projects, you face a choice: Give the AI too much context → burns tokens, hits context limits, slower responses Give it too little → AI misses important files, makes wrong assumptions There's no middle ground — or at least there wasn't. Introducing FolioDux FolioDux is a lightweight, open-source file-mapping standard for AI-assisted development. The idea is simple: instead of giving your AI every file, you give it a compact index that tells it where everything is and what it does . The AI reads the index first, identifies the relevant files, and reads only those. One file. Two rules. Any AI. It works with Claude, ChatGPT, Gemini, Cursor, Copilot — any tool that accepts a system prompt. How It Works You add one file — FOLIODUX.md — to your project root. # FOLIODUX · TaskFlow · v1.0 · 2026-06-18 · 17 files STACK: React19+TypeScript+Vite · Express+SQLite · JWT --- ## TASKS auth/login/register → AuthView.tsx, authService.ts, server.ts create/edit task → TaskForm.tsx, taskService.ts, server.ts, types.ts list/filter tasks → TaskList.tsx, taskService.ts database → db.ts, server.ts --- ## INDEX App.tsx | fe | root: routing, auth state, layout wrapper AuthView.tsx | fe | login + register forms, error display taskService.ts | svc | CRUD tasks, local cache, optimistic updates server.ts | be | Express: all routes — auth, tasks, projects, user db.ts | be | SQLite setup, schema creation, migrations on boot types.ts | typ | Task, Project, User, Status(todo|in-progress|done) --- ## GROUPS Frontend: App.tsx · AuthView.tsx · TaskLi

2026-06-20 原文 →