Conversation
Egghead now reads and writes .org files alongside .md files. Both
formats parse into the same Record shape, share the same id and link
graph, and route through the same agent / MCP / TUI / web surfaces.
Parser & writer
- Record.Parser detects .org via #+-keywords / property drawer /
extension; parse_org keeps the body byte-faithful and extracts
metadata from #+TITLE/#+AUTHOR/#+FILETAGS/:ID:/:LINKS:/:CLASS:
- Record.OrgWriter generates skeletons for new records and
line-splices field updates on existing files
- RecordStore.create_record accepts format: :org (or "org");
update_record preserves the existing on-disk format
Rendering
- Web: Egghead.Web.OrgHTML walks the OrgParser AST so headlines
keep their stars, TODO/DONE render as styled badges, drawers
render as <dl>, source blocks keep their #+BEGIN_SRC markers
- TUI: Egghead.TUI.OrgRender mirrors the same fidelity in row/span
output; OpenTUI.Markdown.wrap_spans is now public so any renderer
producing the same span shape can reuse it
- MarkdownCache becomes format-aware via a :format key
- LiveView dispatches on record.format; CSS adds .org-* styles;
the CodeMirror editor disables markdown grammar for .org records
Agents in org-mode
- Record.Agent.from strips the file-level keyword block and the
first :PROPERTIES: drawer from the body before passing it to
the model, so an org agent's prompt is the prose part only
- Capability.parse now delegates string input to the existing
parse_grant_spec/1, so an org agent's :CAPABILITIES: drawer
accepts the same compact form `egghead agents grant` accepts:
records.read net.get{hosts=[a.example.com,b.example.com]}
- Capability.tokenize is bracket-aware and public so the agent
record projection can pre-tokenize without naïve comma split
MCP, config, defaults
- egghead_create gains a `format` field; egghead_get returns the
record's format
- Config.default_format toggles the default for new records;
documented in the Configuration guide alongside default_model
Docs
- New site/content/guides/org-mode.md (Integrations) — points at
the existing record / agent / capability surfaces and explains
the org-specific bits (frontmatter mapping, disposition
projection, what isn't implemented). Records guide gains a
one-line cross-reference
Tests (~70 new across writer round-trip, byte-stability, web HTML
fidelity, TUI rendering, capability syntax, MCP create/update, and
the org disposition projection)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
.orgfiles now parse, render, and round-trip through the same surfaces as.mdfiles — record store, agents, MCP, TUI, web.:CLASS: agentin the property drawer is recognised;:CAPABILITIES:accepts the same compact spec formegghead agents grantalready uses; the disposition is the prose body with the file-level metadata stripped before it reaches the model.default_formatconfig key chooses the extension for newly created records (default stillmarkdown). Existing files keep their on-disk format.site/content/guides/org-mode.md(Integrations); the Records guide gains a one-line cross-reference.Test plan
mix test— full suite green locally on1162 tests.orgrecord in the TUI: headlines keep their stars, TODO/DONE colored, paragraphs wrap correctly.orgrecord in the web view: drawer visible,#+BEGIN_SRCmarkers around source blocks, wikilinks navigate.orgagent (or rename theagents/borges.orgexample) and prompt it through chat oregghead_promptover MCPdefault_format: orginconfig.yml, create a record viaegghead_create, verify it lands as.org🤖 Generated with Claude Code