Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog ,
and this project adheres to Semantic Versioning .
0.1.0a3 - 2026-09-19
Added
Plugin Architecture & Hooks
- Build Lifecycle Hooks (Issue #11):
on_build_start(config)hook invoked before page compilation; plugins may raiseGolemBuildAbortErrorto abort with collect-all-errors semantics.on_build_finish(config, build_result)hook invoked after all pages are written;BuildResultwrapscompiled_files: list[Path]andoutput_dir: Path.golem.plugins.apidocmigrated from inlineBuildEnginecoupling to anon_build_starthookimpl.
on_template_contextHook (Issue #13):on_template_context(context, doc_path)hook invoked before page compilation; plugins may inject or override template context variables.- Sequential (FIFO) dispatch so downstream plugins observe mutations from upstream ones (overrides Pluggy's default LIFO order).
_invoke_asg_hookand_invoke_template_context_hookunified into_invoke_doc_hookwith shared argument filtering and error isolation.
- Document Path in Plugin ASG Hook:
doc_path: Path | None = Noneparameter onon_asg_created, passing the document's filesystem path to plugins with argument filtering for legacy plugins. GolemPluginBase Class: Common base class providing__init__, config access, and logger setup for bundled plugins.- Entry-Point Auto-Discovery: Bundled plugins registered as
golem.pluginsentry points inpyproject.toml; CLI no longer hard-codes plugin module paths.get_plugin_manager()uses entry-point discovery withconfig.pluginsas the activation authority.
Bundled Plugins
- AST-Level API Doc Macro Splicing (Issue #10):
golem.apidoc::target[opts]block macro expanded by a LarkNodeTransformeron the parsed AST, before ASG resolution. Replaces the deprecatedon_pre_parsetext-substitution path and the earlieron_asg_createdpost-resolution splice.- Syntax changed from prototype:
golem:apidoc[symbol]→golem.apidoc::target[...](colon-pair required for block-macro grammar; single-colon syntax is invalid in AsciiDoctrine — upstream tracked as webmaven/asciidoctrine#132). AsciiDocApi.get_asg_nodes(symbol, depth, heading_level_offset)renders a Python symbol to ASG block dictionaries for tree splicing.heading_level_offsetparameter adjusts embedded API doc headings relative to surrounding section depth.- Unresolvable macro targets produce a
[WARNING]admonition instead of disappearing. - Escaped macros (
\golem:apidoc[...]) unescaped to literal text without triggering expansion. - Source Links Plugin (Issue #3):
golem.plugins.source_linksinjects a per-pagesource_urltemplate context variable linking to the GitHub or GitLab blob for the current document. - Navigation Helpers Plugin (Issue #4):
golem.plugins.nav_helpersinjectsbreadcrumbs: list[dict]andnav_tree_flat: list[dict]into page template context. - Index & Glossary Plugins (Issue #5):
golem.plugins.indexaggregatesIndexTermnodes and emits an index page (activated by:page-role: index).
golem.plugins.glossaryaggregatesGlossaryTermnodes and emits a glossary page (activated by:page-role: glossary).- Two separate plugins replace the combined
IndexGlossaryPluginfrom the original design.
Typed ASG Model
- Typed ASG Node Pipeline (Issue #14):
golem.modelmodule withAsgVisitorandAsgTransformershims overasciidoctrine.nodesfor typed ASG traversal and in-place mutation.
Theme & Templates
- CSS Extraction & METAL Macro Slots (Issue #12):
- Default theme CSS extracted to a standalone
golem.cssstatic asset. - METAL macro slots in
skeleton.pt:head,header,navigation,content,table-of-contents,footer— themes can override individual layout regions without forking the skeleton.
- Default theme CSS extracted to a standalone
- Multi-View Derived Rendering Engine:
- Tabbed code containers generated at build time via
render,views,display, orformatsattributes on[source,asciidoc]blocks. - Four compilation channels:
source(raw AsciiDoc),asg(parsed ASG JSON),html(rendered HTML5),preview(live rendered component). - CSS-only tab switching using
:has()andinput[type=radio]controls with folder tab styling. - Deterministic listing identifiers (
get_listing_uid) for stable anchor targeting. - Code Listing Headers & Actions:
<header class="listing-header">with listing titles, language badges (.badge-lang), role badges (.badge-test,.badge-shared,.badge-reset), and clipboard copy button (.listing-copy-btn).
- Clipboard copying targets the active tab pane.
- UI Macro Styling (
:experimental:):- 3D keycap styling for
<kbd>with border bevel and surface background. - Button styling for
<b class="button">/.buttonwith sans-serif UI font. - Sans-serif menu hierarchy styling for
<span class="menuseq">and menu path components.
- 3D keycap styling for
- Template Caching: Mtime-invalidated
PageTemplatecaching for user templates, custom template paths, and theme skeletons.
CLI & Build
golem initScaffolding Profiles (Issue #9):--profileflag acceptinglibrary,cli,paper,blogpresets; generates a project tree withpyproject.toml,README.adoc, and starterdocs/sources.- Templates in
src/golem/templates/profiles/<profile>/with.templateextension for variable substitution (${project_name},${author},${year}). - Author defaults to
git config user.name; non-interactive mode supported. - Validation prevents mixing legacy positional arguments with
--profile.
golem checkCommand: Headless syntax and diagnostic check with--strict,-C/--directory, and-v/--verbose.- Build Diagnostics: Human-readable diagnostics in
BuildEngine.check()usingAsciiDocSyntaxErrorfile/line/column info andASGResolver.warnings. - CLI Build & Serve Enhancements:
-q/--quietflag and elapsed timing forgolem build; startup compilation status and live rebuild progress ingolem serve. - Event-Driven File Watching: Filesystem monitoring via
watchfilesorwatchdogwith sub-100ms rebuild detection and adaptive polling fallback; automatic port collision fallback (`port
1` up to 10 attempts).
Apidoc & Doctest
- Per-Section Doctest Isolation:
--split-sectionsflag for per-section test isolation across section boundaries. - Composite and Union Type Documentation: Composite and union type annotation support in
apidocformatter (losslessUnion,Optional, named returns).
Build & CI
- Server-Side Syntax Highlighting: Pygments highlighting in the build pipeline with Fired Clay styling.
- Project Hygiene & CI:
CONTRIBUTING.adoccontributor guide and AST-based CI canary test (tests/test_syntax_invariants.py). - Test Coverage:
pytest-covandcoverage[toml]added to dev dependencies. - Parallel Test Execution:
pytest-xdistadded to dev dependencies. - Documentation: Replaced
SPECIFICATION.adocwithARCHITECTURE.adoc; added plugin authoring guide, METAL slot reference, and bundled plugin documentation.
Changed
- Decoupled Views and Renderer: Eliminated circular imports between
golem.rendererandgolem.viewsviaviews_protocol.py(BodyRendererProtocol) and dependency injection. - Template Context Keys: Realigned Chameleon context keys to
title,body_html,nav_html,body_class,content_class,site_title; removed deprecated aliases. - Python Runtime Compatibility: Relaxed constraint to
requires-python = ">=3.12"for Python 3.13+ forward compatibility. - Search Paths Typing:
render_bodysearch_pathsparameter acceptsSequence[Path | str](AsciiDoctype 0.1.0a7 alignment). - Renderer & Plugin Caching:
GolemRenderer,PageCompilerskeleton, and plugin entry-point discovery cached for build and test performance. - Upstream Dependency Upgrades: Bumped minimums from 0.1.0a2 baselines: AsciiDoctrine
>=0.2.0a3→>=0.2.0a8, AsciiDoctest>=0.2.0a3→>=0.2.0a6, AsciiDoctype>=0.1.0a3→>=0.1.0a7, AsciiDocstring (new pin)>=0.1.0a11. New runtime dependencies:pygments>=2.18,filelock(replacing POSIX-onlyfcntl),griffe>=1.5.0. - Table Column Alignment:
golem.rendererpropagates column-levelhalign/valignfromcols=declarations to cell nodes. Cell-level alignment takes precedence. - Dot-Ordered List Normalization:
golem.rendererrepairs a parser quirk inasciidoctrine≥ 0.2.0a5 where the first item of a dot-ordered list is promoted to the list'stitle. Affected lists normalized in-place; fractured list blocks merged. - Default Theme Table Styling: Full AsciiDoc table semantics in
skeleton.pt:halign-*,valign-*,stripes-*,frame-*,grid-*CSS classes; styledcaption.title;colgroup colproportional-width support. - Default Theme Palette & Radii:
- Lightened default light mode background to
#faf9f5.
- Lightened default light mode background to
- Inline code corner radius
2px; action button corner radius5px. - Dev server error overlay with dark theme and aligned source code error carets.
- AsciiDoc Docstrings: Docstrings across all internal modules converted to AsciiDoc format using
asciidocstringconventions. - CSS Visual Hierarchy: Refined default theme typography, admonition pill labels, table breakouts, and per-page layout classes.
Fixed
- METAL Comment on Every Page:
skeleton.pthad a 73-line HTML comment (<!-- ... -->) that Chameleon preserves verbatim. Converted to<tal:comment tal:replace="nothing">so it is stripped at render time. - Corrupted Unicode in Dev Server:
send_head()served HTML withContent-Type: text/html(no charset), causing browsers to default to Latin-1 and corrupt UTF-8 multi-byte sequences (→,│,▼,★). Added; charset=utf-8. GlossaryPlugindict-items Collision:RuntimeError: dictionary changed size during iteration— iterate over a snapshot instead.IndexTermisinstance Check: Missingisinstanceguard inIndexPluginto skip non-IndexTermASG nodes sharing the same key.- Diagnostic Severity Preservation:
Diagnosticpositional dict initialization no longer clobbers"severity"from the input mapping. - AST Include Tracking: Replaced regex include fallback with
ast.included_filestracking. - Syntax Highlighting Callout Preservation:
GolemRenderer.highlight_code()preserves<i class="conum">callouts through Pygments and re-injects badges; removed duplicate CSS counter badges onol.colist > li. - ApiDoc Macro Protection: Delimited verbatim blocks, inline code backticks, and backslash-escaped macros (
\golem:apidoc[...]) protected from unintended expansion in bothon_asg_createdandon_pre_parsepaths. - Listing Focus Outline Scoping:
.listingblockfocus outline limited to code content and pane interactions via:has(.listing-content:focus-within, .listing-panes:focus-within). - Snippet Compilation: Multi-view snippet compilation guarded against infinite recursion, attribute injection, and template leakage; listing role identifiers sanitized.
- Python Exception Handling: Corrected five
except A, B:(Python 2) toexcept (A, B):. - Plugin Hook Isolation: Plugin exceptions isolated across all build hooks; conflict warnings added when multiple plugins modify the same value.
- Cross-Platform File Locking: Replaced POSIX-only
fcntlcache locking withfilelock. - Configuration Normalization: Unified TOML parsing across
golem.tomlandpyproject.tomlinto a shared normalizer. - Navigation & TOC Performance: Cached
discover_navigation()tree during build cycles; eliminated duplicated text in TOC anchor generation. - CLI Scaffolding and Package Info:
--versionresolved from package metadata; author name fromgit configingolem init. - Repository Cleanliness: Removed internal review artifacts from tracking; added pattern ignores to
.gitignore. - Dev Server Disconnects: Client socket disconnect exceptions downgraded to debug-level logging.
- Pygments HTML-Escaped Quotes: Derived-view assertions accept both raw (
") and HTML-escaped (") JSON output.
0.1.0a2 - 2026-08-24
Added
- Fine-Grained Cache Invalidation (Issue #1):
- AST/ASG
node_typesinventory recorded per page in.golem/cache.json. - Theme template fingerprinting and scoped cache invalidation for specific node template changes (e.g.
listing.htmlonly recompiles pages with code blocks). - New Pluggy lifecycle hook
golem_mark_stale(changed_files, cache_metadata)enabling plugins to perform selective cache invalidation. - Automated API Documentation Generation (
golem apidoc):- Built-in plugin
golem.plugins.apidocusing Griffe andasciidocstringto introspect packages and generate clean AsciiDoc API reference documentation.
- Built-in plugin
Changed
- Upgraded Dependencies:
- Upgraded
asciidoctrinedependency requirement to>=0.2.0a3(incorporating parser memoization, underscore emphasis fixes, and listing block bracket fixes). - Upgraded
asciidoctestdependency requirement to>=0.2.0a3(supporting AST section scoping and named test contexts).
Fixed
- API Reference Formatting:
- Description list multi-line formatting in apidoc output avoiding parser bloat.
- Truncation of large inline attribute constants (such as HTML templates).
- Heading level offset adjustment for docstrings opening with section headings.
0.1.0a1 - 2026-08-18
Added
- Incremental DAG Build Engine: Dependency tracking with SHA-256 content hashing in
.golem/cache.json, rebuilding only modified files and their inclusion dependents. - AsciiDoc Native Pipeline: Integration with
asciidoctrine(Lark AST parser/ASG resolver) andasciidoctype(Chameleon ZPT templates) supporting 39 standard node types. - Hierarchical Navigation Auto-Discovery: Automatic sidebar tree generation with numeric prefix stripping (
01-intro.adoc->Intro), homepage pinning, and explicitgolem.tomloverrides. - Multi-Threaded Live Dev Server: Zero-dependency
ThreadingHTTPServerwith Server-Sent Events (SSE) live browser reload under/golem-reloadand interactive compiler error overlays. - Pluggy Plugin Architecture: Lifecycle hooks for
on_pre_parse,on_ast_created,on_asg_created,on_post_render, andgolem_add_subcommands. - CLI Inspection Commands:
golem pluginsandgolem themescommands to discover, inspect, and list active and installed extensions. - Doctest Integration: Executable Python code example verification in listing blocks using
asciidoctest. - Fired Clay / Workbench Default Theme:
- Handcrafted warm paper / workbench aesthetic with automatic
prefers-color-scheme: darkmode. - Complete typography system built on Google Fonts Source family (
Source Serif 4for display/body,Source Sans 3for UI chrome,Source Code Profor monospaced code blocks). - Sub-perceptible SVG
feTurbulencepaper-grain texture data URIs. - Distinct earth-tone admonition palette (
NOTE,TIP,IMPORTANT,WARNING,CAUTION).
- Handcrafted warm paper / workbench aesthetic with automatic
- Comprehensive Documentation Suite: Complete user manual, developer guide, and technical specification rewritten as focused, topic-grouped guides.
Fixed
- TOC Scroll Anchors & Description Lists: Fixed table-of-contents slug anchors and description list node rendering.
- Navigation Pruning: Pruned empty non-AsciiDoc directories and defaulted plugin lists cleanly to avoid empty navigation nodes.