Repository navigation
Releases
v0.10.0: Three-Way Semantic Reconciliation, Full Lifecycle Sync, and the Mission-Control TUI
🚀 Highlights
Protostar v0.10.0 transitions the engine from a one-shot scaffolding tool into a complete, continuous project lifecycle manager. Spanning 261 commits and over 160 merged pull requests, this release delivers a mathematically grounded reconciliation architecture, a fully transactional execution pipeline, and a complete terminal user interface overhaul.
Where v0.9.0 established headless AST planning, v0.10.0 solves long-term project maintenance. With the introduction of protostar sync, status, and diff, projects can now continuously pull upstream template improvements, adopt new quality gates, and upgrade dependency configurations without clobbering local modifications. Backed by deterministic three-way reconciliation across TOML, YAML, JSONC, and line-based text merges, an explicit transactional rollback journal, and a keyboard-first Textual TUI, Protostar now protects your workspace across its entire lifespan.
✨ What's New
🔄 Continuous Project Lifecycle: status, diff, and sync
Protostar is no longer run-once. The new lifecycle command suite tracks your configuration against an authoritative state ledger (protostar.lock) and safely reconciles changes across three directions: the upstream template, your local edits, and the last applied baseline.
- Three-Way Semantic Reconciliation: Merges evaluate changes structurally rather than via brittle text patching. Local customizations are preserved while uncontested template updates apply cleanly.
- Format-Specific AST Adapters:
- TOML (
pyproject.toml,zensical.toml): Powered bytomlkitAST patching. Preserves comments, inline tables, and formatting while enforcing canonical section ordering and handling dotted versus nested key normalization. - YAML (
.pre-commit-config.yaml, GitHub Actions workflows,.readthedocs.yaml, Codecov): Lossless round-tripping viaruamel.yamlthat detects document indentation and style, managing keyed sequences (repositories, hooks, workflow jobs, and steps) by identity. - JSONC (
.github/renovate.json,.vscode/settings.json): Pure-Python standard library byte-range patcher that preserves comments, key ordering, and trailing commas. - In-Process Line-Based Text Merge: Custom diff3 engine implementing patience diff with a bounded
difflibfallback for unstructured files (justfile,Dockerfile) and marker-framed append regions (AGENTS.md).
- TOML (
- Content-Addressed Conflict Resolution: Conflicts are assigned deterministic SHA-256 identifiers derived from their base, local, and desired contents. Resolve them headlessly via
protostar sync --resolve <id>=<local|desired|both>or interactively in the TUI. - Declarative Retraction: When a tool or option is disabled, Protostar automatically prunes unedited generated files, removes orphaned dependencies via AST manipulation, and cleans up managed configurations without leaving orphaned hooks or broken CI pipelines.
🛡️ Transactional Execution & Automated Rollback
Scaffolding and synchronization failures no longer leave behind partially written files or corrupted virtual environments.
- The Mutation Journal (
MutationJournal): Authoritative ledger recording filesystem node states (ABSENT,REGULAR_FILE,DIRECTORY) prior to the first mutation. On runtime errors orCtrl+C, rollback restores exact original bytes and POSIX file modes in reverse insertion order. Empty directories created during the run are cleanly unlinked. - Filesystem Boundary (
TransactionAwareFS): All workspace writes, directory creations, and file removals route through a unified abstraction enforcing workspace jail validation and upfront journal recording. - Process Lifecycle Ownership (
ProcessRunner): Managed subprocesses run in isolated process groups (start_new_session=Trueon POSIX,CREATE_NEW_PROCESS_GROUPon Windows). On timeouts or interrupts, processes receive two-stage termination (SIGTERMescalated toSIGKILL) before filesystem rollback begins. - Pre-Declared Footprints: Predictable subprocess side effects are owned explicitly.
git initdeclares.git/as an owned tree, and hook managers pre-journal target script bytes before invocation. - Fatal Dependency Gating:
uv addfailures halt execution immediately and trigger automatic rollback of declared dependency files (pyproject.toml,uv.lock).
🎛️ The Mission-Control Terminal Interface (TUI)
Questionary prompts have been completely purged from the codebase. Protostar now boots a full-screen, high-performance terminal UI built on Textual.
- Mission-Control Visual Design: Styled after modern astrophysics consoles with a dark page background (
#0a0a0a), deep navy panels, unbroken hairline rules, and cyan (#22d3ee) focus accents. - Interactive Recipe Editor (
protostar init): A single unified form to configure templates, tiers, tools, Docker, and project metadata with a real-time live preview pane updating planned workspace trees and collision states in background workers. - Pre-Execution Change Review: Review file changes before disk writes occur. Inspect planned file states (
new,modified,conflict,existing,after setup), review unified diffs, inspect planned subprocess commands, and select collision strategies. - Interactive Conflict Resolver: When running
protostar syncin an interactive terminal, conflicting updates launch a side-by-side diff review allowing one-key conflict resolution (kkeep mine,utake update,bboth). - Keyboard-First Navigation: Strict keyboard ergonomics where navigation never alters state. Navigate via arrows and tabs, inspect contextual help with
?, view tool capabilities withi, save/continue withCtrl+S, and apply witha.
📦 Template Evolution: Remote Versioning, Migrations & Dual Tiers
Template management now scales cleanly across organizations, upstream updates, and distinct project maturity levels.
- Remote Ref Tracking & Upgrades (
sync --to): Remote templates track repository locators and git refs independently. Upstream releases are listed via Git smart HTTP (git-upload-pack) without subprocess overhead, enabling version pinning and upgrades viaprotostar sync --to <tag|branch|sha>. - Declarative Migrations (
[[migrations]]): Template authors can define forward migrations in TOML blueprints to rename paths, retire obsolete starter files, and rename variables across version bumps without user intervention. - Typed Template Options: Blueprints can declare typed switches and choices (
[options.<name>]) that conditionally gate files, configurations, and dependencies via declarativerequirespredicates. - Dual Tiers (Workbench vs. Production): Built-in templates now support two distinct operational tiers:
- Workbench: Lean, exploratory setup with minimal friction (Ruff, direnv, Just).
- Production: Full quality and release engineering gate (strict Mypy, Pytest with branch coverage, Prek/pre-commit hooks, CI/CD matrices, Renovate, Codecov, and release workflows).
- Curated Built-In Catalog: Added
lib, a first-class Product-tier template for reusable, typed Python packages (Hatchling backend,py.typedmarker, PEP 561 compliance). Nichedspandembeddedtemplates have been retired to external community templates. - Template Authoring Linter (
protostar check-template): Dedicated validation CLI for template authors with support for GitHub Actions workflow annotations (--output-format github).
🧭 Approachable Onboarding & Developer Ergonomics
protostar guide: On-demand command that inspects the workspace manifest and renders the exact run, test, lint, format, and documentation commands configured for the active project.- Non-Fatal Missing Tool Architecture: Missing binaries (
direnv,just) no longer abort planning or execution. They are recorded as structured data, skipped gracefully during execution, and presented alongside copyable, platform-specific package manager commands. - Existing Project Enrollment:
protostar initanalyzes existing repositories to extract Python version constraints, authors, and existing tool configurations without destructive overwrites. - Managed Community Health (
--community): Scaffolds standardized open-source governance files, includingCONTRIBUTING.md(kept in sync with active project tools via managed regions), Contributor Covenant 2.1CODE_OF_CONDUCT.md,SECURITY.md, and GitHub issue/PR templates. - Secret Scanning Guard: Template variables are validated against vendored Gitleaks rules prior to interpolation, blocking credentials from being committed to project recipes while providing explicit per-variable overrides (
--allow-secret). - Interactive Configuration Editor (
protostar config): Interactive TUI form for editing global user settings, Git identity fallbacks, and default tooling preferences. - Clean Project Ejection (
protostar eject): One-step removal ofprotostar.lockand[tool.protostar]recipe tables, releasing the workspace as an unmanaged vanilla project.
💥 Breaking Changes
- Ownership State Ledger Renamed:
.protostar.lock.tomlhas been renamed toprotostar.lock. In accordance with pre-1.0 clean-break policies, legacy checksum-based lock records from v0.9.0 are unsupported; delete existing locks to regenerate under s...
v0.9.0: The Agent Interface, Declarative Templates, and Headless Architecture
🚀 Highlights
Protostar v0.9.0 is a massive structural metamorphosis. Built on the foundation of over 100 merged pull requests, this release dismantles the monolithic execution pipeline in favor of a strictly decoupled, headless scaffolding engine.
We have completely purged hardcoded Python preset modules, transitioning to a deterministic, AST-aware TOML templating ecosystem. With the introduction of the new Machine Interface (--json), a zero-latency static hook registry, and a rigorous filesystem security sandbox, Protostar is now built to be driven by both humans and AI coding agents.
✨ What's New
📄 Declarative TOML Templates & Portable Scaffolding
Python-based PresetModule definitions are dead. Protostar now uses 100% valid, JSON Schema-validated .toml blueprints for all environment scaffolding.
- Semantic AST Merging: Replaced brittle string templating with
tomlkit-powered AST deep merging. Protostar preserves your existingpyproject.tomlcomments and formatting while deterministically sorting tables and injecting visual headers. - The
[appends]API: A generalized, extension-aware injection engine that safely injects hash-delimited marker blocks into any file (Python, Rust, HTML, JS) without corrupting syntax. - Dual-Mode Resolution: The
--fromflag now accepts remote repository URLs. Protostar natively translates web UI links for GitHub, GitLab, Bitbucket, Codeberg, and Sourcehut, securely extracting.zipand.tar.gzpayloads on the fly. - Global Alias Registry: Register your organization's remote templates in
~/.config/protostar/config.tomlunder[templates]to invoke them anywhere via--template <alias>.
🤖 The Machine & Agent Interface
Protostar is now fully navigable by automated scripts, CI pipelines, and LLM coding agents.
- Strict
stdoutPurity: Passing the position-independent--jsonflag reservesstdoutexclusively for machine-readable JSON payloads. All human-readable logging, tracebacks, and spinners are routed tostderr. - Deterministic Simulation: The new
--dry-runflag executes the pureplan()phase, returning a serializedEnvironmentManifest(in JSON mode) or a dashboard summary (in Human mode) detailing exact disk mutations and dependency resolution without touching the disk. - Schema Exports: The
export-schemasubcommand dynamically generates the JSON Schema for TOML templates, enabling real-time linting in editors like VS Code.
🧱 The Engine Bulkhead
The engine has been cleaved into two mathematically distinct phases: plan() and execute().
- Headless Planning: The
plan()phase is now mathematically pure and side-effect free. It aggregates theEnvironmentManifestdomain slices (Dependencies, Filesystem, Tooling, Tasks) without invoking subprocesses or mutating disk state. - Stateful Execution: The
SystemExecutorwas dismantled from a 1,400-line monolith into seven highly cohesive, single-responsibility modules (e.g.,security.py,toml_ast.py,workflows.py). - Interactive Decoupling: All UI components (
questionary,rich) have been strictly isolated to the CLI presentation layer, preventing the engine from hanging on unexpected interactive prompts in CI.
⚡️ Zero-Latency Static Hook Registry
The slow pre-commit autoupdate network penalty has been eliminated.
- Hook revisions are now resolved via a Fastly-backed asynchronous static JSON registry.
- Hook resolution latency has dropped from several seconds to roughly ~50ms.
- Includes a hardcoded offline fallback dictionary to guarantee zero downtime in air-gapped environments.
🛡️ Security, Error Handling & Resilience
- The Remote Trust Dialog: Executing untrusted external templates containing shell tasks triggers an informed-consent security prompt. External templates registered via your global alias registry bypass this automatically.
- Filesystem Sandbox: Implemented strict Zip/Tar Slip protection during archive extraction and a Path Jail guardrail preventing templates from writing outside the target workspace.
- POSIX-Compliant Telemetry: Domain exceptions (
ConfigurationError,NetworkFetchError, etc.) now map directly to standard UNIX exit codes (e.g.,EX_CONFIG/78,EX_TEMPFAIL/75) and emit deep-linked documentation URLs in the terminal. - Graceful Interrupts: Hitting
Ctrl+Cmid-execution now raises aPartialExecutionAbortedErrorthat renders a precise ledger of which files were modified before the interrupt occurred.
🧰 Expanded Tooling Matrix
The scaffolding matrix has been drastically upgraded for modern Python development.
rumdlDefault: Replaced Node-basedmarkdownlint-cli2withrumdlas the default, hyper-fast Rust-based Markdown linter.- Docker Multi-Stage: The
--dockerflag now generates a hardened, multi-stageDockerfiletailored to the project type (API, Typer CLI, or package) alongside.dockerignore. - New Integrations: Added native scaffolding modules for
commitizen, Astral'sty, Meta'spyrefly,renovate,codecov, andreadthedocs. - Local Toolchain Hooks: Python-based pre-commit hooks (
ruff,mypy) now execute locally viauv run repo: local, eliminating redundant virtual environments and version drift.
💥 Breaking Changes
- Python Presets are Dead: The legacy
--astro,--api, and--clipreset flags have been removed. Use--template <name>instead. - Force Flags Split: The ambiguous
--forceflag has been removed. You must now explicitly declare intent using--force-mergeor--force-replace. - Global Config Updates: The
active_presetsarray is no longer valid inconfig.tomlorprotostar.toml. - Variable Interpolation Syntax: Load-time configuration variables now use the
<% VAR %>syntax instead of{{ VAR }}to disambiguate from late-binding execution tokens. - Python Baseline: The default target Python version has been bumped to
3.13.
v0.8.0: Python Singularity, Documentation Overhaul, and Engine Hardening
🚀 Highlights
Protostar 0.8.0 is the largest architectural release to date. The project has been streamlined into a dedicated Python environment scaffolding tool, with a cleaner public API, significantly improved documentation, and a more robust execution engine.
This release removes legacy complexity, strengthens reliability, and lays the foundation for faster iteration going forward.
✨ What's New
🐍 Python-first architecture
Protostar is now exclusively focused on Python project initialization.
This release removes the legacy multi-language scaffolding system and the generate command, allowing the CLI and execution engine to become substantially simpler, faster, and easier to maintain.
Highlights include:
- Removed the
generatesubsystem entirely - Eliminated language selection and routing logic
- Simplified the interactive wizard
- Reduced CLI complexity and startup overhead
- Cleaner configuration model with fewer obsolete options
📚 Documentation overhaul
Documentation has been rewritten to reflect Protostar's new direction.
Improvements include:
- Comprehensive README refresh
- Python-focused documentation throughout
- Updated contributor onboarding
- Migration from
maketojust - Stable ReadTheDocs links
- Improved branding and deterministic SVG rendering
⚙️ Engine hardening
Several internal improvements make Protostar more reliable and easier to extend.
Highlights include:
- Public package API with exported extension interfaces
- Centralized package version handling
- Expanded automated test coverage
- Restored Codecov quality gates
- Improved Python 3.14 compatibility
- Refactored Homebrew release automation into typed Python
💥 Breaking Changes
This release completes Protostar's transition into a dedicated Python scaffolding tool.
The following have been removed:
protostar generate- Language selection (
--python,--rust,--node,--cpp,--latex) - Local
.protostar.tomlconfiguration - Non-Python generators and related documentation
v0.7.0: Zensical Docs, Engine Hardening, and Astro Expansion
Summary
This release introduces a massive architectural shift to Protostar's documentation pipeline, moving deep-dives to a dedicated ReadTheDocs deployment. Under the hood, the core execution engine gets heavily hardened with task-level subprocess timeouts, bulletproof SIGINT handling, and strict tooling boundaries. For the computational crowd, the Astro preset gets a serious "batteries-included" upgrade.
New Official Documentation
Head over to the Official Documentation for:
- Command Reference: Full flags and capabilities for
initandgenerate. - Domain Presets: Matrices for Scientific, Astrophysics, ML, DSP, and Embedded workflows.
- Configuration & Shell Autocomplete: Setting up global defaults, CLI autocompletion, and advanced AST overrides.
- Architecture Mechanics: Deep dives into the Orchestrator, Executor, and Manifest lifecycle.
Core Engine & CLI Mechanics
- Task-Level Timeouts: Subprocess execution is no longer unbounded. Heavy network operations (like
uvorpipdependency resolution) are now capped at a 600s timeout, preventing the orchestrator from hanging indefinitely on dropped connections. - Context-Aware Status Rendering: The TUI now surfaces intelligent, domain-specific status descriptions during the realization phase (e.g., "Installing pre-commit git hooks") instead of dumping raw subprocess arrays to the terminal.
- Strict Tooling Boundaries: Deprecated the hardcoded Python requirement in favor of dynamic language constraints. The CLI and interactive wizard will now actively intercept and block you from scaffolding mismatched toolchains (like trying to drop Ruff onto a Rust-only workspace).
- SIGINT & TTY Routing: Trapped
Ctrl+Cto fail silently and exit cleanly with POSIX code 130, stopping the CLI from spilling raw stack traces or theargparsehelp manual upon cancellation. Additionally, hoisted the--forceflag logic above the TTY environment check, allowing headless scripts to overwrite collisions without hanging on interactive prompts. - AST Merging & Determinism: Squashed a
tomlkitbug that stacked triple-newlines during deep-merge overwrites, localized IDE interpreter settings strictly to Python module generation, and forced.gitignorepayload sorting to eliminate arbitrary diff churn.
Astrophysics & Scientific Stack
- Expanded Astro Preset (
-a): The astrophysics footprint now natively bundles the standard scientific computing matrix (numpy,scipy,pandas,matplotlib) alongsideastropy, meaning you no longer need to stack the-sand-aflags. - Automated Notebook Versioning: Automatically installs and configures
nbdime(nbdime config-git --enable) during post-install tasks, permanently resolving the Jupyter JSON diff nightmare for research repositories.
Documentation & Assets
- Zensical & ReadTheDocs Migration: Evicted the bloated deep-dive documentation from the
README.mdand migrated to a customzensical(Material derivative) framework on ReadTheDocs. Includes a custom Slate dark-mode UI with proper CSS specificity flattening. - Automated SVG Fixtures: The CLI help matrices are now generated programmatically via
rich.consoleinto deterministic SVGs. This process is fully typed, sandboxed, and enforced in CI—if the CLI arguments change but the docs aren't updated, the build fails. - VHS Integration & Static Branding: Swapped the computationally expensive animated Lorenz attractor scripts for clean, lightweight static SVGs, and introduced
vhstapes for programmatic TUI screen recording.
Build System & CI
- Justfile Optimization: Replaced the legacy
Makefilewith ajustfile. All execution targets now trigger a silentuv sync --all-extras --devpre-flight check, guaranteeing sub-millisecond dependency determinism. - Telemetry Parsing: Extracted the inline YAML benchmark script into
scripts/parse_benchmarks.py. Hyperfine results for both headless and interactive paths are now properly routed to the GitHub Pages performance dashboard. - Dependency Trimming: Removed redundant configurations in
pyproject.tomland explicitly excluded internal scripts/assets from the Hatchsdisttarget to keep the PyPI package lean.
v0.6.0: The Architecture & Execution Hardening Update
Summary
This release focuses on deep architectural decoupling, bulletproofing the execution phase, and ensuring the configuration state remains predictable and firmly tracked. We’ve rebuilt the core orchestration engine to cleanly separate state manifestation from disk I/O, hardened the TOML parsers against edge-case mutations, and shifted our benchmarking to capture true out-of-process cold starts.
🏗️ Core Architecture & DAG Lifecycles
- State vs. Execution Split: The monolithic orchestrator has been decoupled.
Orchestratornow acts strictly as a state machine for manifest aggregation, while the newSystemExecutorhandles all highly-volatile filesystem I/O and subprocess execution. - DAG Execution Ordering Fix: Resolved a critical execution ordering bug by introducing a
post_install_tasksqueue. Virtual environment binaries (likepre-commitanddirenv) are now strictly guaranteed to execute after the dependency resolution phase completes. - Dynamic CLI Routing: Extracted abstraction leaks by pushing iteration logic into the
PresetModuleandBootstrapModulebase classes. Tooling modules and presets now evaluate dynamically, meaning future language additions require zero modifications to the core parser.
🛡️ Configuration & Injection Safety
- Runtime Type Validation: The configuration parser now uses
typing.get_type_hintsto gracefully reject malformed TOML inputs and fall back to safe defaults, entirely avoiding the import overhead of Pydantic. - Strict Scope Boundaries: Hard-enforced the partition between global initializations and local workspace generation. The orchestrator now actively strips
[env],[presets], and[dev]blocks from local.protostar.tomlfiles to prevent configuration drift. - Deterministic AST Merges: TOML injections now utilize structural parity guards (e.g., ensuring a
Tableonly merges with aTable), and plain-text injections are protected by MD5 payload hashes to ensure idempotency even if users modify the generated logic. - O(1) Config Loading: Implemented an in-memory class-level cache to eliminate repeated disk I/O when loading configurations across the CLI lifecycle.
📉 Graceful Degradation & Telemetry
- Partial Success States: If a package manager (
uvorpip) encounters a fatal error like a network timeout, the orchestrator no longer crashes. It degrades gracefully, trapping thestderrpayload and surfacing aPARTIAL SUCCESSwarning, preserving the 99% of the environment that was successfully scaffolded. - Rich OSC 8 Hyperlinks: The crash reporter UI has been upgraded. Massive URL-encoded GitHub issue payloads are now hidden behind clean, clickable terminal hyperlinks.
- Subprocess Security:
$EDITORenvironment variables are now safely tokenized usingshlex.split(), preventingFileNotFoundErrorcrashes for complex arguments (e.g.,export EDITOR="code --wait").
🧪 Benchmarking & Test Infrastructure
- True Cold-Start Benchmarks: Migrated from
pytest-benchmarktohyperfine. Latency benchmarking now executes entirely out-of-process to capture true Python boot times and CLI initialization overhead, natively integrated into our CI pipeline to gate regressions. - 95% Test Coverage: Completely overhauled the test suite to execute true E2E subprocesses within
tmp_pathsandboxes. XDG base directories are now actively isolated during testing to prevent host-machine configuration leakage. - Strict Local Enforcement: Expanded Ruff linting rules (
RUF,N,RET) and configured a hardfail_under = 90coverage floor for local execution, ensuring high standards before code ever hits the cloud.
v0.5.0: AST-Aware Configuration, Collision Safety, & Rich CLI Overhaul
Summary
This release fundamentally rebuilds Protostar's state evaluation engine to guarantee safe, idempotent execution—especially critical when scaffolding tooling into existing Python data analysis pipelines or complex project topologies. By migrating to a fully AST-aware TOML pipeline and introducing interactive collision mitigation, v0.5.0 ensures existing scripts and workspace configurations remain uncorrupted. The CLI has also been entirely redesigned with rich, utilizing lazy-evaluation proxies to maintain sub-3ms initialization latency.
🛡️ Non-Destructive Collision Safety
- Interactive TUI Intercept: Before executing Phase 4 disk I/O, the orchestrator evaluates the workspace against module-specific
collision_markers. If a conflict is detected, execution pauses to prompt for aMERGE,OVERWRITE, orABORTstrategy. - Strict Headless Boundaries: In non-interactive environments (such as CI/CD pipelines), Protostar now strictly defaults to
ABORTto prevent silent data loss. This safety boundary can be explicitly bypassed using the new-f/--forceflag. - Target File Guards: Addressed silent overwrite vulnerabilities. Pre-existing
requirements.txtfiles are now guarded againstpip freezesteamrolling, and IDE settings injection safely aborts if VS Codesettings.jsoncontains JSONC (comments) that the standard library cannot parse.
⚙️ AST-Exclusive Configuration Engine
- Semantic TOML Merging: Legacy heuristic string-appending has been replaced with
tomlkit. Injected configurations are deeply merged directly into the Abstract Syntax Tree (AST), preserving existing formatting, comments, and non-colliding leaf tables (e.g., updating[tool.ruff]without nuking sibling[tool.mypy]blocks). - Pre-Execution Validation: The orchestrator now utilizes the C-optimized
tomllibto validate the syntax of existing workspace files before mutations begin, preventing environment fragmentation caused by attempting to merge into malformed target files. - Advanced Global Overrides: The
ProtostarConfigengine was rewritten using dynamicdataclasses.fieldsevaluation to support complex nested overrides. You can now inject raw multi-line TOML payloads ([dev.pyproject]), globally map dev dependencies ([dev]), or completely override specific preset dependencies and directories via~/.config/protostar/config.toml.
🪐 Domain Presets & Astrophysics Refinements
- Refined Astrophysics & Scientific Scaffolding: To better support observational data pipelines, the
--astropreset was tightened to focus on core optical and spectral reduction (photutils,specutils). The--scientificpreset traded domain-biased modules for foundational numerical and statistical libraries (scikit-learn). - New Topology Presets: Added
--mlfor deep learning workflows (configured to strictly ignore heavy serialized weights and telemetry bloat),--apifor REST backends, and--clifor terminal applications.
💄 Rich CLI & Performance Telemetry
- Render-Time Lazy Evaluation: Migrated to
rich-argparseto output bordered, highly readable subcommand matrices. To protect the sub-3ms fast-path execution latency,richcomponents are heavily decoupled usingLazyTargetHelpandGenerateEpilogTableproxies, deferring string interpolation and AST evaluation until the exact moment of rendering. - Automated Benchmarking: Deployed a
pytest-benchmarksuite to GitHub Pages to track fast-path and TUI execution latency, empirically validating Protostar's sub-50ms performance budget and generating dynamiclatency-badge.jsonendpoints. - Codecov & Renovate: Integrated Codecov for strict branch coverage tracking (decoupled from the fast local
make testexecution loop) and configured Renovate with a 2-week age gate for low-noise, batched dependency updates.
v0.3.0: Late-Binding Architecture & Deterministic Inception
Summary
This release represents a significant architectural shift in how Protostar handles dependency pipelines and configuration scaffolding. The primary focus is decoupling the tooling layer through a new late-binding architecture, alongside enforcing strict interpreter determinism for uv environments.
Major Changes
Late-Binding Tooling Architecture & Pre-commit Integration
The core PythonModule has been stripped of its hardcoded linters and formatters to prevent toolchain leakage across environments. Tooling is now managed via a late-binding payload broadcast strategy.
- Discrete Tooling Modules: Ruff, Mypy, Pytest, and MarkdownLint are now independent
BootstrapModulesubclasses. They evaluate their activation state contextually and drop their specific configuration payloads and cache ignores into theEnvironmentManifest. - Dynamic Pre-Commit Generation: Introduced the
--pre-commitflag. Instead of hardcoding a monolithic YAML file, language and tooling modules blindly push their specific pre-commit hooks to the manifest. The newPreCommitModuleacts as a gatekeeper, concatenating the payloads and executinggit initandpre-commit installduring the serialization phase. - Token Interpolation: The Orchestrator now features an
_append_files()phase that evaluates late-binding tokens. For example, it extracts therequires-pythonstring frompyproject.tomlto replace{{PYTHON_VERSION}}, and dynamically maps all project dependencies into{{MYPY_DEPENDENCIES}}to ensure strict static typing coverage inside the pre-commit hook.
Interpreter Determinism & Optimized uv Scaffolding
Environment initialization is now strictly deterministic to prevent reproducible build failures across host machines or containerized pipelines.
- Zero-Boilerplate Init:
uv initnow runs with--bareand--python-pin, completely preventing the generation of deletable boilerplate likehello.pyor defaultREADME.mdfiles, while dropping a.python-versionpin into the workspace. - Explicit Versioning: You can now explicitly define the target Python version via the
--python-versionCLI flag or globally inconfig.toml. - Dynamic Docker Context: To prevent container-side interpreter resolution conflicts, the orchestrator now dynamically evaluates the
system_tasksqueue. Ifuv initwas used, it automatically appends the host-bound.python-versionfile to the.dockerignore.
direnv Context Boundaries & Manifest Injections
To bypass the friction of manually dropping into subshells or sourcing virtual environments, Protostar now supports automatic shell binding.
- Auto-Scaffolding: The
--direnvflag (or global config toggle) auto-generates a.envrcfile, dynamically routing betweenuv syncorpython3 -m venvdepending on your global configuration. - Fail Loud: Enforces a strict pre-flight check, hard-aborting the scaffolding process if the
direnvbinary is missing from your$PATH. - Generalized File Injections: Hardcoded
_write_envrcmethods were refactored out in favor of a newfile_injectionsdictionary in theEnvironmentManifest, allowing any module to safely queue string payloads mapped to arbitrary file paths.
Minor Changes & Under-the-Hood Fixes
- Dependency Segregation: Added
dev_dependencies: set[str]to the manifest. The orchestrator now natively segregates installations usinguv add --dev(while retaining a unified fallback forpip install+pip freeze). - Contextual Subprocess Errors: Upgraded
run_quiet()in the system layer to catch and parse specificuvsubprocess failures. Ifuvfails due to restrictive global config rules (e.g.,python-downloads = "never"), it now raises a highly contextualRuntimeErrorinstead of an ambiguous non-zero exit code. - Config Inversions: Added support for toggles like
no-ruffto cleanly opt-out of default scaffolding behaviors. - Testing: Expanded
pytestcoverage usingpytest-mockto verify config merging, CLI flag dispatching, regex extraction, and deterministic side-effect generation without polluting the host disk.
v0.2.0: The Polymorphic Update
Summary
This release transitions the Protostar CLI from a procedural, flat-argument script into a fully decoupled, polymorphic architecture. We’ve enforced a strict "manifest-first, side-effects-last" design philosophy. The execution phase is now entirely declarative, preventing I/O side-effects from mutating the global state before the orchestrator is ready to build.
Less time fighting boilerplate, more time actually running the data analysis pipelines.
🚀 Major Highlights
Core Architecture: O(1) Dispatch & Declarative State
We’ve completely rewritten the internal dependency injection and routing mechanisms.
- Modular Subcommands:
argparsenamespace saturation is gone. We've moved to a standardgit-style subcommand architecture (proto init,proto generate). - TargetGenerator ABC: Imperative scaffolding functions have been modularized into the
generators/package. The orchestrator now uses an O(1) dynamic dictionary dispatch to evaluate targets rather than rigidif/elifblocks. - Manifest State Separation: The overloaded
ignored_pathsattribute inEnvironmentManifestis dead. It’s been split intovcs_ignores(for.gitignore) andworkspace_hides(for IDE visualization), stopping version control and IDE settings from clobbering each other. - Cascading Configs: Added an immutable merge cascade for workspace-specific
.protostar.tomloverrides. You can now override global presets locally without destroying unmentioned keys.
Domain-Specific Pipeline Presets
We've migrated the rigid --scientific flag out of the cli.py monkey-patch and into a dedicated PresetModule registry, bringing three new specialized environments with it:
--astro: Built for observational and theoretical pipelines. Drops inastropyandgwpy, and scaffoldsdata/fits/structures. It's perfectly tuned for crunching final-year thesis data at UVic without having to reinvent the directory wheel.--dsp: Scaffolds audio analysis and signal processing pipelines (librosa,mido,data/raw_audio). Ideal for dissecting frequencies when building out mixing tools for the next DnB or garage set.--embedded: Preps host-side hardware telemetry (pyserial,esptool).--scientific: Now automatically generates a standard analytical tree (data/,notebooks/,src/) and aggressively.gitignores massive binary formats (*.csv,*.parquet,*.nc).
The Generator Engine (proto generate)
The new generate subcommand handles domain-specific boilerplate independently of the global orchestrator lifecycle, ensuring CLI atomicity.
- Hardware & IoT (
circuitpython,pio): PlatformIO targets now infer architecture strings natively. The CircuitPython generator drops a non-blockingtime.monotonic()state machine by default. This avoids standardtime.sleep()bottlenecks when soldering up sensors or custom event lighting rigs. - C++ (
cmake,cpp-class): Thecmakegenerator statically scans the local directory via Python to write.cppfilenames directly into theadd_executabledirective, officially bypassing the CMake globbing cache anti-pattern. - LaTeX (
tex): Generates modular.textemplates with dynamically cascading preambles (science macros, biblatex) based on your active preset.
🔧 The Fine Print (QoL, Tooling, & Chores)
- Rich TUI & Help System: Replaced the ugly
argparsetext wrap with a responsiverich.table.TableTUI. Executingproto help generatenow dynamically reads registry docstrings and prints a clean, rounded-box grid that respects terminal width. - POSIX
pipFallback: Added apython_package_managerconfig option. Ifuvisn't available, Protostar falls back to standard POSIXpip, dynamically generating.venvandrequirements.txtstates. - Docker Context Optimization: The new
--dockerflag dynamically merges your manifest'svcs_ignoreswith standard daemon context bloat to generate an optimized.dockerignore. - POSIX Short Flags: Added single-character shorthands (
-pfor--python,-rfor--rust) for better terminal ergonomics. - Global XDG Config:
proto configautomatically resolves~/.config/protostar/config.tomland spawns a subprocess to open it in$EDITOR. - Strict Typing & Linting: Enforced Google-style docstrings across the codebase via
ruff'sDruleset and added explicit return types to squash allmypyviolations. - Documentation: Shipped a formal
CONTRIBUTING.mdenforcing the sandboxed disk I/O testing mandates.

