Yann Leflour
banner
yleflour.me
Yann Leflour
@yleflour.me
Engineer and maker at 💜
- Exploring software craftsmanship with AI @ https://pairprog.io
- Writing about it @ https://blog.pairprog.io
If you are tired as me of working with native path and fs libraries in NodeJS, you might like my
www.npmjs.com/package/@sy... NPM package.

A library to finally turn verbose JS filesystem code into elegant one-liners
July 28, 2025 at 11:00 AM
LLMs have helped me build dozens of libraries I've always wanted in Javascript

My favorite one is
www.npmjs.com/package/@sy...

The concept is simple, what if you could write clean template strings in JS ?

I've been using it for clean error formating, LLM messages, and more
July 23, 2025 at 11:00 AM
May 13, 2025 at 11:04 AM
If you're building LLM based products, check out napkin.ai

Blending pre-made templates with LLM formatting may seem like a straightforward idea but they've executed it really well with a clean UX

And if you need to fill a presentation with corporate BS, just ask it to generate the text as well 😅
March 31, 2025 at 3:06 PM
While illustrating the many disciplines connected to AI and LLMs I realized that I don't have a term for UX Designers / PMs focused on AI

Really shows how under-explored UX for AI is

I agree it's hard, but we could be doing so much more than chats
March 6, 2025 at 1:04 PM
I already have a good vision on how to achieve combination 1+2+3 and have started building a PoC

My dream would be to incorporate a real canvas as well like the one in my UI Sketcher plugin for VSCode/Replit
January 30, 2025 at 12:36 AM
@vercel.com's AI SDK is amazing to work with

But I don't get why I had to implement a middleware to add the last message from the prompt to the result if its role is "assistant"

Should be a default behavior

Anyway, if you need it it's "includeAssistantMessage" in @synstack/llm/middleware
January 6, 2025 at 10:11 PM
4️⃣ Prompt chaining

Because prompt scripting is mostly async, I disliked writing await and Promise.all to whenever working on message arrays

So, the message() param can be a Promise<Array<Message>> or an Array<Promise<Message>>, making it simpler and cleaner to build out your prompt and chain agents
January 6, 2025 at 12:45 PM
3️⃣ Template strings

I hate the base JS template string because it breaks indentation
So I wrote a separate library to fix that.

🔶 Trims text and removes extra indentation
🔶 Auto-resolves promises
🔶 Arrays to separate lines
🔶 Propagates nested indentation

github.com/pAIrprogio/...
January 6, 2025 at 12:45 PM
For v1, I wrote my own abstraction layer

While I love the chainable + immutable + string-templates + type-safety combo, writing my own adapters was too time consuming

So after using @mattpocock.com Evalite, I decided to keep my approach but switch the engine to Vercel's sdk as a peer dependency
January 6, 2025 at 12:45 PM
Got my first gaslighting from #Devin 🎉

It introduced a regression by overstepping its objective and removing some linter ignore comment

Then claimed that the issue was pre-existing

But "learned" from it

I feel like that's not going to be the only occurence
December 16, 2024 at 12:00 PM
What I liked on this session:

- It handled a failing pipeline and identified some wip code that was failing the tests
- It asked me how I wanted to deal with it
- It built knowledge from my answer
- It's a one shot task, writing the prompt myself would have been bothersome
December 14, 2024 at 12:30 PM
I've gone through this with Reforge, my own tool for AI assisted migrations

V1 used a custom templating engine and most edge case required either new development or an ugly "hack" of the engine

So for V2, I went with TS scripts with some custom syntax highlighting
December 12, 2024 at 1:21 PM
Yet the hardest challenge in JS is handling the amazing but verbose async context

And do we want "await" to appear in our prompts and mess up with the readability ?

Of course we don't, so we handle parrallel promise resolving for you
November 22, 2024 at 12:00 PM
And of course, because joining arrays manually is a drag, we do it for you

No more having to specify ".join("\n")"

Let's keep that prompt ✨beautiful✨
November 22, 2024 at 12:00 PM
Indentation is very important to preserve instructions hierarchy in prompts. But it's a mess to handle with traditional template strings

So, when you interpolate synstack/text with a multiline string, the starting indentation will be replicated accross every line
November 22, 2024 at 12:00 PM
When prompting, every token counts. But JS template strings requires content to be de-dented, which I find harder to read and maintain

So with synstack/text, trimming and de-denting is done for you.

No more messy codebase

But that's far from the only feature...
November 22, 2024 at 12:00 PM
So glad for the opportunity to talk with @fab-ber.bsky.social about this amazing journey of turning 10 months of work into 4

Thanks to @reactnativelondon.co.uk for hosting us and to @delphinebugner.bsky.social for this amazing sketch
November 18, 2024 at 4:44 PM