emitting-output
Skill2.4k starsChanged 3 months agoApache-2.0View on GitHub
Writing or converting formatted output in ripwire's C++ source — std::print/std::format via rw::emitTo, emitRaw and formatTo, which printf specifier maps to which format spec, and how to prove a conversion moved zero bytes. Use when adding any output call site, converting a printf-family one, or touching a help/legend string.
Trending
Quiet since October.thin dataabout the whole repository
Who's talking about redhat-et/ripwire
- A Hacker News story“ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo”Hacker News · Sep 7, 2026 · 19 points
- @icecodenew.bsky.social“#TIL github.com/redhat-et/ri... > Point it at any repository and your agent gets a ranked, deterministic …”Bluesky · Sep 6, 2026 · 3 likes
- A Hacker News story“The Ripgrep of AI Context”Hacker News · Sep 8, 2026 · 2 points
- @akanoa.bsky.social“On se débarrasse enfin du code! On descend à l'AST et bientôt plus bas. Ce n'est qu'une question de temps. …”Bluesky · Sep 8, 2026 · 1 likes
- @hn100.bsky.social“ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo Discussion”Bluesky · Sep 7, 2026 · 1 likes
The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 14
Talked about on GitHub, Bluesky and Hacker News (14 times).
On GitHub · 9
- Oct 3, 2026agent-skills.github.redhat-et.ripwire: 0.6.2 → 0.6.5 — sudosubin/agents.nix0 reactions
- Oct 1, 2026agent-skills.github.redhat-et.ripwire: init at 0.6.2 — sudosubin/agents.nix0 reactions
- Sep 29, 2026ripwire: 0.6.1 -> 0.6.5 — NixOS/nixpkgs0 reactions · 1 comment
- Sep 24, 2026docs(non-cc): screenshot-lead research batch 13 (plan 0008 row 20) — qte77/ai-agents-research0 reactions
- Sep 21, 2026feat(setup): the ripwire hint names the upstream repository, in setup and both installers (D178) — dimitritholen/tasqx0 reactions · 3 comments
4 more on GitHub
- Sep 20, 2026Candidate: ripwire, a repo map for coding agents — cinjoff/firehorse0 reactions
- Sep 19, 2026ripwire: 0.5.0 -> 0.6.1 — NixOS/nixpkgs0 reactions · 4 comments
- Sep 10, 2026Static analyzer flags prompt-injection example text inside fenced code blocks as CRITICAL — runkids/skillshare0 reactions · 2 comments
- Sep 7, 2026Qualify ripwire as local code-intelligence/context source candidate — TheHalfMoon/Golam0 reactions
On Bluesky · 3
- Sep 6, 2026#TIL github.com/redhat-et/ri... > Point it at any repository and your agent gets a ranked, deterministic call graph — what to touch, what… — @icecodenew.bsky.social3 likes and reposts · 1 reply
- Sep 8, 2026On se débarrasse enfin du code! On descend à l'AST et bientôt plus bas. Ce n'est qu'une question de temps. github.com/redhat-et/ri... — @akanoa.bsky.social1 likes and repost · 1 reply
- Sep 7, 2026ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo Discussion — @hn100.bsky.social1 likes and repost
On Hacker News · 2
- Sep 7, 2026ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo19 points · 14 comments
- Sep 8, 2026The Ripgrep of AI Context2 points
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ripwire-repo-mapSkill
- ripwire-before-you-buildSkill
- ripwire-change-checkSkill
- ripwire-find-bugSkill
- ripwire-fresh-eyesSkill
- ripwire-graph-querySkill
- ripwire-handoffSkill
- ripwire-layersSkill
- ripwire-mcpSkill
- ripwire-navigateSkill
- ripwire-opt-remarksSkill
- ripwire-orientSkill
- ripwire-perf-targetSkill
- ripwire-quality-barSkill
- ripwire-reuse-firstSkill
- ripwire-routerSkill
- ripwire-security-scanSkill
- ripwire-write-testsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Every byte this tool prints feeds G4 (minified XML), the determinism contract, docs/EVALS.md's recorded numbers, and the stored captures.
- Very specific: line 19
Never add a printf-family call site (CONTRIBUTING.md §3).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Emitting output in ripwire
Every byte this tool prints feeds G4 (minified XML), the determinism contract, docs/EVALS.md's
recorded numbers, and the stored captures. Output code is therefore held to byte-exactness, not taste.
The three primitives (src/infra/emit.h)
| You have | Use | Why |
| A format string with arguments, going to a stream | rw::emitTo( stream, "…{}…", args ) | The choke point: std::print where the library has it, std::format+fputs where it does not |
| Literal text, no arguments | rw::emitRaw( stream, "…" ) | std::format_string is consteval; there is nothing to format, and huge literals do not compile |
| A caller-owned char buffer | rw::formatTo( buf, cap, "…{}…", args ) | Keeps the stack buffer — std::format into a std::string puts an allocation on hot paths (G2) |
Never add a printf-family call site (CONTRIBUTING.md §3). Do not vendor fmt — the standard library
has the feature, so a vendored copy is a G3 regression.
The specifier mapping — measured, not remembered
Proven byte-identical on this toolchain (218 checks; see the lane's fmtparity.cpp):
%s %u %d %zu %zd %lu %ld %llu %lld %i -> {}
%.*s (precision, pointer) -> {} with std::string_view( ptr, len )
%10s -> {:>10} %-11s -> {:<11} %.9s -> {:.9}
%016llx -> {:016x} %llx -> {:x} %llX -> {:X} %o -> {:o}
%.3f -> {:.3f} %6.1f -> {:6.1f} %.0f -> {:.0f}
%.6g -> {:.6g} %.3g -> {:.3g} (explicit precision only)The one unsafe mapping. A %g or %f with no precision is NOT {}. printf's %g prints six
significant digits; {} prints the shortest round-trip. 0.1+0.2 is 0.3 under %g and
0.30000000000000004 under {}. Give the format spec an explicit precision or leave the site alone.
Three traps that are invisible at the call site
%%inverts. In a printf format a literal percent is%%. Text handed toemitRawis no longer a format, so%%there prints two characters — collapse it to one%. This is how garbage reached a generateddocs/COMMANDS.md.- Braces invert the other way.
emitToneeds{{and}}for literal braces;emitRawneeds bare{and}. JSON emitters are where this bites. format_to_nis notsnprintf.snprintf( p, S, … )writes at mostS-1chars plus a NUL;format_to_n( p, S, … )writes up toSand terminates nothing. Swapping one for the other widens the buffer by a byte and drops the terminator. Userw::formatTo, whose contract is snprintf's exactly — including its return value, the would-have-written length.
Proving a conversion moved zero bytes
bash test/printffmtparitycheck.sh— per-verb SHA-256 of stdout and stderr. If it does not have a label for the verb you touched, it proves nothing about your change: add the label and pin it first.UPDATE_GOLDEN=1re-pins; the diff must be additions only. Pinning refuses any verb whose output embeds the git stamp (at="<sha>"), because such a verb cannot hold a pin at all.- A green fence is not coverage. Measure it: a coverage build showed only 25% of one batch's call
sites were ever executed by the corpus. Widen at the gaps —
--jsonis a whole second output path. - Differential-test against the pre-conversion binary on a REAL tree. Build the base commit into a
scratch worktree and diff both binaries' bytes over
src/,test/,docs/and the repo root, normalising only the git stamp. A toy fixture cannot reach a truncation branch; a real tree does it by accident. This is what caught theformat_to_nbyte, with all 40 labels green.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

