# Current priority: Runtime memory management (2026-10-30)

CC places garbage collection and memory lifetime qualification before additional
conversion-import capabilities. Keep PCFC11 development and its familiar
`bash test-pcfc11.sh` workflow independent; no new compiler integration is part
of this sequence. Existing one-wheel PyCForge distribution remains intact.

1. **Registered roots and managed boundaries — 1.3.71.** Retain caller-owned PV
   slots; collect after opted-in completed calls; expose memory/refusal statistics.
   Qualify aliases, cycles, closures, arrays, exceptions, files and allocation
   failures. Preserve ordinary C-call semantics and hard execution budgets.
2. **Generated roots and safe points — 1.3.72.** Opt-in active collection now
   traces local/captured cells, return values and scoped evaluation temporaries.
   Qualify nested calls, loops/comprehensions, unwind paths and allocation faults.
   Collection remains deferred in native callbacks/constructors, expanded calls,
   initialization and active file scopes. Ordinary callers remain unchanged.
3. **Broader active coverage and performance — next.** Trace native helper scratch
   and active file resources before extending safe points there. Measure long-run
   pause distributions and live-graph scaling; choose defaults from that evidence.
4. **Resource contracts and cross-platform qualification.** Keep files/native
   resources deterministic; do not introduce GC-dependent finalizers. Exercise
   supported external compilers, Windows and Linux, realistic long runs and SDK
   ownership contracts. Publish exact limits and measured evidence.
5. **Resume import expansion** after the memory gates above are qualified.

The following material is retained development history; this priority governs
new work. Current contract: specifications/runtime_memory_1_3_72.md.

---

# PyCForge 1.3.42 — Structured immutable Typed records

- Read fields directly from constructors, factory results, nested records and
  constant-indexed record collection elements; preserve evaluation order.
- Support exact nominal nested record fields with bounded acyclic inline
  layouts, and fixed local homogeneous record lists/tuples with ordered loops.
- Replay source/collection evidence before emission; validate nested C types,
  dependency order and const propagation. Keep earlier explicit profiles.
- Fix private-field name-mangling conversion and reject late imports used by
  nested record annotations before they are bound in Python.
- Add complete executable HTML examples and synchronize existing Help limits.
  README.md remains byte-for-byte unchanged; no UI or Runtime behavior change.
- See specifications/record_structures_1_3_42.md and
  PyCForge-1.3.42-Verification.txt for scope, checks and remaining limits.

# PyCForge 1.3.41 — Typed record constructor expressions

- Support direct record construction in returns and positional function
  arguments, including branches, nested calls and imported class aliases.
- Preserve exact nominal types and scalar field layouts. Stage arguments once
  from left to right and return automatic struct values without heap storage.
- Authenticate constructor expression evidence against the source and retain
  explicit historical profiles with their previous constructor limits.
- Add a complete reflection-and-distance example to HTML Help and update the
  multi-module and separate C caller examples. Describe supported usage and
  practical limits without development-cycle commentary.
- Leave README.md byte-for-byte unchanged, including its version heading and
  three approved image URLs, while conversion upgrades continue.
- See specifications/record_expressions_1_3_41.md and
  PyCForge-1.3.41-Verification.txt for technical scope and verification.

# PyCForge 1.3.40 — Typed records across supplied modules

- Import immutable record classes directly from their defining supplied module,
  with optional aliases. Pass and return exact record types through imported
  functions; allow record-only companion modules.
- Preserve nominal class identity, scalar field layouts, value-copy C structs
  and separate module exports. Authenticate imported aliases against retained
  source and validate cross-module C types through declared dependencies.
- Promote typed-record-modules-v1.3 / c-renderer-v1.3. Explicit historical
  profiles retain their previous limits; Runtime conversion is unchanged.
- Add an executable three-module geometry example to HTML Help, including
  import rules, factory results, nominal typing and remaining call limits.
  Restore the current-version footer on five existing Runtime Help pages.
- Update only the README version and affected conversion coverage. Retain its
  established prose, code examples, contact, bug tracker and exact three approved
  image URLs. The existing screenshots remain accurately labeled 1.3.39.
- Package no screenshots or design images; preserve the required app icons.
- See specifications/record_modules_1_3_40.md and
  PyCForge-1.3.40-Verification.txt for scope and verification.

# PyCForge 1.3.39 — Typed record parameters and returns

- Add nominal immutable record parameters, factory results, forwarding and
  returns in Typed mode. Preserve exact field types and positional evaluation
  order; reject mutation, mismatched classes and unsafe value uses.
- Generate C structs passed and returned by value without heap allocation.
  Include exact generated type names and record layouts in module export metadata.
- Promote typed-record-values-v1.2 / c-renderer-v1.2 while preserving explicit
  historical profiles. Runtime keeps its 1.3.38 conversion contract.
- Expand executable HTML Help with complete Python and separate C caller
  examples, copy semantics and clear module/call limits. Repair the Help catalog's
  Runtime strings keyword count so all documentation pages can load.
- Keep README and artwork unchanged for the later screenshots/logo update.
- See specifications/typed_record_boundaries_1_3_39.md and
  PyCForge-1.3.39-Verification.txt for scope and verification.

# PyCForge 1.3.38 — Runtime text layout and normal editor scrollbars

- Add Runtime center, ljust, rjust, zfill and expandtabs with Unicode character
  widths, bound/expanded calls, argument validation, and bounded output work.
- Default both Python panes to ordinary vertical/horizontal scrollbars. Retain
  diagnostic, Find and ForgeLens navigation without the overlapping marker rail.
- Fit gutters to the text viewport; correct orientation-specific handle sizing,
  scroll-area corner painting and editor edge clipping in Python and Generated C.
- Extend executable HTML Help; preserve README, dependencies and theme artwork.
- See PyCForge-1.3.38-Verification.txt and specifications/text_layout_scrollbars_1_3_38.md.

# PyCForge 1.3.36 — Separate Typed C module exports

- Export a fresh Typed conversion as one C source/header pair per module,
  shared type declarations, and a machine-readable C ABI manifest in a ZIP.
- Preserve validated function bodies and existing generated symbols. Resolve
  helper dependencies per translation unit; keep support helpers internal.
  Check portable filenames, C11 significant symbol prefixes and complete emission ranges.
- Add File → Export C Modules in the existing matte custom chooser. Build archives
  off the UI thread and atomically publish only while the exact Typed result is fresh.
  Pending text/identity edits immediately retire export authority. Existing Save C,
  ForgeLens and Compile continue to use the unchanged single-file result.
- Document C parameter declarations, file status arguments and ownership.
  HTML Help includes an executable API export and separate C caller; README unchanged.
- Runtime exports still require a shared-context ABI design. No new Python syntax,
  dependencies, stable cross-release binary ABI, or automatic record boundaries are claimed.
- See PyCForge-1.3.36-Verification.txt and specifications/module_exports_1_3_36.md.

# PyCForge 1.3.35 — Runtime text parsing coverage

- Add rsplit, splitlines, partition/rpartition, and exact prefix/suffix removal.
  Support Unicode whitespace/line boundaries, embedded NUL, bound methods,
  keyword forms where Python permits them, and supplied-module parser helpers.
- Charge text scanning/comparison work to the existing execution budget;
  preserve terminal allocation/work failure semantics and arena ownership.
- Extend HTML Help with executable configuration and filename parsing examples.
  Keep the matte UI, README, dependency list and Typed contracts unchanged.
- Verification details and platform limits: PyCForge-1.3.35-Verification.txt.

# PyCForge 1.3.34 — Runtime text update modes

- Add r+, w+, a+, and x+ UTF-8 file workflows in Runtime conversion.
  Require successful seek between reads and writes. Append-update begins at
  EOF and preserves append semantics; exclusive-update preserves existing files.
- Reject nonzero read-derived bookmark writes before changing data.
  Such bookmarks still replay reads. Tell/flush cannot bypass direction checks.
- Keep budgets cumulative, avoid input-stream fflush, and close streams on
  positioning failures. Internal file layout changed: regenerate C/rebuild callers.
- Add HTML Help with three runnable examples, mode comparison and precise limits.
  README, matte UI, dependencies and Typed conversion contracts stay unchanged.
- Verification details and platform limits: PyCForge-1.3.34-Verification.txt.

# PyCForge 1.3.31 — Runtime text bookmarks and exclusive creation

Runtime UTF-8 file workflows now support tell and bounded seek: restore a
bookmark on the same open handle, rewind, retain the current position, or
move to EOF. Unicode/newline lookahead is preserved; file iteration's telling
restriction is observed. Bookmarks are opaque, handle-local values, not
character indexes or portable offsets. Host C long limits still apply.

Mode x creates a new file without overwriting an existing destination.
FileExistsError is admitted as a recoverable builtin exception, with OSError
and Exception parent matching. Writes after creation can still leave partial
files on failure. Conversion itself performs no source-program file I/O.

Seeking never resets resource counters. Bookmark storage is released on all
close paths; live-file collection refusal and closed-handle collection remain
intact. Internal PFile layout changed: regenerate C and rebuild callers.
No dependency, UI control, save workflow, or README changes.

HTML Help adds File bookmarks and exclusive creation, with runnable examples,
search entries, precise limits, and updated file/exception references. See
specifications/runtime_file_positions_1_3_31.md and the release verification
report. Native Windows acceptance remains outstanding.

Remaining work includes Runtime C-module exports with a shared-context ABI, binary file profiles and broader update semantics,
Typed record boundaries, and automatic collection with live temporary roots.

---

# PyCForge 1.3.30 — Explicit Runtime memory reclamation

C callers can now use pv_collect between completed Runtime calls to reclaim
unreachable values and cycles while retaining supplied PV roots and context
state. Precise, non-moving tracing covers closures/defaults, shared containers,
objects/methods, iterators/views, module bindings, and closed file handles.
Released file-read buffers also return retained-file capacity.

Collection is opt-in at idle C-call boundaries. It does not run inside Python
loops or automatically at allocation failure, and it does not reset work/file
budgets. Active calls/files, errors, invalid root metadata, and collector
scratch allocation failure refuse collection before any sweep. Retained PVs
must be supplied on each call; raw pointers alone are not roots.

Internal allocation/closure layouts changed: regenerate C and rebuild callers
together. Existing no-collection callers keep their original arena lifetime.
No dependency, UI component, save workflow, or README changes.

HTML Help adds Runtime memory and collection with a verified C caller and
updates lifetime/file-budget guidance. See specifications/runtime_collection_1_3_30.md.
Automatic collection within executing functions remains separate work requiring
live temporary roots. Other queued upgrades include module .h/.c exports,
expanded file profiles, and Typed record boundaries.

---

# PyCForge 1.3.29 — Runtime validation and ForgeLens

Runtime conversion now records exact source-to-C emission ranges and checks
final output through a separate validator before publication. Checks cover
source identities and AST ranges, complete output byte coverage, Unicode
coordinates, C lexical balance, callable declarations/definitions, and local
jump destinations. ForgeLens uses the established authenticated workspace
integration. Shared Runtime support remains C-only.

PYC4698 reports internal validation failures without publishing new C. PYC4699
continues to explain Runtime's contract: structural/provenance checks do not
prove semantic equivalence or replace external compilation and testing. The
Typed C-IR proof pipeline and Runtime arena lifetime remain unchanged.

The requested scan/diagnostics audit found and fixed quick diagnostic navigation
for untouched CRLF/CR files. Real edits, including edit followed by undo, still
retire old diagnostic and scan locations. No replacement controls or new
save workflow; the existing theme and components are retained.

HTML Help adds Runtime validation and ForgeLens, with a verified example and
updated contract/inspection guidance. README remains byte-for-byte unchanged.

Next conversion work: value reclamation for long-running contexts, separate
C-module exports, expanded file profiles, and Typed record boundaries.
See specifications/runtime_validation_1_3_29.md and the verification report.

---

# PyCForge 1.3.28 — Runtime exception recovery

Runtime conversion now supports selected `try`/`except`/`else`/`finally`
control flow and builtin raises with optional literal messages. Matching
handlers recover from ordinary runtime errors across calls and supplied
modules. Cleanup preserves nested return, break, continue, and error order;
file contexts close before control reaches an enclosing handler.

Exception names are a closed documented set. Exception objects, `as` bindings,
bare re-raise, chaining, exception groups, and custom exception classes remain
unsupported with PYC4630 diagnostics. Allocation and execution-resource
failures stay terminal: Python cleanup bodies are skipped after exhaustion,
while automatic file cleanup still runs. Runtime context lifetime and the
remaining ForgeLens/C-IR limitations are unchanged.

HTML Help adds Exceptions and cleanup with executable examples, searchable
reference entries, supported boundaries, and file/error guidance. README is
byte-for-byte unchanged from 1.3.27. No dependency or save-control changes.

This is the first stage of the accepted conversion upgrade program. Runtime
validation/mappings, value reclamation, separate C-module exports, expanded
file profiles, and Typed record boundaries remain subsequent work.
See specifications/runtime_exceptions_1_3_28.md and the release verification
report for scope and measured evidence.

---

# PyCForge 1.3.13 — multiple inheritance conversion

Runtime mode now converts multiple inheritance between declared classes with
Python C3 method ordering, cooperative super calls, shared diamond fields,
constructor selection, and subtype recognition through every base. Imported
and re-exported bases retain their identity. Duplicate bases, inconsistent
orders and field/method collisions reject conversion with source diagnostics.
The complete ancestor closure remains bounded to 64 user classes plus object.

Existing single inheritance and flat ordinary method dispatch are retained.
No package dependency was added. Properties, static/class methods, dynamic
bases and custom descriptors remain outside the documented class profile.
See specifications/multiple_inheritance_1_3_13.md and the release verification
report for the contract and measured checks.

---

# PyCForge 1.1.10 — connected UTF-8 file workflows

Runtime functions can now read text, process it through local or imported
helpers, and write or append results. Scoped open calls support character-sized
reads, line iteration/readlines, write/writelines, flush, and early close.
UTF-8 contents support embedded NUL; paths support Unicode and reject NUL.
Newline=None and newline="" have distinct documented translation behavior.

Cleanup covers normal exits, return, break, continue, failed later opens, and
runtime errors. Handles passed to helpers share their cursor; returned text
outlives its handle. Per-context limits bound open handles, operations, retained
read buffers, and per-handle input consumption. Obsolete transient read buffers
are reclaimed while public values retain the established arena lifetime.

The 21-page HTML Help is a user manual with no development-cycle status. It
adds complete read/process/write examples, a three-module report, input and
expected output files, operation tables, newline rules, and error guidance.
Stale module-limit and install examples were corrected. README retains its two
original screenshot links and 200-line limit. Dependencies are unchanged.

Typed file functions retain their external status-pointer ABI; connected file
calls use Runtime mode. Exception recovery, independent runtime C-IR validation,
and exact runtime ForgeLens mappings remain outside this delivery. PYC4699 is
retained. Native Windows acceptance is pending; no PyPI publication occurred.
See specifications/runtime_files_1_1_10.md, fixtures/runtime_files_1_1_10, and
evidence/files_1_1_10 for the contract, runnable report, and validation evidence.

---

# PyCForge 1.1.9 — runtime programs across supplied files

Runtime conversion now accepts explicit source bundles. Named imports, module
aliases, re-exports, imported classes/functions/constants, and immutable
scalar/tuple module constants work with the existing runtime operations.
Namespaces remain separate. Imports and defaults initialize in source order,
once per C context; remaining supplied files initialize as explicit roots.

The workspace converts all open documents. CLI conversion/validation accepts
repeated `--module ID=PATH` and `--module-id ID`. C runtime failures now preserve
the logical source file and line. Runtime artifacts can be inspected with the
CLI. No installation dependency changed.

Relative/star/local/conditional/cyclic imports, implicit packages, file discovery,
writable globals, and general module execution remain excluded. Runtime file
I/O and exception recovery remain the next coverage work. Runtime C-IR proof
validation, exact ForgeLens mappings, and reclamation during a context lifetime
remain unfinished. The development warning is retained. Windows acceptance is
pending; no PyPI publication is part of this release.

See `specifications/runtime_modules_1_1_9.md`, the four-file invoice fixture,
and `evidence/modules_1_1_9/` for contracts, examples, and recorded verification.

---

# PyCForge 1.1.8 — everyday runtime conversions

Runtime conversion now implements sum, min/max (key/default), abs, round,
any/all, stable sorted and list.sort (key/reverse), lazy enumerate and zip
(including strict), iter/next, and builtin function values such as key=abs.
Lists add extend, pop, insert, remove, reverse, clear, copy, and index; tuples
also add index. Shared list identity is preserved through mutations.

F-strings, format(), and str.format() share bounded precision, width,
alignment, sign, grouping, decimal/base and floating presentation. !s/!r/!a,
named/numbered fields, field access, and nested width/precision are supported.
Print/str/repr/ascii now render nested lists, tuples, dictionaries and views,
including cycle markers. Numeric rounding uses exact binary64 decimal digits.

Select Transpile → Runtime; the CLI uses --runtime-values. No installation
dependencies changed. The README retains exactly its two screenshot links.
The existing 20-page HTML Help now documents these operations and examples.

Runtime remains a bounded development backend: one source document, no imports,
module assignments, file I/O, exception recovery, generators or runtime sets.
Integers are checked int64; floating sums follow Python 3.12 compensated summation.
Formatting excludes locale-sensitive n, character c, z and custom protocols;
width is at most 1,000,000 and precision at most 1,000. Numeric formatting needs
C numeric locale and round-to-nearest. Values remain owned until pv_destroy().
Exact ForgeLens mappings and the typed C-IR validation path are still absent.
Native Windows acceptance and PyPI publication have not been performed.

See specifications/runtime_values_1_1_8.md for the conversion contract and
tests/test_everyday_runtime_1_1_8.py for native comparisons against Python.

---

# PyCForge 1.1.4 — ordered runtime dictionaries

Runtime value conversion now handles ordered mutable dictionaries, dictionary
comprehensions, dict[K, V] annotations, scalar/immutable-tuple keys, key deletion,
and get/setdefault/update/copy/clear/pop/popitem. Live keys/values/items views
support iteration, length, truth, membership, and list/tuple snapshots.

Shared references, first-insertion order, equal numeric keys, definition-time
defaults, and nested mutable values are preserved. A hash index supports ordinary
lookup workloads. Memory, work, missing-key, key-type, and iterator mutation
checks use the existing C context. Active dictionary iterators permit value
replacement and reject structural key changes, including equal-size changes.

The existing runtime action, CLI, and API expose these additions. Searchable
HTML help, the supported-conversions table, README, and examples describe the
implemented forms and boundaries. Both README screenshots retain their URLs.
No new dependencies, source execution, embedded C compiler, or PyPI publication
are introduced. See specifications/runtime_values_1_1_4.md and the new tests.

This is a development candidate with a documented Python subset. Native
Windows acceptance remains outstanding; performance needs workload benchmarks.

---

# PyCForge 1.1.2

## 1.1.2 conversion improvements

Built on the supplied 1.1.1 source. Choose **Transpile → Transpile Runtime Values (Preview)** for real runtime Unicode strings, shared mutable lists and class instances, mixed lists and tuples, union/container annotations, nested filtered list comprehensions, and lambdas with captured cells. The default typed converter remains available.

The preview emits self-contained C11 with an explicit arena and checked runtime operations. It converts one document and always identifies its development status. Exact ForgeLens mappings, the established C-IR proof guarantees, complete Python coverage, and native Windows validation are not yet provided by this new backend. Read [the preview contract](specifications/runtime_values_1_1_2.md) for supported forms, memory ownership, type-check boundaries, and remaining work.

The embedded Ting execution runtime is now **0.10.0a21**. PyCForge installs **NumPy 2.3.x and Numba 0.63.x** with PySide6 and supports Python **3.11–3.13**. The existing splash warms real numeric kernels on a background worker while the interface stays responsive.

PyCForge performs Python-to-C source conversion. C-to-assembly belongs to the separate **PlutoAI** project. No 1.2 compiler integration is included.

```bash
python -m pycforge convert example.py --runtime-values --output generated.c
```

The material below describes the preceding default-profile history unless explicitly updated.

---

# PyCForge Professional Conversion Roadmap

This roadmap extends the bounded converter toward a professionally trusted
Python-to-C IDE. It does not propose accepting arbitrary Python. Every feature
must preserve deterministic output, fail-closed behavior, explicit ownership,
bounded resource use, source mapping, stable diagnostics, and a documented C
ABI.

## Promotion rule for every conversion

A conversion is not complete when the parser accepts it. Promotion requires:

1. an exact Python source profile and explicit rejected neighbors;
2. semantic obligations for evaluation order, exceptions, overflow, aliasing,
   lifetime, ownership, and observable results;
3. bounded analysis facts with deterministic serialization and invalidation;
4. one or more named rules and complete RulePlan coverage;
5. structured C IR, validation, and provenance before rendering;
6. stable diagnostics with actionable remediation;
7. resource-policy limits and cancellation points;
8. accepted, rejected, mutation, determinism, serialization, and budget tests;
9. external C compilation plus Python-versus-C differential behavior tests;
10. Help, API, CLI, feature-matrix, and release-note updates; and
11. an explicit contract-identity bump whenever generated behavior or text
    changes.

## Ting capability-packet model

Ting should govern each expansion as a modular capability packet, not replace
the converter's Python parser, analyzers, C-IR lowerers, or runtime helpers.
Every new conversion family supplies typed evidence to six independently
reconfigurable roles:

| Agent role | Required conversion evidence |
|---|---|
| Syntax | admitted source shape, annotations, and proved bounds |
| Semantics | evaluation order, scope lifetime, and mapped failure paths |
| Ownership | representation, aliasing, allocation, cleanup, and escape proof |
| Lowering | registered lowerer, helper closure, and validated C IR |
| Verification | differential, compiler, diagnostics, and documentation evidence |
| Capability | registered provider/runtime strategy and resource ceilings |

The public runtime parses and verifies precompiled `.ting` Compact-IR
artifacts. Editable RuleSpec source parsing and artifact compilation remain in
the separate private compiler custody package. A role can be reconfigured or
an additional typed role appended through a new digest-bound rulepack without
adding role-specific branches to the coordinator.

Pruning remains proof-preserving: all core roles run, exact schema/equality
indexes reduce work inside a role, finite budgets reject on exhaustion, and
future optional-role pruning requires authenticated capability profiles plus
exhaustive-versus-pruned equivalence evidence. This keeps expansion fast
without removing negative-edge proof coverage.

## P0 — trust foundation

These items should precede major syntax growth.

### Warning-clean generated C

- Parenthesize the UTF-8 helper's mixed logical expression.
- Compile every accepted fixture with GCC, Clang, and MSVC at high warning
  levels, including a warnings-as-errors profile.
- Add AddressSanitizer and UndefinedBehaviorSanitizer runtime checks where the
  external test environment supports them.
- Keep all compiler and executable invocation outside the PyCForge product.

### Differential semantics harness

- Execute admitted Python only in a disposable external test runner, never in
  the converter or IDE.
- Compile and execute generated C in a separate disposable runner.
- Compare return values, status results, output bytes, and selected failure
  paths over fixed cases and generated boundary cases.
- Record compiler, target, flags, seed, input, output, and artifact hashes.

### Active machine-readable capability contract

- Add an additive Phase 16 feature matrix while preserving the frozen 0.14.3
  checkpoint file.
- Make Help pages and conformance tests reference the active matrix identifiers.
- Expose “supported here / rejected here / why” in the IDE without making the
  presentation layer authoritative.

### Supply-chain and release evidence

- Produce checksums, a software bill of materials, dependency-vulnerability
  results, wheel/sdist member inventories, and reproducible-build notes.
- Test clean installation and removal on supported Python and operating-system
  combinations.
- Sign release artifacts only through a documented PyPI publishing process.

## Implemented in 1.1.0

Checked scalar declarations, chained/flat-unpacking/augmented assignments,
closed static module bindings, and allocation-free borrowed UTF-8 length,
comparison, prefix/suffix, search and membership are implemented. Constant
string construction and selected methods are also admitted. See
`specifications/scalar_strings_1_1.md`. Owned dynamic strings remain below.

## P1 — high-value conversions

### Owned UTF-8 strings

Current strings are principally literals or borrowed/owned values in narrow
profiles. Introduce one explicit string representation and ownership model,
then add in this order:

- `len(text)` in Unicode code points or UTF-8 bytes, with the choice explicit;
- equality and ordered behavior only where Python semantics are proved;
- concatenation with checked allocation and overflow;
- static and then proved dynamic indexing/slicing;
- selected `startswith`, `endswith`, and `find` profiles; and
- conversion between supported scalar values and strings only after formatting
  behavior is frozen.

Every operation needs invalid-UTF-8, allocation-failure, NUL, and cleanup
coverage.

### General result and error channel

Several useful Python features can fail at runtime. Define a uniform generated-C
result convention before adding them:

- stable status namespace and per-function propagation rules;
- value-plus-status or tagged-result ABI policy;
- deterministic cleanup on every exit edge;
- mapping from supported Python failure classes to documented status values;
  and
- composition across direct source-function calls.

This foundation is required for dynamic division, allocation-backed strings and
containers, expanded file operations, and selected exception handling.

### Numeric completeness inside the declared domain

- Dynamic integer `//`, `%`, and `divmod` with zero and overflow handling.
- Checked signed-64 `+`, `-`, and `*` if overflow is to reject or report rather
  than remain a caller precondition.
- Bitwise operations and shifts with exact negative and width semantics.
- Bounded integer power and selected floating operations with documented
  exceptional values.
- Explicit conversion built-ins: selected `int`, `float`, and `bool` forms.

Do not imply Python arbitrary-precision integer semantics while mapping to
`int64_t`.

### Functions and calls

- Positional and keyword defaults whose values are compile-time constants.
- Acyclic recursion first, then bounded recursion only with an explicit stack
  and failure policy.
- Tuple or record multiple-result profiles with ownership defined.
- `None`/`Optional[T]` through an explicit nullable or tagged representation.
- Selected pure built-ins with direct rule identities.
- Argument unpacking and variadics only after bounded arity and allocation
  policies exist.

### Multi-file C output and ABI design

- Emit deterministic `.h` and `.c` translation units per source module.
- Separate internal symbols from exported entry points.
- Define name mangling, include guards, dependency ordering, and collision
  diagnostics.
- Generate a machine-readable ABI manifest for external callers.
- Preserve a single-file mode for inspection and small conversions.

### Dynamic containers

Start with homogeneous owned vectors and maps rather than emulating every
Python object:

- empty literals with required annotations;
- checked dynamic indexing and negative indexes;
- append/update operations with capacity and allocation proofs;
- bounded slicing and membership;
- `enumerate` and `zip` over admitted fixed or owned sequences; and
- list/dictionary comprehensions with one bounded iterator and no hidden
  control effects.

Aliasing, iterator invalidation, element ownership, and failure cleanup must be
defined before mutation is enabled.

### Expanded file profiles

Build on the current closed UTF-8 profile:

- append and exclusive-create text modes;
- `readline`, bounded line iteration, and explicit newline translation;
- multiple ordered operations in one context;
- binary reads/writes using an owned byte-buffer type;
- seek/tell only for seekable regular-file profiles; and
- explicit path and permission error reporting.

Keep arbitrary file objects, implicit encoding, ambient standard streams, and
conversion-time file access outside the initial expansion.

## P2 — structured application code

### Records across boundaries

- Pass and return records by a frozen value or pointer ABI.
- Permit controlled field mutation with uniqueness or borrow proof.
- Support module-exported record declarations and generated headers.
- Add selected `dataclass` syntax only as sugar for the explicit record model.

### Selected exceptions

- Begin with converter-defined runtime failures mapped to the general result
  channel.
- Add `try`/`finally` for deterministic cleanup before `try`/`except`.
- Admit a closed set of exception types and statically resolvable handlers.
- Preserve bare `raise`, chaining, traceback, and dynamic exception objects as
  unsupported until an explicit runtime model exists.

### Iteration and comprehensions

- Formalize a bounded iterator protocol for admitted containers and files.
- Add generator-free comprehensions over one then multiple bounded iterators.
- Preserve evaluation order, filter short-circuiting, target lifetime, and
  allocation rollback.

## P3 — defer until a runtime strategy exists

General classes and inheritance, descriptors, reflection, dynamic imports,
closures with escaping state, generators, coroutines, `async`/`await`, pattern
matching with dynamic guards, monkey patching, and arbitrary third-party
packages require a Python runtime model or whole-program restrictions well
beyond the current product. They should remain explicit rejections rather than
marketing promises.

## Professional positioning

Until those later profiles exist, the accurate description is:

> PyCForge is a deterministic, evidence-producing IDE for converting a
> documented, statically proved subset of Python into reviewable C11 source.

Trust should come from exact scope, reproducible evidence, clear rejection, and
external conformance—not from claiming complete Python coverage.
