# Changelog

All notable changes to the Rustelo project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- **Website templates + generator (2026-05-28)**: Two render-mode project templates and an interactive generator, modelled on the living jpl-website site.
  - `templates/website-htmx-ssr/`, `templates/website-leptos/` — sanitized snapshots produced by a reproducible extractor (`scripts/generator/extract-template.nu`): rsync + prune + binary-safe sanitize + seed overlay; neutral `website-*` crate names; deploy identity defaults to `example.com` with a `TEMPLATE-SETUP.md` checklist. Both carry the full workspace (render profile is a build concern: features + cfg + Dockerfile + `rendering.ncl`).
  - `scripts/generator/new-site.nu` + `templates/options.ncl` + `just site::new` — interactive (or `--config`/`--yes`) wizard: picks the template via the `templates.json` registry (now carrying `render_mode`), creates the site as a framework sibling, renames crates to the project, sets domain, and stamps ontoref onboarding. Verified: a generated site's full `cargo metadata` resolves ~700 packages via `../rustelo`.
  - `scripts/generator/onto-onboard.nu` + `templates/_ontoref-skeleton/` — ontoref onboarding levels (full/minimal/none) that delegate ontology scaffolding to `ontoref setup` and write a `.rustelo.ontoref` domain pointer (reference, not embed).
  - `templates/shared/public/scripts/` — htmx-ssr integration glue promoted from jpl-website (`htmx-reinit.js`, `reinit-handlers.js`, `theme-init.js`, `highlight-utils.js`, `tag-filters.js`); the htmx library + extensions already lived under `templates/shared/htmx/`.
  - `just site::extract` — re-snapshot both templates from the living model.
- **ADR-006** — Rendering Profile Axis: HTMX-SSR Coexisting with Leptos Hydration.
- **ADR-007** — Website Templates as Reproducible Snapshots + a Generator that Delegates (snapshot model, neutral crate names, delegated ontoref onboarding, self-contained trees superseding init.rs assembly).
### Removed
- Obsolete Leptos-only templates (basic/cms/content-website/enterprise/minimal/website-full) removed from `templates/` and the registry; `just site::new` is the single scaffolding path. A reference copy of the old trees is kept under `.coder/archive/templates/`.
- **Legacy `cargo rustelo init` scaffolding removed** from `rustelo_cli`: deleted `commands/init.rs`, `templates.rs`, `commands/remote.rs`, `embedded.rs`, the `Commands::Init` variant + match arm, and the now-orphaned `generate` feature (+ optional deps tera/quote/syn/proc-macro2). The remaining `cargo rustelo` commands (build/dev/update/assets/pipeline/cross) are unchanged. Verified: `cargo check -p rustelo_cli` and `cargo clippy -p rustelo_cli --no-deps -- -D warnings` both clean.
- Framework landing (`assets/web/src/index.html`) updated to present both render modes (added a "Two Render Modes" card).

- **Architecture Self-Description (on+re)**: Integrated Ontoref protocol across framework and implementation
  - `.ontology/core.ncl` — knowledge graph with axioms (config-driven, language-agnostic, no-framework-forks), tensions, and practices (build-time codegen, custom routing, layered override, plugin architecture, auth framework, component library, page library, feature system, CSS theme system)
  - `.ontology/state.ncl` — state dimensions tracking framework-maturity (feature-complete → api-stable), plugin-system (L5 → L8), template-system (designed → operational)
  - `.ontology/gate.ncl` — four architecture membranes: routing-integrity (Closed), code-quality (Closed), configuration-driven (Low permeability), framework-boundary (Closed)
  - `.ontology/manifest.ncl` — Library manifest with Developer, Downstream, and Agent consumption modes; framework-core, templates, features, and self-description layers
  - `reflection/` — backlog, constraints, defaults, qa, schema, and operational modes (integrity-check, sync-ontology, validate-pap)
- **ADR System**: Four Architecture Decision Records in typed Nickel NCL with contract validation
  - `adr-001` — Build-Time Code Generation Pattern (`include!(concat!(env!("OUT_DIR"), ...))`)
  - `adr-002` — Custom Routing System over Leptos Router
  - `adr-003` — Layered Override System (Local > Feature > Template > Framework precedence)
  - `adr-004` — Compile-Time Plugin Architecture (Level 5) with documented Level 8 upgrade path
  - `adr-005` — Auth Framework as Hexagonal Port over Foundation (`rustelo_auth` re-exports from `rustelo_core_lib::auth`; constraints: consumers-use-port, no-auth-impl-in-framework-crate)
- **on+re migration (2026-04)**: Ontology updated to reflect current codebase state
  - `core.ncl` — artifact path `site/config/` corrected to `resources/nickel/routes/`; `auth-framework` description updated to hexagonal port; `unified-template-system` updated (CLI wired)
  - `state.ncl` — `template-system` and `framework-maturity` blockers/catalysts updated

### Fixed
- **rustelo_server**: Resolved 302 compilation errors after dependency updates
  - Removed duplicate module declarations (`auth`, `content`) in lib.rs
  - Fixed incorrect imports: `rand_rustelo_core_lib` → `rand_core`
  - Fixed incorrect imports: `rustelo_client` → `client` in email providers
  - Removed non-existent `rustelo_utils` import from version_control module
  - Corrected RBAC module paths: `rbac_config` → `config`, `rbac_service` → `service`
  - Added missing tower-http features: `cors` and `trace` in Cargo.toml
  - Implemented `Display` trait for `ResourceType` enum in rustelo_core_lib
  - Fixed clippy warnings: unused variables, redundant closures, needless borrows
  - Fixed trailing whitespace in all source files

### Changed
- Temporarily disabled RBAC module (requires refactoring)
- All workspace crates now compile with zero clippy warnings in strict mode (`-D warnings`)
- Code formatted with `cargo +nightly fmt`

## [0.1.0] - Initial Release

### Added
- Initial Rustelo framework architecture
- Modular workspace with 17 crates
- Foundation layer (core-lib, components, pages, client, server)
- Framework layer (core, auth, content, web, cli)
- Feature-based architecture with cargo features
- Language-agnostic routing system
- Configuration-driven content management
- Authentication support (JWT, OAuth2, 2FA, RBAC)
- Database abstraction (PostgreSQL, SQLite)
- Email system with multiple providers
- Cryptography utilities (AES-GCM)
- Content processing (Markdown, templating)
- Development tooling and CLI

[Unreleased]: https://github.com/yourusername/rustelo/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/yourusername/rustelo/releases/tag/v0.1.0
