devia read: the memory as one self-contained page - #9
Merged
Merged
Conversation
A memory nobody reads is documentation with extra steps. `devia read` renders .devia/ into a single HTML file: sidebar in reading order -- the contract first, then the numbered files -- and links between memory files that jump inside the page instead of asking the filesystem for them. Self-contained on purpose: content embedded, no fetch, no CDN, no stylesheet to resolve. It opens by double-click, offline. The reader that prompted this one needed a running local server, because a page that fetches its own content hits CORS on file://. That is the difference between a tool people use and one they mean to set up. - .devia/reader.html by default, --out elsewhere - A snapshot, never the source: regenerate after changing the memory, and gitignore it, as this repository now does - src/lib/markdown.mjs renders the subset the memory templates actually use. Same reasoning as the YAML parser: devia writes the files it reads, and ARC-004 rules out a library Two things the tests caught while being written. The code-span placeholder was a bare number between spaces, so prose containing " 12 " became a code span. And HTML escaping ran before block parsing, so a blockquote's ">" was already ">" and no quote ever rendered. Both are regression tests now, alongside one that asserts the page contains no fetch, no http and no external stylesheet. Also fixed: --help still described sync as refreshing a vendored standard, which 0.5.0 made opt-in. Recorded as G9: devia renders the memory itself rather than leaving it to whatever each project happens to have. Version: package 0.6.0, standard unchanged at 0.1.0. Verified: 44 tests with and without FORCE_COLOR, validate clean, check P0 clear, memory validate clean. Rendered against this repository's memory (15 files, 57 kB) and KOUTIER's (accents, tables and cross-links intact).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A memory nobody reads is documentation with extra steps.
devia readrenders .devia/ into a single HTML file: sidebar in reading order -- the contract first, then the numbered files -- and links between memory files that jump inside the page instead of asking the filesystem for them.Self-contained on purpose: content embedded, no fetch, no CDN, no stylesheet to resolve. It opens by double-click, offline. The reader that prompted this one needed a running local server, because a page that fetches its own content hits CORS on file://. That is the difference between a tool people use and one they mean to set up.
Two things the tests caught while being written. The code-span placeholder was a bare number between spaces, so prose containing " 12 " became a code span. And HTML escaping ran before block parsing, so a blockquote's ">" was already ">" and no quote ever rendered. Both are regression tests now, alongside one that asserts the page contains no fetch, no http and no external stylesheet.
Also fixed: --help still described sync as refreshing a vendored standard, which 0.5.0 made opt-in.
Recorded as G9: devia renders the memory itself rather than leaving it to whatever each project happens to have.
Version: package 0.6.0, standard unchanged at 0.1.0.
Verified: 44 tests with and without FORCE_COLOR, validate clean, check P0 clear, memory validate clean. Rendered against this repository's memory (15 files, 57 kB) and KOUTIER's (accents, tables and cross-links intact).
Summary
Type
Devia compliance
.devia/layout, CLI contract):CHANGELOG.mdupdated:npm run build:index):Checks
npm run validatepassesnpm testpassesnode bin/devia.mjs check --root .passesdevia initstill produces a valid project (devia validateclean in a scratch repo)Not verified