velotype 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ # Byte-compiled / optimized
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+
7
+ # Virtual environments
8
+ .venv/
9
+ venv/
10
+ ENV/
11
+ env/
12
+
13
+ # Packaging / build
14
+ build/
15
+ dist/
16
+ packages/*/dist/
17
+ *.egg-info/
18
+ *.egg
19
+ .eggs/
20
+ pip-wheel-metadata/
21
+ share/python-wheels/
22
+
23
+ # Hatch / setuptools
24
+ .hatch/
25
+
26
+ # Testing / coverage
27
+ .pytest_cache/
28
+ .coverage
29
+ .coverage.*
30
+ htmlcov/
31
+ .tox/
32
+ .nox/
33
+ coverage.xml
34
+ *.cover
35
+ .hypothesis/
36
+
37
+ # Type checkers / linters
38
+ .mypy_cache/
39
+ .dmypy.json
40
+ dmypy.json
41
+ .ruff_cache/
42
+ .pytype/
43
+
44
+ # IDEs / editors
45
+ .idea/
46
+ .vscode/
47
+ *.swp
48
+ *.swo
49
+ *~
50
+
51
+ # OS
52
+ .DS_Store
53
+ Thumbs.db
54
+
55
+ # Local env / secrets
56
+ .env
57
+ .env.*
58
+ !.env.example
59
+
60
+ # Cursor / tooling (optional local state)
61
+ *.log
@@ -0,0 +1,53 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Changed
11
+
12
+ - Renamed PyPI package **`stubber`** → **`velotype`** (import `velotype`, CLI **`velotype`**). The **`stubber`** 0.1.0 release on PyPI is the previous name; new releases use **`velotype`**.
13
+ - Renamed scaffold package **`clarion`** → **`velocus`** — the PyPI project name **`clarion`** is not available for this maintainer ([PyPI project name policy](https://pypi.org/help/#project-name)).
14
+
15
+ ## [0.1.0] - 2026-04-05
16
+
17
+ Coordinated **0.1.0** line for the monorepo: **`velarium`** and **`velotype`** are the supported libraries; **`viperis`**, **`morphra`**, **`granitus`**, and **`velocus`** (formerly scaffold **`clarion`** in-repo) ship as minimal **scaffold** packages (importable, documented as not yet implemented).
18
+
19
+ ### Packages
20
+
21
+ | Package | Version | Notes |
22
+ |-----------|---------|--------|
23
+ | velarium | 0.1.0 | ModelSpec IR core (`typing_extensions` only). |
24
+ | velotype | 0.1.0 | Depends on `velarium>=0.1.0`; IR → `.pyi` + CLI. |
25
+ | viperis, morphra, granitus, velocus | 0.1.0 | Pre-alpha scaffolds; no runtime dependencies. |
26
+
27
+ ### Added
28
+
29
+ - **ModelSpec IR** — `ModelSpec`, `TypeSpec`, `TypeKind`, `ModelConfig`, `FieldSpec`, `ModelMetadata` ([docs/modelspec-ir.md](docs/modelspec-ir.md)).
30
+ - **JSON** — `dumps_model_spec` / `loads_model_spec` and dict helpers with deterministic ordering where applicable.
31
+ - **Normalization** — Union flatten/dedupe; optional encoding via `velarium.normalize`.
32
+ - **Builders** — `modelspec_from_dataclass`, `modelspec_from_typed_dict`; `type_to_typespec`, `annotation_to_typespec`.
33
+ - **Stubs** — `generate_pyi`, `render_typespec` (dataclass-oriented `.pyi` body).
34
+ - **CLI** (Typer) — `velotype ir`, `velotype stub`; `python -m velotype`.
35
+ - **`py.typed`** markers for **`velarium`** and **`velotype`** (PEP 561).
36
+ - **CI** — GitHub Actions (pytest, ty, build all packages) on Python 3.10–3.13.
37
+
38
+ ### Changed
39
+
40
+ - **Monorepo** — Split into **`velarium`** (core ModelSpec IR) and **`velotype`** (IR → `.pyi` + CLI). Scaffold packages: **`viperis`**, **`morphra`**, **`granitus`**, **`velocus`**. Root **[uv](https://docs.astral.sh/uv/)** workspace; see [docs/valarium.md](docs/valarium.md) and [README.md](README.md).
41
+ - **`velotype`** re-exports IR APIs from `velotype` for compatibility; prefer `from velarium import …` for IR-only use.
42
+ - Replaced **mypy** with **[Astral ty](https://docs.astral.sh/ty/)** for static typing in dev and CI (`[tool.ty]` in root `pyproject.toml`).
43
+ - `typing_extensions.is_typeddict` used directly in `modelspec_from_typed_dict` (removed redundant try/except).
44
+ - Removed unreachable `get_origin` + `Enum` branch in `annotations.type_to_typespec` (enum classes are handled via `isinstance(t, type)`).
45
+
46
+ ### Documentation
47
+
48
+ - [docs/design.md](docs/design.md), [docs/modelspec-ir.md](docs/modelspec-ir.md), [docs/valarium.md](docs/valarium.md), [docs/README.md](docs/README.md) for the Velarium ecosystem.
49
+ - [docs/ROADMAP.md](docs/ROADMAP.md) and [docs/releasing.md](docs/releasing.md) for workspace layout and releases.
50
+ - Per-package [packages/*/README.md](packages/) (`velarium`, `velotype`, `viperis`, `morphra`, `granitus`, `velocus`).
51
+
52
+ [Unreleased]: https://github.com/eddiethedean/velarium/compare/v0.1.0...HEAD
53
+ [0.1.0]: https://github.com/eddiethedean/velarium/releases/tag/v0.1.0
velotype-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Velarium contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: velotype
3
+ Version: 0.1.0
4
+ Summary: Velarium IR to .pyi stub generation (velotype backend)
5
+ Project-URL: Homepage, https://github.com/eddiethedean/velarium
6
+ Project-URL: Repository, https://github.com/eddiethedean/velarium
7
+ Project-URL: Documentation, https://github.com/eddiethedean/velarium/blob/main/docs/README.md
8
+ Project-URL: Changelog, https://github.com/eddiethedean/velarium/blob/main/CHANGELOG.md
9
+ Author: Velarium contributors
10
+ License: MIT
11
+ Keywords: ir,pyi,static-analysis,stubs,typing,velarium
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Typing :: Typed
18
+ Requires-Python: >=3.10
19
+ Requires-Dist: typer>=0.9.0
20
+ Requires-Dist: velarium>=0.1.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: build>=1.0; extra == 'dev'
23
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
24
+ Requires-Dist: pytest>=7.0; extra == 'dev'
25
+ Requires-Dist: ty>=0.0.29; extra == 'dev'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # velotype
29
+
30
+ **Role in Velarium:** **IR → `.pyi`** — render Velarium (ModelSpec) IR as minimal stub text, and expose the **`velotype`** CLI for quick IR export and stub generation from live classes.
31
+
32
+ | | |
33
+ |---|---|
34
+ | **PyPI** | `velotype` |
35
+ | **Depends on** | [**velarium**](../velarium/README.md) (required) |
36
+ | **CLI** | `velotype ir`, `velotype stub` (also `python -m velotype`) |
37
+
38
+ The IR types and builders live in **`velarium`**. **`velotype`** re-exports most public IR symbols (same layout as **`velarium`**) for convenience; prefer `from velarium import …` in new code when you only need IR.
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ pip install velotype
44
+ ```
45
+
46
+ From the monorepo root:
47
+
48
+ ```bash
49
+ uv sync --group dev
50
+ # or
51
+ pip install -e packages/velarium -e "packages/velotype[dev]"
52
+ ```
53
+
54
+ ## CLI
55
+
56
+ ```bash
57
+ velotype ir myapp.models:User
58
+ velotype ir myapp.models:User -o user.ir.json
59
+ velotype stub myapp.models:User -o user.pyi
60
+ ```
61
+
62
+ ## Library
63
+
64
+ ```python
65
+ from velarium import modelspec_from_dataclass, dumps_model_spec
66
+ from velotype import generate_pyi
67
+
68
+ spec = modelspec_from_dataclass(MyModel)
69
+ print(generate_pyi(spec))
70
+ ```
71
+
72
+ ## Version
73
+
74
+ `__version__` is in `velotype/__init__.py` (Hatch dynamic metadata in this package’s `pyproject.toml`).
75
+
76
+ ## See also
77
+
78
+ - [docs/modelspec-ir.md](../../docs/modelspec-ir.md) — IR schema
79
+ - [docs/valarium.md](../../docs/valarium.md) — ecosystem and backends
80
+ - [Documentation index](../../docs/README.md)
@@ -0,0 +1,53 @@
1
+ # velotype
2
+
3
+ **Role in Velarium:** **IR → `.pyi`** — render Velarium (ModelSpec) IR as minimal stub text, and expose the **`velotype`** CLI for quick IR export and stub generation from live classes.
4
+
5
+ | | |
6
+ |---|---|
7
+ | **PyPI** | `velotype` |
8
+ | **Depends on** | [**velarium**](../velarium/README.md) (required) |
9
+ | **CLI** | `velotype ir`, `velotype stub` (also `python -m velotype`) |
10
+
11
+ The IR types and builders live in **`velarium`**. **`velotype`** re-exports most public IR symbols (same layout as **`velarium`**) for convenience; prefer `from velarium import …` in new code when you only need IR.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pip install velotype
17
+ ```
18
+
19
+ From the monorepo root:
20
+
21
+ ```bash
22
+ uv sync --group dev
23
+ # or
24
+ pip install -e packages/velarium -e "packages/velotype[dev]"
25
+ ```
26
+
27
+ ## CLI
28
+
29
+ ```bash
30
+ velotype ir myapp.models:User
31
+ velotype ir myapp.models:User -o user.ir.json
32
+ velotype stub myapp.models:User -o user.pyi
33
+ ```
34
+
35
+ ## Library
36
+
37
+ ```python
38
+ from velarium import modelspec_from_dataclass, dumps_model_spec
39
+ from velotype import generate_pyi
40
+
41
+ spec = modelspec_from_dataclass(MyModel)
42
+ print(generate_pyi(spec))
43
+ ```
44
+
45
+ ## Version
46
+
47
+ `__version__` is in `velotype/__init__.py` (Hatch dynamic metadata in this package’s `pyproject.toml`).
48
+
49
+ ## See also
50
+
51
+ - [docs/modelspec-ir.md](../../docs/modelspec-ir.md) — IR schema
52
+ - [docs/valarium.md](../../docs/valarium.md) — ecosystem and backends
53
+ - [Documentation index](../../docs/README.md)
@@ -0,0 +1,25 @@
1
+ # Velarium documentation
2
+
3
+ Welcome to the **Velarium** monorepo docs: a shared **ModelSpec IR** (`velarium`), backends like **`velotype`** (`.pyi`), and scaffold packages for the full pipeline in [valarium.md](valarium.md).
4
+
5
+ ## Start here
6
+
7
+ | Document | Contents |
8
+ |----------|----------|
9
+ | **[Velarium ecosystem spec](valarium.md)** | Components, pipeline, architecture, **monorepo `packages/`** layout |
10
+ | **[Design & philosophy](design.md)** | Why the IR exists, how we relate to mypy/Pyright/Pydantic, compiler-style framing |
11
+ | **[ModelSpec IR specification](modelspec-ir.md)** | `ModelSpec`, `TypeSpec`, `TypeKind`, normalization, JSON — **implemented in `velarium`** |
12
+ | **[Roadmap to 1.0.0](ROADMAP.md)** | Phased **0.x** work through stable **1.0.0** |
13
+ | **[Installing & releasing](releasing.md)** | uv workspace, editable installs, builds, PyPI |
14
+
15
+ ## Repository map
16
+
17
+ - **Root [README](../README.md)** — Quick install, CLI examples, package table.
18
+ - **Source:** `packages/velarium` (IR), `packages/velotype` (stubs + CLI), `packages/viperis`, `packages/morphra`, `packages/granitus`, `packages/velocus` (scaffolds).
19
+ - **Changelog:** [CHANGELOG.md](../CHANGELOG.md).
20
+
21
+ ## Naming
22
+
23
+ - **Velarium** — Ecosystem and conceptual IR (“Velarium IR” = ModelSpec IR).
24
+ - **`velarium`** — PyPI package with the core types and builders.
25
+ - **`velotype`** — PyPI package for stub generation; re-exports IR symbols for compatibility.
@@ -0,0 +1,310 @@
1
+ # Roadmap to 1.0.0
2
+
3
+ This document is the **release plan** for the **Velarium** monorepo (notably **`velarium`** IR and **`velotype`** stubs/CLI): what we ship in each **0.X.*** line, how phases depend on each other, and what **1.0.0** commits to. It complements [design.md](design.md) (why the IR exists) and [modelspec-ir.md](modelspec-ir.md) (schema details).
4
+
5
+ **Conventions**
6
+
7
+ | Term | Meaning |
8
+ |------|--------|
9
+ | **Phase** | A **minor** series **0.X.*** (ongoing work until exit criteria are met). |
10
+ | **Patch** | **0.X.Y** — bugfixes, docs, and *small* additive changes that do not change the phase’s scope. |
11
+ | **Breaking change** | Removes or incompatibly changes a **documented public API** or **documented JSON IR** shape. Breaking changes are avoided in patch releases; before 1.0 they are allowed in minors with changelog notes. |
12
+
13
+ Dates are not promised; **order and dependencies** drive sequencing.
14
+
15
+ ---
16
+
17
+ ## Guiding principles
18
+
19
+ 1. **IR first** — Normalization and JSON interchange are the contract; CLI and stubs are consumers.
20
+ 2. **Checker-friendly outputs** — Generated `.pyi` and idioms should aim to work under **mypy** and **Pyright** without forked “dialects.”
21
+ 3. **Honest fallbacks** — Prefer an explicit `any` (or documented lossy node) over silent wrong types.
22
+ 4. **Backend-agnostic core** — Optional native acceleration must not change IR semantics (same tests, same JSON meaning).
23
+ 5. **Small API surface** — Prefer a few well-documented entry points over many overlapping helpers.
24
+
25
+ ---
26
+
27
+ ## Non-goals (for 1.0.0)
28
+
29
+ These are **out of scope** for the 1.0.0 milestone unless explicitly moved into a phase below:
30
+
31
+ - Replacing **mypy**, **Pyright**, or **Ruff** as a type checker or linter.
32
+ - Full **inference** of untyped code (today’s builders focus on stated annotations and model structure).
33
+ - Guaranteeing identical behavior to every edge case in every checker—we target **practical** portability, documented where we diverge.
34
+ - A **GUI** or language-server implementation (downstream of IR is fine; shipping one is not required for 1.0).
35
+
36
+ ---
37
+
38
+ ## What “1.0.0” means
39
+
40
+ At **1.0.0**, adopters can rely on:
41
+
42
+ | Area | Commitment |
43
+ |------|------------|
44
+ | **Python API** | [Semver](https://semver.org/): breaking changes only in major versions; deprecations follow a stated minimum period. |
45
+ | **Public surface** | Explicit list of supported modules, functions, and classes (see Phase 0.8). |
46
+ | **ModelSpec JSON** | Documented schema version or evolution rules; breaking IR changes require a major **or** a clearly versioned alternate export. |
47
+ | **Support matrix** | Documented Python versions and tier-1 / tier-2 support for checkers and optional deps. |
48
+ | **Quality** | Automated tests, CI on supported platforms, and a maintained **CHANGELOG**. |
49
+ | **Security** | Documented threat model for CLI (dynamic import / `eval` boundaries) and responsible disclosure process. |
50
+
51
+ Patch releases **1.0.z** are bugfixes and safe doc/typing updates only.
52
+
53
+ ---
54
+
55
+ ## Phase dependency overview
56
+
57
+ Phases build on earlier work:
58
+
59
+ ```text
60
+ 0.1 foundation ──► 0.2 IR fidelity ──► 0.3 model sources
61
+ │ │
62
+ └──────────┬───────────┘
63
+
64
+ 0.4 stub quality ──► 0.5 tooling
65
+
66
+
67
+ 0.6 performance ──► 0.7 hardening
68
+
69
+
70
+ 0.8 API / IR freeze ──► 0.9 RC ──► 1.0.0
71
+ ```
72
+
73
+ You can parallelize **some** work (e.g. docs vs code) within a phase, but **do not** promise 0.4-quality stubs before 0.2 has stabilized the IR shapes those stubs render from.
74
+
75
+ ---
76
+
77
+ ## Phase 0.1.* — Foundation *(completed 0.1.0)*
78
+
79
+ **Theme:** End-to-end path from Python models to IR JSON and minimal stubs.
80
+
81
+ **Reference implementation (shipped in 0.1.0):**
82
+
83
+ | Area | Status |
84
+ |------|--------|
85
+ | IR types | `ModelSpec`, `TypeSpec`, `TypeKind`, `ModelConfig`, `FieldSpec`, `ModelMetadata` in `velarium.ir` (also re-exported as `velotype.ir`) |
86
+ | Serialization | `dumps_model_spec` / `loads_model_spec`, dict helpers |
87
+ | Normalization | Union flatten/dedupe, optional encoding in `velarium.normalize` (also `velotype.normalize`) |
88
+ | Builders | `modelspec_from_dataclass`, `modelspec_from_typed_dict` |
89
+ | Annotations | `type_to_typespec`, `annotation_to_typespec` (MVP coverage) |
90
+ | Stubs | `generate_pyi`, `render_typespec` (dataclass-oriented) |
91
+ | CLI | Typer: `velotype ir`, `velotype stub`; `python -m velotype` |
92
+ | Docs | `docs/design.md`, `docs/modelspec-ir.md`, README |
93
+
94
+ **Refinements that closed 0.1.*:**
95
+
96
+ - [x] Version from `velotype.__version__` / `velarium.__version__` via Hatch per package; aligned with distribution metadata.
97
+ - [x] **CI** on GitHub Actions: Python 3.10–3.13, `pytest`, `ty check`, `python -m build`.
98
+ - [x] **[CHANGELOG.md](../CHANGELOG.md)** (Keep a Changelog).
99
+ - [x] Optional **PyPI publish** workflow on GitHub Release; manual **twine** documented in [releasing.md](releasing.md).
100
+
101
+ **Exit criteria (0.1 complete):**
102
+
103
+ - [x] Installable artifact from PyPI *or* documented install from Git with reproducible `python -m build` ([releasing.md](releasing.md)).
104
+ - [x] Green CI on the supported Python line with tests + `ty` on **velarium** / **velotype** sources.
105
+ - [x] Roadmap, IR spec, and changelog linked from README; [modelspec_ir.md](../modelspec_ir.md) pointer retained.
106
+
107
+ ---
108
+
109
+ ## Phase 0.2.* — Type surface and IR fidelity
110
+
111
+ **Theme:** Reduce `any` noise; make annotation → IR behavior **predictable and testable**.
112
+
113
+ **Deliverables:**
114
+
115
+ - **Forward references:** Consistent resolution with `get_type_hints` and module namespaces; document behavior for unresolvable refs.
116
+ - **`from __future__ import annotations`:** String annotations handled uniformly across builders.
117
+ - **`typing` coverage:** `Protocol`, `TypedDict` (required/optional keys), nested `Literal`, `Annotated` (strip or preserve per policy), `Final`, `ClassVar` where they affect field typing.
118
+ - **Type variables:** Represent `TypeVar`, `ParamSpec`, `TypeVarTuple` in IR with documented lossy cases.
119
+ - **Nominal types:** Policy for user-defined classes (e.g. qualified name string vs `GENERIC` vs `ANY`) documented in `modelspec-ir.md`.
120
+ - **Golden tests:** Curated `annotation → JSON IR` fixtures in `tests/` (or `tests/fixtures/`).
121
+
122
+ **Risks:**
123
+
124
+ - Explosion of edge cases; mitigate with a **support matrix** and explicit “not yet” list.
125
+
126
+ **Exit criteria:**
127
+
128
+ - [ ] `docs/` page or section: **supported annotations** table + known gaps.
129
+ - [ ] No silent behavior change without a test or changelog note for IR output.
130
+
131
+ ---
132
+
133
+ ## Phase 0.3.* — Model sources
134
+
135
+ **Theme:** Same IR from more than `@dataclass` / `TypedDict`.
136
+
137
+ **Deliverables:**
138
+
139
+ - **Pydantic v2:** `modelspec_from_pydantic_model` (name TBD) — fields, defaults, field constraints mapped into `TypeSpec` / metadata as far as the IR allows.
140
+ - **Optional extras:** e.g. `pip install velotype[attrs]` (or an extra on **`velarium`** if IR-only) for **attrs** / **msgspec** with parallel tests.
141
+ - **Unified metadata:** `ModelMetadata` populated consistently (module, file, line where feasible).
142
+ - **Conflict policy:** If multiple sources disagree, document error vs last-wins behavior.
143
+
144
+ **Exit criteria:**
145
+
146
+ - [ ] At least **one** non-dataclass source is **tier-1** (tested in default CI job).
147
+ - [ ] User-facing doc: how to choose a builder and limitations per source.
148
+
149
+ ---
150
+
151
+ ## Phase 0.4.* — Stub generation quality
152
+
153
+ **Theme:** `.pyi` output is **reviewable** and **checker-usable**, not only syntactically valid.
154
+
155
+ **Deliverables:**
156
+
157
+ - **Import graph:** Emit correct `from … import` / `import` lines; avoid circular import traps in generated stubs.
158
+ - **Module layout:** `__all__`, module docstring, optional per-package style presets.
159
+ - **Validation:** Run **mypy** and **Pyright** on generated stubs against a **fixture corpus** (mini-packages in-repo).
160
+ - **Formatting:** Optional post-pass via **ruff format** or **black** (configurable).
161
+ - **`generate_pyi` API:** Parameters for style, header/footer hooks, or template overrides.
162
+
163
+ **Exit criteria:**
164
+
165
+ - [ ] Documented **stub compatibility checklist** (what we guarantee vs best-effort).
166
+ - [ ] CI job that fails if fixture stubs regress under pinned checker versions.
167
+
168
+ ---
169
+
170
+ ## Phase 0.5.* — Tooling and integrations
171
+
172
+ **Theme:** velotype fits **repos** and **pipelines**, not only one-off CLI invocations.
173
+
174
+ **Deliverables:**
175
+
176
+ - **Batch API:** Walk packages/modules, emit many stubs or one merged artifact; configurable discovery (exclude tests, etc.).
177
+ - **Pre-commit:** Official hook config or `pre-commit` mirror repo entry.
178
+ - **Watch mode** (optional): filesystem watcher for dev iteration.
179
+ - **Errors:** Structured errors with module/class context; exit codes documented.
180
+ - **Interchange:** Experimental **JSON Schema** export for `ModelSpec` *or* documented alternative for non-Python consumers (may stay optional/experimental until post-1.0 if scope threatens stability).
181
+
182
+ **Exit criteria:**
183
+
184
+ - [ ] “From clone to generated stubs” **tutorial** in docs (copy-paste friendly).
185
+ - [ ] Issue template or **troubleshooting** section for common CLI failures.
186
+
187
+ ---
188
+
189
+ ## Phase 0.6.* — Performance and scale
190
+
191
+ **Theme:** Usable on **large** codebases without unacceptable memory or time.
192
+
193
+ **Deliverables:**
194
+
195
+ - **Profiling:** Identify hotspots (normalization, JSON, stub string build).
196
+ - **Pure Python wins:** Caching, lazy resolution, fewer intermediate copies where safe.
197
+ - **Optional native backend:** Same JSON golden tests; feature flag to enable accelerated normalization (e.g. Rust extension). **No semantic drift.**
198
+ - **Incremental mode:** Cache IR keyed by file hash + **velarium** / **velotype** versions + relevant config.
199
+
200
+ **Exit criteria:**
201
+
202
+ - [ ] Doc section: **performance expectations** and when to enable native backend.
203
+ - [ ] Benchmark script or CI optional job (not necessarily blocking PRs) to catch regressions.
204
+
205
+ ---
206
+
207
+ ## Phase 0.7.* — Hardening
208
+
209
+ **Theme:** Security, robustness, and abuse resistance.
210
+
211
+ **Deliverables:**
212
+
213
+ - **Fuzzing / property tests:** JSON round-trip, normalization idempotence where applicable.
214
+ - **CLI threat model:** Document what `velotype ir` / `velotype stub` load and execute; minimize `eval`; sandbox recommendations for untrusted code **never** assumed safe.
215
+ - **Resource limits:** Optional caps on input size / recursion for hostile inputs.
216
+ - **Bug triage:** No open **critical** crashes or security issues on the 1.0 milestone.
217
+
218
+ **Exit criteria:**
219
+
220
+ - [ ] `docs/security.md` or equivalent section in README.
221
+ - [ ] Fuzz/property tests in CI or documented manual cadence.
222
+
223
+ ---
224
+
225
+ ## Phase 0.8.* — API and IR stability prep
226
+
227
+ **Theme:** Everything public is **named**, **documented**, and **versioned**.
228
+
229
+ **Deliverables:**
230
+
231
+ - **Public API audit:** Final `__all__` and “public module” list; hide or underscore internal helpers.
232
+ - **IR versioning:** explicit `model_spec` / IR version field in JSON *or* parallel `model_spec_v2` export—pick one strategy and document migration (owned by **`velarium`** contract).
233
+ - **Deprecations:** `warnings.warn` with `DeprecationWarning` and docstrings for anything removed before 1.0.
234
+ - **Migration guide:** From early 0.x snapshots to current IR JSON.
235
+
236
+ **Exit criteria:**
237
+
238
+ - [ ] “**API reference**” (Sphinx, mkdocs, or hand-maintained) for public symbols.
239
+ - [ ] Commitment text: only **additive** minors or **deprecation** paths until 1.0 after this phase starts.
240
+
241
+ ---
242
+
243
+ ## Phase 0.9.* — Release candidate
244
+
245
+ **Theme:** **1.0.0** is a tag, not a surprise.
246
+
247
+ **Deliverables:**
248
+
249
+ - **Changelog** complete from 0.1 through 0.9.
250
+ - **RC releases** on PyPI (`0.9.0rc1`, etc.) if needed; no breaking API/IR changes without bumping RC or documenting exception.
251
+ - **Feedback window:** README section for RC feedback (issues/discussions).
252
+ - **Third-party smoke:** Optional downstream project checks (manual or nightly).
253
+
254
+ **Exit criteria:**
255
+
256
+ - [ ] Maintainers agree: **no P0/P1** blockers; matrix and docs ready.
257
+ - [ ] **1.0.0** release notes drafted (highlights + breaking vs stable areas).
258
+
259
+ ---
260
+
261
+ ## 1.0.0 — Stable release
262
+
263
+ **Theme:** Durable baseline for libraries and internal tools.
264
+
265
+ **Deliverables:**
266
+
267
+ - Git tag **v1.0.0**, PyPI **1.0.0**.
268
+ - Stability statement (pointer back to [What “1.0.0” means](#what-100-means)).
269
+ - **Support policy:** Which Python versions receive patch fixes for the 1.0 line.
270
+
271
+ **After 1.0.0**
272
+
273
+ - Features ship as **1.y.0** minors; fixes as **1.0.z** patches.
274
+ - **2.0.0** only for intentional breaking API **or** incompatible IR revision with migration path.
275
+
276
+ ---
277
+
278
+ ## Cross-cutting work (all phases)
279
+
280
+ | Track | Ongoing expectations |
281
+ |-------|----------------------|
282
+ | **Tests** | Increase coverage on new code paths; regression tests for every fixed IR/stub bug. |
283
+ | **Docs** | Update `modelspec-ir.md` when IR meaning changes; link new user-facing features from the root [README](../README.md) and [docs/README](README.md). |
284
+ | **Dependencies** | Conservative bounds; security updates for Typer, typing_extensions, etc. |
285
+ | **Contributing** | `CONTRIBUTING.md` when external contributors appear: code style, PR checklist, CoC optional. |
286
+
287
+ ---
288
+
289
+ ## How to change this roadmap
290
+
291
+ - Propose edits via PR; significant scope changes should update **phase exit criteria** and **dependency overview**.
292
+ - **Slipping** work to a later phase is normal; **removing** exit criteria without maintainer agreement is not.
293
+ - When a phase’s exit criteria are met, tag a **minor** release and note it in CHANGELOG.
294
+
295
+ ---
296
+
297
+ ## Summary table
298
+
299
+ | Phase | Focus | Main outcome |
300
+ |-------|--------|----------------|
301
+ | **0.1** | Foundation | IR + JSON + dataclass/TypedDict + CLI + CI + PyPI path |
302
+ | **0.2** | Fidelity | Annotation coverage + golden IR tests + support matrix |
303
+ | **0.3** | Sources | Pydantic (+ optional attrs/msgspec) |
304
+ | **0.4** | Stubs | Checker-validated `.pyi`, import/style quality |
305
+ | **0.5** | Tooling | Batch, pre-commit, docs for workflows |
306
+ | **0.6** | Performance | Profiling, cache, optional native backend |
307
+ | **0.7** | Hardening | Security doc, fuzzing, resource limits |
308
+ | **0.8** | Freeze | Public API + IR version + migration guide |
309
+ | **0.9** | RC | Changelog, feedback, no blockers |
310
+ | **1.0** | Stable | Semver + long-lived 1.0 line |