frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Markdown in /src

https://htmx.org/essays/markdown-in-src/
49•perrygeo•22h ago

Comments

ktpsns•15h ago
I generally put markdown in /docs. I don't uppercase filenames. Instead I make a documentation generator consume the files so I get a decent navigation in HTML/PDF builds.

We did put non-code into /src for a very long time: It was heredocs, multiline docs, etc. Actually my preference is to put texts close to code and only fallback to /docs/something.md at a conceptual level. Which is probably what the author proposes, given that he sees markdown as primary interface to code.

Rendello•31m ago
In terms of a documentation artifact, I love what `cargo doc` generates, but when I'm inside a source file, any plaintext solution seems so limiting.

I actually miss what I had when I was playing around in TempleOS. All text in the OS is rich (you can toggle between the markup and the standard WYSIWYG view), so comments could have formatting, colours, images (bitmap or vector, great for diagrams), hell, even (aggressively spinning) 3D models.

The thing I used most was the collapsible sections, think <details> and <summary> in HTML. Although I appreciate plain text and would hate WYSIWYG rich text in my serious source code (not to mention binary data appended to the end of the source file for images and models), I can't help but pine for those features. Being able to just draw a real diagram and being able to edit it later in seconds as opposed to making some horrid ASCII art was awesome.

throwuxiytayq•14h ago
Let’s keep the Codex session JSONL there too, why the hell not. And the debug build logs, since they’re easily greppable text useful for diagnosing recurring problems. And logs/reports from every test run - a ton of useful info there, lets you track regressions over time; would be a shame to throw it away. We could also store screenshots of every app run to have a LLM-compatible historical record of how each component changed visually. And the token provider billing documents, since we’re gonna have a lot of those once we’ll start maintaining all that.
tancop•14h ago
This sounds a lot like a low tech version of Delta from Zed. All your agent transcripts live in the same place as code.
maxk42•13h ago
Docs in VCS, yes. Docs in /src, no.
aogaili•34m ago
You missed the entire point of the post..the author is arguing docs in md are the src...
euroderf•10h ago
Developer documentation in /src, yes. Anything else, no way.

IME developers have low tolerance for interrupting flow to track down the docu that is aimed at them, so keep it near and obvious.

Naru41•10h ago
I still like the idea of source code as documentation and unit tests as documentation. While revising code written by an LLM to make it easier for humans to understand is now a controversial practice, I believe it's worthwhile in a lot of case.
skybrian•9h ago
src/md doesn’t seem all that different from docs. Maybe it changes how people search the filesystem, though?

If you split code up into multiple packages, moving the docs closer to the code might make sense. The docs for package foo could be in packages/foo/docs.

jmathai•8h ago
I have found a lot of value in the approach the post describes. I store my markdown as GitHub issues, regardless of how I come up with a detailed feature description (usually a chat session).

Before implementation, context is always cleared to ensure that the model is working only from known context (skills, AGENT.md, etc).

A major benefit of this is that agents can look up prior prompt instructions as needed or when mentioned in the current prompt it's working on.

I recently described my workflow here https://jaisenmathai.com/articles/sojourn-for-ios-was-45-one...

thatguy89•6h ago
So

1. he's describing a manual version of Spec-Kit / OpenSpec / BMAD?

2. Thinks Markdown is... somehow different from normal text or other markup languages?

3. Doesn't seem to understand that LLMs are not deterministic?

aogaili•31m ago
1. he is saying md/english is the new source code.. 2. yes - it is different that is geared towards english and very well supported by LLMs that is why it is being used in memory and instructions 3. llms are deterministic enough to translate adequately described specs into working system, the idea here is reason in md for core flow etc, and then verify with test cases

this not perfect but he is describing a real trend, so listen with open mind.

fifferfaffer•24m ago
My favourite projects typically have documentation in comments.

One example is SpiderMonkey, which uses these beautiful, long expository comments explaining not only what, but why design choices have been made. https://searchfox.org/firefox-main/source/js/public/RootingA...

If the goal is "locality", you can't get much closer than as a comment.

As far as markdown becoming "source code for agents" under the agentic paradigm, per-directory `AGENTS.md` seems more consistent, at least visually. If agent managed markdown is going to be high-churn, I'd rather it be confined to a single file. Constraints, especially for agents, are good.

tombert•20m ago
I wrote something similar a few months ago [1], though admittedly I haven't been following my own advice terribly well.

The interesting part of any program source is what it took to make that program. I view AI-generated code in the same category that I see a binary.

[1] https://blog.tombert.com/Posts/Technical/2026/04-April/Stop-...

jdzikowski•7m ago
We are close to inventing something like deep modules [1] for markdown and a whole methodology of managing docs abstraction and layers. And I'm somewhat serious. It's hard to manage one random, interconnected bag of (spaghetti) markdown. Abstract is the new interface.

1. https://softengbook.org/articles/deep-modules

themgt•1m ago
I believe that agents should not be used to generate much content in /src/md. This directory should be mainly human authored and curated.

Be sure to add a "/src/md/bikeshed.md" file to the directory, to specify the color of your project's bike shed. This is an important contribution you're making as a human. Fable is chipping in 600k lines of code too of course, but the color you picked is just great.

GPT-6 Sol and Luna

https://openai.com/index/introducing-gpt-6-sol-and-luna/
838•OfficialTurkey•3h ago•441 comments

Claude Opus 5.5

https://www.anthropic.com/claude-opus-5-5
910•km144•4h ago•674 comments

'We hacked the FBI:' Hackers say they have data on all FBI employees

https://www.404media.co/we-hacked-the-fbi-hackers-say-they-have-data-on-all-fbi-employees/
132•spenvo•3h ago•74 comments

OpenAI GPT–6 Astra breaks Enigma message that has resisted solution since 2005

https://www.cryptocellar.org/bgac/the-mvueh-break.html
491•sohkamyung•7h ago•341 comments

SAML: A Fractal of Bad Design

https://blog.trailofbits.com/2026/09/21/saml-a-fractal-of-bad-design/
85•aray07•2h ago•32 comments

Claude Opus 5.5 Intelligence, Performance and Price Analysis (Max)

https://artificialanalysis.ai/models/claude-opus-5-5
174•theanonymousone•4h ago•51 comments

No Sloptober

https://no-sloptober.com/
13•jeremiahlee•9m ago•0 comments

WordPress: Unauthenticated path traversal leading to conditional RCE

https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp
115•vntok•4h ago•59 comments

What California is learning from solar panels built over irrigation canals

https://www.kqed.org/science/2002033/heres-what-california-is-learning-from-solar-panels-built-ov...
36•Jtsummers•18h ago•23 comments

Native apps written in TypeScript and CSS

https://github.com/geastack/examples
38•arbayi•1h ago•8 comments

Unreal Agent

https://unreallabs.ai/blog/unreal-agent/
66•trollied•2h ago•43 comments

Markdown in /src

https://htmx.org/essays/markdown-in-src/
49•perrygeo•22h ago•16 comments

OpenAI is well positioned to fast-follow Jev

https://arcturus-labs.com/blog/2026/09/21/will-openai-eat-jevs-lunch/
225•JohnBerryman•6h ago•169 comments

An update on how we confirm your age group on Discord

https://discord.com/blog/safer-for-teens-same-discord-for-adults
54•meetpateltech•3h ago•9 comments

Show HN: Training a model to identify AI web content from structure alone

https://arxiv.org/abs/2609.15369
21•jochenmadler•8h ago•5 comments

Did OpenAI solve the wrong Navier-Stokes problem?

https://www.scientificamerican.com/article/did-openai-solve-the-wrong-navier-stokes-problem/
48•tomjakubowski•20h ago•20 comments

MUNI Heritage Weekend in San Francisco

https://daniel.lawrence.lu/blog/2026-09-20-muni-heritage-weekend/
131•plun9•1d ago•32 comments

Rabbit Hole: Minimum L-seams

https://www.fractalkitty.com/rabbit-hole-minimum-l-seams/
19•evakhoury•5d ago•5 comments

How did AMD Ryzen get 50% faster in two years?

https://lemire.me/blog/2026/09/18/how-did-amd-ryzen-get-50-faster-in-two-years/
131•ibobev•4d ago•27 comments

Show HN: JevBench, a reproducible benchmark for typed decision models

https://benchmarkheaven.com/jev-models
28•florianstandhar•8h ago•1 comments

A Faster Shortest Path Algorithm

https://www.vals.ai/blogs/faster-shortest-path-algorithm
26•leumon•1h ago•5 comments

16-bit Intel 8088 chip (c. 1985)

https://allpoetry.com/16-bit-Intel-8088-chip
90•rbanffy•5h ago•12 comments

The UV index is not the warm sensation of sunlight on bare skin

https://blog.asciitweezers.com/the-uv-index-is-not-the-warm-sensation-of-sunlight-on-bare-skin/
3•evakhoury•8m ago•0 comments

George Lucas Returns to Earth, Bearing Gifts

https://commonedge.org/george-lucas-returns-to-earth-bearing-gifts/
46•surprisetalk•1d ago•22 comments

The JavaScript Midlife Crisis

https://maroun-baydoun.com/blog/javascript-midlife-crisis/
14•maroun-baydoun•1h ago•5 comments

Microsoft killed FoxPro in 2007. Anyway, here's FoxPro revived

https://foxscript.org/
4•boredjohnny•14m ago•0 comments

Launch HN: Coverage Cat (YC S22) – Umbrella insurance via your personal agent

https://www.coveragecat.com/
28•botacode•3h ago•19 comments

Apple has added persistent 'ads' to iOS, and it's driving users crazy

https://www.techradar.com/phones/iphone/i-wish-apple-would-just-stop-that-crap-apple-has-added-pe...
518•MC995•6h ago•392 comments

There's a high chance of devices being sold with GrapheneOS preinstalled in 2027

https://grapheneos.social/@GrapheneOS/117299954135808210
202•Cider9986•4h ago•92 comments

Overreliance on AI contributed to missile strike on Iran school – Pentagon

https://www.bloomberg.com/graphics/2026-iran-school-attack/
235•devonnull•2h ago•125 comments