The governing decision
Long-term product objective: make PyCForge a dependable, programmable conversion platform. A human programmer and an AI system must each be able to construct a useful conversion extension through the SDK’s public API, while Crucible’s public API supplies the modular semantic services that carry it out. Practical API usability and conversion reliability are core acceptance criteria. Desktop interfaces present those same tested services. Authorship by a person or an AI changes neither eligibility nor the evidence required before an extension is cleared for its declared use.
Engineering priority: correctness, modular conversion services, and usable plugin-extension APIs take precedence over conversion throughput. Additional conversion time is acceptable when it enables that architecture and its required checks. No fixed percentage slowdown may veto the modular design or justify bypassing validation. Measure costs and improve them when useful; a speed improvement is not a prerequisite. The first implementation work remains preparation of the existing engine.
Offline operation: after the applications and required local dependencies are installed, discovery, authoring, pre-scan, semantic checks, local fixture tests, compilation, package building, and registration require no internet service. Keep required catalogues, schemas, guidance, and check resources locally available. Missing local prerequisites produce an incomplete result instead of an automatic download. Installing or updating packages remains a separate deliberate activity.
Prepare the existing conversion engine first: preserve its working behavior, establish reusable Crucible services inside PyCForge, and prove their public contracts through both conversion routes. Prove minimal *import binding and the execution gate with the engine interfaces, publish the conversion landscape, and exercise a minimal SDK Python API and CLI against an installed expansion. Extend the sub-script’s options and region language before completing the separate SDK application.
The decisive acceptance testAdd a compatible conversion capability to PyCForge. Refresh its landscape in an unchanged SDK. Discover the new method, create a plugin using it, scan and test that plugin against the updated engine, and build its package without changing or rebuilding the SDK.
Routine engine capability additions must not require coordinated releases of both projects. SDK updates address its own tools or genuinely new communication/authoring requirements. This reduces duplicated knowledge and cross-project work; resource ownership and transformation scheduling still require explicit, tested engine contracts.
Revision 0.13 retains the earlier engine, API, editor, discovery, scan, sub-script, and execution requirements. It makes normal operation offline and records XML as a candidate for the installed catalogue/profile format. For that design, PyCForge exports XML and the SDK parses and validates it; Crucible continues executing its native rule and scan services. Format qualification remains an implementation gate. This revision reports no completed application implementation.
Two independent products
PyCForge contains Crucible, its sub-script implementation, landscape export, and public runtime services. PyCForge-SDK is a separate PyPI project with a documented public Python API, a general CLI, and a PySide6 editor/package builder. A finished plugin runs in PyCForge with no SDK installed.
Protected product behavior
Preserve the working document/project/session/recovery behavior. Generated C remains read-only. Typing, IME composition, and pauses after typing never trigger progress dialogs or executable plugin work. Plugin settings stay outside project/session schemas.
One owner for each responsibility
| Responsibility | Authoritative owner | SDK role |
| Conversion meaning | Crucible defines semantic services, types, eligibility, ownership/lifetime rules, route adapters, target contracts, and required validation. | Discover requirements, prepare requests, invoke the selected engine, and present its results. |
| Scheduling and composition | Crucible controls stage order, prerequisites, invalidation, conflict rejection, cancellation, and bounded transformation execution. | Expose advertised hooks/options and trace results. No independent scheduler for conversion semantics. |
| Conversion rules, catalogue, and guidance | PyCForge ships the authoritative Crucible rules and publishes classes, methods, signatures, hook/handle requirements, templates, examples, limits, known issues, deprecations, and diagnostics in a documented folder in its installed package. | Check that folder on every SDK startup, validate and refresh the published catalogue, then search/render it and invoke the selected engine for semantic checks. No independent copy of conversion rules is maintained by the SDK. |
| Sub-script language | PyCForge owns grammar, parsing, legal regions, parameter checking, and execution semantics. | Display engine-supplied reference material and submit usage examples to the engine for testing. |
| Semantic scan mechanics | PyCForge owns the versioned scan profiles, check dependencies/order, executable semantic checks, applicability rules, and pass/fail criteria. | Capture the exact add-on inputs, call the selected engine’s scan/test services, coordinate requested generic test tasks, and display structured results. No SDK-maintained semantic scan procedure. |
| Authoring and packaging | The SDK owns editing, scaffolding, general script/test orchestration, packaging, reports, and deployment client tools. | Public Python API, CLI, and GUI share the same authoring services. Engine-dependent scan decisions are obtained from Crucible. |
| Library-specific behavior | Plugin authors define supported operations and representations, implementations, dependencies, and reference tests. | Help express and verify those declarations through the public contract. |
| Installation and activation | PyCForge validates packages and owns its plugin registry and activation state. | Configure a destination and request explicit installation/registration through the public interface. |
Meaning of “SDK interpreter”: a general authoring/script runner that invokes the selected Crucible services. The SDK contains no second Python-to-C engine, independent eligibility model, or separate implementation of PyCForge’s sub-script. Code templates are inserted as source; selecting or refreshing methods does not execute them.
The SDK editor, offline catalogue browsing, scaffolding, and local format checks can work without PyCForge present. A new engine-dependent scan or conversion test requires a compatible selected engine. Headless commands create no Qt application and require no display. SDK GUI dependencies belong to the separate SDK installation; PyCForge has no SDK runtime dependency.
Behavioral interfaces and explicit eligibility
Define small abstract interfaces in P1 and prove their adequacy in P3. Use composition and reusable services so a new supported function does not need its own large class hierarchy or duplicated implementations for both conversion routes. Interface definitions and their structured descriptors live together in the engine project and are checked for consistency.
| Interface family | Required behavior |
| Operation / eligibility | Resolve the callable’s identity; assess input/result types, argument combinations, prerequisites, effects, errors, numeric rules, and target requirements; produce an explicit eligibility plan. |
| Type / ownership | Describe representation, borrowing, ownership transfer, aliasing, mutation, lifetime, and cleanup. Validate values crossing operation or region boundaries. |
| Conversion route | Consume the validated plan through the typed or runtime-value route. Declare shared implementation, route-specific implementation, or deliberate unsupported status for each advertised operation. |
| Registration / scheduling | Reject incomplete declarations, missing route decisions, incompatible prerequisites, ambiguous claims, and invalid composition. Schedule accepted transformations under engine control. |
Assess before converting: eligibility is eligible, conditional, or unsupported. Conditional results identify the unresolved obligations and how they will be established or enforced by generated checks. Unknown conditions never count as approval. Before publishing output, every required obligation must be discharged, represented by an accepted runtime check, or cause rejection. Conversion consumes the validated plan; it must not silently reassess the same function under different rules.
Register each new operation once against these engine-owned services. Abstract methods provide structural requirements; registration validation and behavioral tests establish whether an implementation meets the declared contract. Immutable data records may carry requests, plans, facts, and results. They do not substitute for the behavioral interfaces, and ownership logic must not be copied into route-specific records.
Structured extension boundary: permit plugin-defined operations and representations through documented semantic services, with checked translation into supported C structures or declared native calls. Core parsing, scope/binding, mandatory validation, publication, and scheduling remain authoritative. Hooks declare phase, required facts, effects, and invalidated facts. A plugin cannot bypass checks by claiming support or returning arbitrary replacement C text.
Keep ownership explicit: a borrowed view identifies its owner and lifetime; an owned native resource identifies acquisition, transfer, and cleanup obligations. Test early return, errors, mutation, aliasing, and cancellation where applicable. Sharing these contracts reduces duplicate work without making correct cleanup automatic.
The remaining executable contracts
The product direction is established. The missing detail is the exact contract an independently authored expansion must obey: the language it is written in, the values it receives, the methods it may call at each stage, the namespace it exports, the evidence it supplies, and the failures it can report. These contracts must be exercised in the current engine before a complete SDK interface depends on them.
Sequence correctionMinimal *import cannot wait until P4. P2’s installed external conversion requires its parser, namespace binding, and shared Run Python gate. Implement the minimal form in P1 and prove it in P2; reserve P4 for richer typed options, requirements, legal regions, and composition. Compatibility rules, a bounded execution path, and independent package validation also need a working minimum before the first external package runs. P5 and P8 harden and qualify those mechanisms rather than introducing them for the first time.
| Missing contract | Required decision and proof |
| Authoring language | Recommendation for P1: ordinary Python implementation files using a documented public Crucible API, with declared Python-version and dependency requirements. The SDK supplies an editor, runner, scanner client, and packaging services. Its method tree describes that API. If a custom SDK language is required instead, define its grammar, types, interpreter, diagnostics, and versioning as separate work; do not silently assume such an interpreter already exists. |
| Symbols and types | Define stable operation/type IDs, export names, signatures, overload resolution, result types, nested types, method dispatch, and name-collision rules. Record which route/target combinations support each operation. A published method name is insufficient to establish callable semantics. |
| Handles and lifetimes | Define engine-issued handles for symbols, types, values, regions, and resource descriptions. Identify their conversion job, source/IR revision, allowed operations, and valid stage. Reject fabricated, stale, cross-job, wrong-kind, and disallowed-stage use. A compiler handle’s lifetime is distinct from ownership of the resource in the generated C program. |
| Hook order | Every hook declares its stage, required facts, produced facts, effects, invalidated facts, and supported routes/targets. Crucible constructs a deterministic dependency schedule. Reject cycles, unavailable prerequisites, ambiguous writers, and impossible stage order. A tree position, filename, package discovery order, or numeric priority cannot substitute for dependencies. Invalidation requires affected analysis/checks to run again; repeat passes only under a documented convergence rule and execution bound. |
| Native contract | Define C representations, ABI/layout, ownership transfer, cleanup, argument evaluation order, mutation, numerical policy, and runtime failure behavior. Distinguish compiler-side Python dependencies from generated-program headers/libraries. A claim of C11 compatibility must be exercised against the declared compiler and target; source generation alone does not establish linkability or behavior. |
| Identity and evolution | Separate package format, engine API, scan profile, catalogue schema, SDK API, and interpreter/target compatibility. Specify required-feature negotiation and incompatible-change behavior in P1; qualify an initial version through P2/P3. Pin package and dependency identities for each conversion job. Define activation, replacement, removal, rollback, and invalidation without changing an in-flight job’s provider. |
Order inside one conversion: recognize declarations and preserve source locations; resolve the registered namespace and bind symbols; establish types, eligibility, ownership and effects; schedule allowed transformations; re-establish any invalidated obligations; lower through a declared route; validate the result; publish only on success. Some analyses may need bounded iteration rather than a single linear pass. All routes must use the same applicable semantic decisions. Native compile/link and reference execution follow where the scan or build profile requires them.
The class tree exposes the supported public authoring surface. It does not expose every private interpreter method or permit arbitrary calls into an internal pass. Registration declarations, generated code, and catalogue descriptions must agree. A wrapper around an unchanged monolith does not establish modularity unless the real conversion paths consume these shared services.
Two public APIs, one conversion authority
Both APIs are product interfaces with documented installed import paths, typed requests/results, diagnostics, compatibility rules, and executable examples. A command-line wrapper alone does not establish an importable SDK API. Design and test direct Python use alongside the noninteractive CLI; the PySide6 application consumes the same authoring services.
| Public surface | Required responsibility | Usability proof |
| PyCForge / Crucible API | Discover capabilities; accept source bundles and extension declarations; resolve symbols; establish eligibility, ownership, effects, and route/target requirements; schedule conversion; return validated artifacts and structured diagnostics. Preserve engine authority over checks and registration. | An installed external client uses documented semantic services to implement and exercise an extension, including rejected inputs and cleanup paths, without private imports or a core patch for the supported case. |
| PyCForge-SDK Python API | Select an engine; discover/describe methods; scaffold a plugin; submit scan/test work; inspect findings and reports; package an approved snapshot; and request explicit registration. Keep conversion meaning in Crucible. | A short standalone Python client completes the authoring workflow with structured results, without parsing CLI text, constructing Qt objects, or opening a display. |
| SDK CLI and PySide6 application | Expose the same authoring operations through JSON commands and human-facing controls, with explicit engine/target selection and equivalent validation. | The same saved inputs and policy produce equivalent eligibility, diagnostics, check status, approval identity, and package content across clients. Document any intentional presentation differences. |
Contracts for automation: define schemas, status/error categories, progress, timeouts/cancellation, source locations, and request/result identities. Callers must distinguish success, rejection, incomplete checks, cancellation, and internal failure without interpreting prose. Version the SDK’s public API independently from the engine API and communication protocol; document compatible evolution and deprecations. Public SDK imports and headless operations must not initialize or require Qt.
Practical authoring: deliver examples that let either author discover a method, understand its limits, implement a conversion expansion, interpret a diagnostic, correct the source, and re-run the required checks. An AI uses the public SDK API through its execution tools or the CLI; neither path has a validation bypass. Final signatures are implementation deliverables, not promises that these proposed interfaces already exist.
The engine-owned conversion landscape package
PyCForge ships the rules. Every PyCForge release includes Crucible’s authoritative semantic implementations and a machine-readable conversion landscape in a documented public folder inside the installed PyCForge package. Include that folder in both wheel and source distributions. The public discovery contract identifies its location and the selected engine; the SDK does not guess private source paths or reconstruct rules by inspecting implementation files. Generate catalogue structure from registered public interfaces and check authored guidance/templates against those interfaces. The discovery endpoint exposes the same identity and contract as the folder.
The SDK stays general. It provides the Python API, CLI, editor, tree renderer, templates, scaffolding, generic format checks, test orchestration, packaging, and reports. Engine-specific eligibility, ownership/lifetime, hook ordering, conversion, and mandatory semantic validation remain in Crucible. The SDK reads their published descriptions and invokes the engine services that enforce them. A cached catalogue is a versioned view of PyCForge’s information, not a separately maintained rule set.
| Landscape content | Purpose |
| Identity and compatibility | Exact engine build/version, runtime API version, communication protocol, landscape schema/revision/hash, language version, required client features, and supported modes/targets. |
| Method structure | Stable namespaced method IDs, public class/interface IDs and ownership, groups and ordering, signatures, argument/result schemas, public import or invocation paths, and supported options. Class/interface descriptors drive tree grouping and visibility controls without private-source inspection. |
| Semantic requirements | Eligibility conditions, ownership/effect contracts, permitted phases, route support, target/native requirements, and explicit limits. Structured descriptions guide authoring; executable enforcement remains in the engine. |
| Authoring material | Call templates, editable placeholders, required imports, examples, concise explanations, sub-script usage, and links between related methods. |
| Issues and lifecycle | Known issue IDs, affected methods/versions/targets, severity, limitations/workarounds, deprecation status, and replacements. Semantic blockers must also be enforced by the engine. |
| Scan and test contract | Versioned required check profiles and ruleset identities; applicability, prerequisites, execution order, required client features, supported fixture/result formats, completion criteria, diagnostic codes, source locations, and corrective guidance. Executable semantic checks are owned and run by the selected engine. |
XML candidate: PyCForge writes, the SDK reads
XML is a candidate for the offline publication of the catalogue, class/method hierarchy, type/handle descriptions, scan profiles, and build requirements. It can express nested definitions and named references with a versioned schema. Prototype the format and parser/validator choice in P1/P2 before freezing the contract. This does not change the native Python API or the established JSON output of CLI commands.
| Component | Responsibility |
| Crucible inside PyCForge | Own registered rule objects, semantic implementations, eligibility, scheduling, and scan services. Execute those native services without reading the exported XML back in. |
| PyCForge catalogue exporter | Serialize the registered public definitions into XML, with proper escaping, stable identifiers, versions, hashes, templates, and references to public services. Ship the exports and schemas in the published installation folder. This is a writer/exporter, not a runtime XML parser. |
| SDK catalogue reader | Parse XML, validate its structure and supported schema/features, load the shared catalogue model, refresh the tree and guidance, and obtain scan/build requirements. The parsing and schema-validation dependency belongs to the SDK and must work without Qt. |
| SDK Scan and Build | Use the parsed descriptors to request the selected engine’s versioned semantic checks and coordinate its declared generic tasks. Report engine results; do not reinterpret conversion semantics independently. |
One source of meaning: generate XML from the same registered definitions and check profiles that Crucible executes. Do not keep a second hand-maintained XML rule implementation or make PyCForge ingest its own export to discover its rules. Validate the exported format with the SDK reader or a separate conformance harness during development/release qualification. No production XML parsing dependency is required in PyCForge for this catalogue design.
What XML can describe: class/interface and method IDs; signatures and typed parameters; editable templates and explanations; handle/ownership requirements; scan-profile IDs, check references, prerequisites, and applicability; target/toolchain/build requirements; diagnostics and known limitations. Build descriptions refer to supported public services and declared capabilities. Reading XML never executes embedded scripts, templates, or arbitrary commands. File names and the division into catalogue, types, scan profiles, and build profiles remain draft layout choices.
Two validation layers: the SDK’s local XML/schema checks establish document structure, required fields, supported versions, and declared references. Crucible establishes semantic eligibility, legal hook order, handle lifetimes, conflicts, and actual conversion correctness through its required checks and fixtures. A schema-valid XML document is not proof that a dependency graph is acyclic or an expansion is correct. Preserve the distinction in diagnostics and scan status.
Local parsing contract: bundle the required schema files and resolve only declared local resources. Do not fetch schemas or entities from the internet or process arbitrary external references. Disable DTD/external-entity processing and automatic XInclude, and enforce bounded document size/depth. Use a headless parser/validator shared by SDK API, CLI, and GUI. Version optional extensions and required client features explicitly; unfamiliar required semantics must produce incompatibility rather than guessed behavior.
Acceptance evidence: exercise catalogue export and SDK parsing with internet access blocked, no Qt application, missing/invalid resources, unknown required features, and an unchanged SDK consuming a compatible updated engine export. Verify class/method loading, local schema checks, engine-owned scan execution, and local build requirements. Test that a structurally valid but semantically invalid profile still fails through Crucible. Required parser/validator dependencies must be available locally before these checks begin.
Format references: Python ElementTree, W3C XML Schema, and lxml validation. ElementTree provides XML parsing/writing; XSD validation requires an explicitly selected validator. These references inform the prototype and are not runtime network dependencies.
Refresh from the selected PyCForge installation at startup
On first setup, select the PyCForge installation or its Python environment and remember it in SDK settings. Resolve the published catalogue folder through the installation’s public discovery contract; do not assume the SDK and PyCForge share one environment. The folder layout and manifest format are P1/P2 deliverables. They are part of the compatibility contract.
- Locate: on every SDK launch, locate the selected installation and its published catalogue folder.
- Check: read its manifest/index and verify engine identity, API/protocol compatibility, schema version, catalogue revision/hash, and required resources.
- Refresh: if the advertised content has changed, read and validate the complete listed catalogue. Reuse an already validated cache only when its identity/hash still matches; never skip the startup identity check.
- Replace together: install the new validated catalogue in the SDK cache as one operation, so a partially updated folder cannot produce a mixture of old and new definitions.
- Present: update classes, methods, explanations, call templates, prerequisites, limits, and known issues. Retain source edits and saved class visibility selections by stable IDs.
Apply the same discovery/check behavior when a headless SDK API session connects and when a CLI command selects an engine. Keep an explicit Refresh action for updates while the SDK remains open. Before engine-dependent scan/test work, verify that the responding engine and applicable contract match the selected catalogue; a changed installation requires refresh and re-established check applicability.
Startup refresh reads data: it does not scan the author’s expansion source, execute a plugin, run inserted templates, copy engine implementation code into the SDK, or install/update either product. Read the manifest-listed resources through the public format. Engine-dependent work remains an explicit request through Crucible. Catalogue refresh never rewrites existing plugin source.
Unavailable or incompatible installation: keep the last valid catalogue for clearly labeled offline browsing/editing. Do not present cached information as verified against the current installation. Missing files, partial upgrades, invalid content, and incompatible required schemas/features prevent the refresh from replacing the valid cache. New engine-dependent approval requires a compatible available engine; cached descriptions alone cannot approve a conversion.
Two different folders: the published rules/catalogue folder belongs to the selected PyCForge installation and is read by the SDK. The user-selected conversion add-ons folder contains authored expansion packages that PyCForge registers. Catalogue discovery does not install or activate packages from the add-ons folder.
Compatibility rule: additive methods, groups, descriptions, and templates within the supported schema must work in an unchanged client. Optional unknown fields may be ignored only as the schema permits. An unknown required field, semantic feature, or incompatible major version must produce an explicit incompatibility result. The SDK must not guess at an unfamiliar required behavior. A new protocol or authoring primitive can require an SDK update; ordinary method additions must not.
Data stays data: rendering and searching the catalogue execute no plugin code or embedded executable update hooks. Templates become editable source only after insertion. Engine-dependent work runs through an explicit request. Scan evidence records the exact landscape/check profile used; refreshing relevant inputs makes prior approval out of date until applicability is re-established.
Application version, SDK version, SDK public API version, and engine runtime API version remain independent. Version the communication protocol and landscape schema explicitly as well. Plugin manifests require engine capabilities/API compatibility, not matching SDK and PyCForge release numbers. Known-issue information is current to the selected landscape revision, not an implied live internet feed.
One authoring service, API, CLI, and editor
Build the minimal SDK Python API, command-line client, and conformance harness first. Complete and qualify the headless authoring services before the GUI; the GUI invokes those same services. An AI system must be able to inspect the landscape and perform the workflow without reading screenshots, scraping prose, or opening a window.
| Operation | Required API / command-line behavior | Editor equivalent |
| Discover / describe | Select an engine, check its published catalogue folder at session startup, refresh/export its landscape, and query groups or stable method IDs as structured API data or CLI JSON. | Refresh the left-side method tree; single-click displays the method explanation in the upper detail area. |
| Create / template | Generate a plugin skeleton, manifest, call template, and relevant starter fixtures from the discovered contract. | Guided setup; double-click inserts the template at the cursor with editable placeholders and required imports handled once. |
| Scan / test | Capture inputs, perform generic local format checks, and invoke the selected engine’s current scan profile and ordered validation/test services. Return structured findings, source locations, and check status; map the API result to documented CLI exit codes. | Explicit Scan/Test actions; selecting a finding opens the source location in the single editor. |
| Build | Package the exact approved content and metadata; output the container and readable/machine-readable verification report. | Build Plugin becomes available for the applicable approved snapshot. |
| Install / register | Use an explicit target and destination; call the host registration service and report the resulting identity/version. | Tools menu and top plugin icon open the same configuration dialog; an explicit action installs the completed package. |
API names and command names remain design placeholders until their contracts are implemented. Commands must support noninteractive use, documented exit status, stable JSON schemas, diagnostics separate from machine-readable output, timeouts/cancellation, and explicit engine/target selection. Creating source does not install it. Missing prerequisites produce an incomplete result rather than success. API, CLI, and GUI callers use the same checks and receive no alternative bypass.
The agreed SDK method tree and editor
A separate PySide6 application in PyCForge’s theme, with one source editor and no tabs. A searchable method tree on the left groups the selected engine’s public Crucible classes/interfaces, with their published interpreter/API methods underneath. Grouping and ordering come from the landscape. The explanation area sits above the source editor. Completion and insertion templates use that same catalogue. Work on one conversion add-on at a time, starting with its primary implementation file.
Single-click a method: show its explanation in the upper detail area, including purpose, parameters/results, permitted stage, required handles and prerequisites, eligibility, ownership, route/target support, known issues, and an example. Double-click a method: insert its general editable call template at the cursor in the SDK source editor, with clearly marked argument placeholders and required imports handled once. Unresolved required placeholders are scan findings that prevent approval. Insertion changes source; it does not run the method, scan the plugin, or begin conversion. Execution and checks use explicit actions.
Unsupported or incompatible methods remain explainable in the tree. Normal API reference use takes place in this interface; bundled searchable help covers setup, concepts, tutorials, packaging, and troubleshooting. Engine-specific API and sub-script details come from the landscape, including offline cached access. These interactions are acceptance requirements carried forward from the agreed design.
Tree Options above the method tree
Provide a Tree Options button at the top of the left tree panel. It opens an options dialog with a searchable checkbox list of the public classes/interfaces advertised by the selected engine. Authors select the classes useful for their conversion add-on, keeping unrelated branches out of the working view. Offer Select All and Clear Selection controls. With no selected classes, show an empty-state explanation and a Restore All action.
Apply the selection to the tree only; Cancel leaves the current selection unchanged. Display when a filter is active and provide an easy Show All action. Remember the view preference in the SDK’s own settings; do not add it to the add-on’s semantic manifest or PyCForge’s project/session schemas. The initial view shows all advertised classes/interfaces. Filtering, searching, expanding branches, and explaining methods execute no plugin code.
Keep guidance reachable: a method explanation still lists required types, handles, hooks, and related methods even when their classes are hidden. Let the author reveal a referenced class explicitly. Scan findings remain visible regardless of tree filtering and can open their source location or method explanation. A hidden class is available to the engine and authoring API; hiding it neither disables a capability nor waives a required check.
Refresh without losing intent: preserve selections by stable public class/interface IDs. New methods under selected classes appear after refresh. New classes appear in the options dialog and the unfiltered view, without requiring an SDK update. Show retired or unavailable selections clearly rather than silently treating them as valid. View changes alone do not change source, invalidate an approved package snapshot, or alter conversion results; engine, target, source, or semantic-policy changes still follow the usual invalidation rules.
One editor, one complete scan snapshot
Keep a single editing surface with no tab bar. If an add-on declares helper source files, use a compact file selector to replace the file shown in that same editor, preserving unsaved content, undo history, and cursor position. A scan finding may select its file in this surface. The ordinary starting workflow needs only one primary conversion expansion file.
Scanner scope is the declared package: collect the current primary source, declared helper sources, assets, manifest metadata, dependencies, and required tests into one exact snapshot. Include current in-memory edits when present and the identified saved bytes for other declared files. Report missing or inconsistent inputs. API, CLI, and GUI scans of the same snapshot use the same checks and produce equivalent outcomes. The current visible file, tree selection, collapsed branches, and method order never define what is scanned.
Build only the approved snapshot. Switching the visible file or changing a class filter does not alter approval; editing any packaged source, required metadata, asset, dependency, or relevant contract does. A single editor keeps authoring focused; the complete snapshot and shared engine checks establish scan reliability.
Retain useful clipboard/character-map interactions in Edit, the source context menu, and toolbar. Generated C is a read-only result view. Typing, IME, and idle pauses trigger no scan, worker execution, or progress popup. Explicit long actions can show a small labeled progress dialog with cancellation where applicable. The SDK owns its own settings and save/recovery behavior.
Scan approval, packaging, and installation
The SDK scanner uses PyCForge’s current scan mechanics
Rules and procedure have the same owner: PyCForge supplies the required semantic checks, their implementations, prerequisites, legal order, applicability, and acceptance criteria. Its published catalogue describes that versioned scan contract. The SDK’s Scan action calls the selected engine’s public validation services; refreshing descriptions alone is not a substitute for running the corresponding engine checks. GUI, CLI, and Python API use this same service.
For each explicit Scan, capture the complete add-on snapshot, select the engine/ruleset/check profile and target, and verify that their identities match the current contract. Crucible resolves the applicable check dependencies and executes the required semantic workflow. The SDK may coordinate generic file, compiler, fixture, and packaging tasks requested by that workflow, but cannot omit semantic checks, redefine their order, or invent a passing result. Reports record the source/package identity, engine build, ruleset and scan-profile versions/hashes, target/dependencies, required checks, and every result.
Updates apply to scanning too: when PyCForge changes a required check within the supported protocol, the unchanged SDK obtains the new scan contract and invokes the updated engine implementation. Earlier approval is usable only if the engine establishes that its recorded evidence still applies; otherwise require a new scan. Missing, skipped, canceled, failed, or incompatible required checks cannot produce approval. An unfamiliar required client capability produces an explicit incompatibility result. Startup refresh updates catalogue information and approval applicability; it never silently executes the author’s extension.
The shared rule services also govern package registration and conversion inside PyCForge, using the checks applicable to each stage and its actual inputs. Authoring, registration, and conversion need not run identical workloads, but must agree on the meaning of the same rule. General SDK schema/format checks remain useful prerequisites; they do not replace semantic validation by Crucible.
One standard for all authors: engineer-typed and AI-generated source pass the same declaration, eligibility, ownership/effect, route/target, reference-behavior, generated-C compilation/execution, and packaging checks required for the declared capability. Authorship, a plausible implementation, or a passing syntax check cannot waive a required test. Changes made through the API or a text editor invalidate evidence under the same rules. The host independently revalidates the finished package before activation.
Scan captures exact source buffers, assets, final author/version metadata, dependencies, engine/landscape identity, target, and check policy. Every required check must complete with no unresolved error or potential-problem warning before that snapshot becomes approved. Informational notes do not hide actionable findings. The SDK combines local checks with engine results; it does not recreate engine eligibility logic.
Source, metadata, asset, target, dependency, or relevant contract/check changes invalidate approval. Build uses only the approved bytes. If the packaging wizard changes metadata, it requires a fresh applicable scan. A previously approved unchanged snapshot can be packaged offline only when its required evidence is available and applicable. A clean scan means no issue was detected within the recorded checks and fixtures; it is not proof for every possible input.
The user selects a plugin root anywhere, independent of Python/project locations. Configure the target engine and destination once through Tools or the top icon; remember them for future builds. PyCForge owns registration, validates the received package independently, and handles explicit activation/version replacement. Stage a complete artifact before committing it; failed installation preserves the prior working registration. Never edit private project/session files or report plugin configuration failures as unsaved Python/project errors.
A single .pcfplugin archive remains the proposed container; the packaging contract below supplies a concrete candidate to qualify in P2 before freezing the format. Distinguish compiler-side dependencies from target C headers/libraries. Discovery installs nothing and imports no plugin code. Executable plugins run in a bounded worker on explicit requests; worker isolation contains crashes and permits termination but is not an operating-system security sandbox.
Expansion packaging and host recognition
Proposed P2 format: a ZIP-based .pcfplugin archive with a JSON manifest and a closed inventory of declared payload files. This is a proposed layout, not an implemented loader contract. XML remains the candidate for PyCForge’s exported SDK catalogue; the host package manifest uses JSON so this design introduces no XML parser into PyCForge. The SDK’s own PyPI wheel is a different artifact.
| Illustrative member | Purpose |
manifest.json | Package format, stable package ID/version, compiler-side entry point, namespace exports and stable operation/type mappings, engine/API and required-feature compatibility, Python requirements, routes/targets/ABI, dependencies, and payload inventory with hashes. |
extension/main.py | Primary compiler-side implementation using public Crucible services; declared helper files may accompany it. It is loaded only through an explicit host service in a controlled worker, never merely because the folder is listed. |
assets/ | Only declared resources, generated-program headers/native sources, or target-specific libraries. Native binaries require explicit platform/ABI identity and applicability checks. No accidental dependence on the SDK installation or undeclared author-machine paths. |
fixtures/ | Required positive/negative examples and independent reference expectations, including relevant error, ownership, and route/target cases. Package the material needed by the host’s required revalidation profile. |
verification/report.json | Engine-produced findings and evidence bound to the exact payload identity, engine/rules/check profile, target/compiler, dependencies, and fixture results. A report records what was tested and what remains unsupported; it is not permission to skip current host checks. |
Identity without a circular hash: define the payload identity over a canonical manifest and its inventoried content, excluding the verification report. The report refers to that identity; an optional hash of the completed archive is recorded outside the archive. Specify canonicalization in the package format. Neither matching hashes nor a claimed passing report prove authorship or universal semantic correctness.
- Discover metadata: find candidate archives under the configured root and inspect their manifest without importing code. Validate the container structure, paths, duplicate members, size limits, declared inventory, and hashes. Reject undeclared executable content and unsafe extraction paths.
- Check compatibility: verify schema and required features, engine/API/Python requirements, namespace conflicts, dependencies, and target/route applicability. Being compatible does not mean the package has passed semantic validation. Missing local prerequisites produce an incomplete status, with no automatic download.
- Validate on an explicit action: stage immutable content and invoke the selected engine’s registration/scan profile in a bounded worker. Check actual entry-point declarations against the manifest, required hook/handle/type contracts, fixtures, generated C, and native checks applicable to that profile. Reject stale, incomplete, forged, or inapplicable evidence; the host chooses what must be re-established.
- Commit and activate: atomically register the accepted identity and namespace mapping; activate or replace a version through an explicit operation. Failure preserves the previous working registration. Record the resolved package/dependency identity in conversion results and prevent an active job from switching providers during an update.
Expose separate discovered, compatible, validated, and active states with reasons. A valid filename is only a candidate; it is not a valid extension. Multiple providers for a namespace require an explicit selection or a diagnostic, never the first filesystem match. An update that changes required checks can make prior evidence inapplicable.
A worker provides cancellation and crash containment, not an operating-system security sandbox. Passing checks records conformance within the declared profile and fixtures. Host registration and every later conversion still enforce applicable semantic obligations.
The sub-script in PyCForge’s main Python editor
The SDK creates conversion plugins; PyCForge uses them. In PyCForge’s main Python editor, *import explicitly declares a registered conversion expansion. Ordinary import retains its Python meaning and the existing supported-source-bundle rules; do not silently redirect it to an expansion merely because a namespace matches. The agreed marker supersedes the earlier comment-only selection proposal. Remaining options and region directives belong to PyCForge’s sub-script and use the same engine services.
Minimal declaration: *import matrix_tools, with an optional alias such as *import matrix_tools as matrix. The name identifies a public namespace advertised by a registered expansion package, not an arbitrary archive path. Subsequent expressions such as matrix.sum(values) resolve against that expansion’s declared operations and types. The manifest ties the namespace to the selected package identity/version. Aliases, shadowing, duplicate claims, missing packages, and unavailable methods require explicit checked outcomes. The minimal grammar, placement, alias, and binding rules are P1/P2 deliverables; richer options and region directives remain P4 work.
Language boundary: *import is PyCForge-specific syntax, distinct from Python’s from module import *. A file containing it is Python with an explicit conversion extension, and cannot be passed unchanged to CPython. The frontend must recognize the declaration as syntax, preserve source locations, and provide its bindings to Crucible before ordinary Python analysis rejects the source. Do not implement this as blind text replacement or treat occurrences in comments and strings as declarations.
Support whole functions and consecutive complete statements within the legal region model. Crucible owns parsing, binding, eligibility, input/output and mutation rules, lifetimes, exit behavior, plugin composition, scheduling, and diagnostics. Resolve extension symbols before ordinary unsupported-import rejection. Reject malformed directives, ambiguous attachment, partial statements, invalid crossings, incompatible requirements, and disallowed overlaps or nesting with source locations.
The sub-script uses the same public engine services and mandatory checks as headless conversion. It gives neither an author nor a plugin permission to bypass validation or inject unchecked replacement C. Parse and execute the conversion request on an explicit conversion or validation action; typing, IME composition, and idle pauses never trigger executable plugin work or progress dialogs. Generated C remains read-only.
Ownership and proof: the language implementation stays inside PyCForge. The SDK may display engine-supplied guidance, insert templates, and submit examples for testing; it has no separate sub-script evaluator. P2 must demonstrate an SDK-built plugin installed in PyCForge and selected through the minimal declaration. P4 extends that proof to richer main-editor directives through both editor and public API requests. Validate eligible and rejected regions, compile/run required reference fixtures, and confirm equivalent decisions for the same source and policy.
How a declaration becomes a method call
Illustrative application source: *import matrix_tools as m, followed by view = m.Matrix(values).transpose() and result = view.sum(). These are hypothetical operations for the ownership proof, not claims of present matrix support. *import declares a conversion namespace; it does not execute an ordinary Python import or instruct the SDK to interpret the application.
| Source element | Required engine binding |
matrix_tools | Resolve the exported namespace to an explicitly selected registered package/version/content identity. Missing, disabled, conflicting, or incompatible providers cause a source-located diagnostic. |
m.Matrix(values) | Bind m in the source symbol table. Resolve its exported constructor to a stable operation ID, validate arguments, and obtain the declared Matrix type. Aliases are lexical bindings, not textual search-and-replace. |
.transpose() | Resolve a method on the returned Matrix type. Its contract declares a View result and the relevant borrow/ownership relationship. A dot after a value is not automatically another package-namespace lookup. |
view.sum() | Resolve from the View type, check support and lifetime, then schedule/lower the operation through the permitted conversion route. Preserve its owner until the final use and required cleanup, including early-return/error paths. |
Registration maps export names and signatures to engine-recognized operation/type declarations and compiler-side implementations. Nested types need explicit declarations; arbitrary object lookup or dynamic getattr does not acquire conversion support merely because a namespace exists. Method availability comes from the receiver’s resolved type and contract. The SDK tree can display and insert calls from these descriptors; Crucible performs binding and conversion at an explicit request.
Keep this distinction testable: calling a method during conversion invokes its compiler implementation to build a checked conversion plan or representation; the resulting target operation executes when the generated program runs. Do not infer support from the presence of a same-name Python module or fall back to importing it. Minimal alias/shadowing rules, missing exports, nested result types, and conflicting registrations require tests before P2 closes.
Error control has distinct owners
Errors are not handled exclusively by PyCForge, but PyCForge owns semantic acceptance and final conversion state. The SDK’s local checks and plugin implementation’s error handling cannot turn a failed mandatory engine check into approval. All clients receive stable diagnostic codes, severity, phase, source span when applicable, plugin/operation/hook identity, target/profile context, and a clear failed, incomplete, canceled, or successful outcome.
| Layer | Owns and reports |
| SDK services | Editor/source-snapshot problems, unresolved placeholders, catalogue/XML parse and schema errors, local paths/settings, unavailable prerequisites, packaging failures, and transport/protocol errors. Presents engine findings and navigates to source. The headless API, CLI, and GUI share these services. |
| Expansion implementation | Expected compiler-side failures and domain-specific rejection through the public diagnostic/result contract. With the proposed Python authoring language, ordinary Python exception handling may perform local cleanup or translate expected failures. A recoverable decline is allowed only at documented decision points; it must not suppress an engine failure, cancellation, or unresolved obligation. |
| Crucible and host services | Syntax/binding, eligibility, type/ownership rules, handles, hook dependencies, route/target compatibility, validation, worker crashes/timeouts/malformed replies, and atomic publication/registration. Required failures prevent success. Exception recovery cannot publish partial output as a completed conversion. |
| Generated C and native build | The expansion declares and Crucible checks the generated-program error model: guards, status/error propagation, cleanup, and route-specific exception semantics where supported. The build service reports compiler/linker failures. Compiler-side Python try/except does not catch an error that occurs later when the generated C program runs. |
For example, an invalid matrix shape may be rejected during conversion if known, or require a generated runtime guard if dynamic. A failed native allocation requires the declared runtime error and cleanup path. A stale compiler handle is an extension contract violation and must stop that conversion. A plugin may not substitute a plausible result to hide any of these failures.
Tests must distinguish expected rejection from a compiler crash and from a generated-program runtime error. Reference fixtures must verify errors, side effects, ownership release, and execution order as well as returned values. The same request and policy must have equivalent outcomes through the direct engine service and SDK API/CLI/GUI; the checks applicable to authoring, installation, conversion, and native building may differ because their inputs and responsibilities differ.
Run Python stops before executing a source with *import
Required behavior: when the selected execution source bundle contains an actual *import declaration, Run Python immediately reports that the source requires conversion and does not launch the user program. No user statements or imports execute, including statements written before the declaration. The same check applies to any public API or command that exposes this Python-run operation.
User-facing resultRun Python unavailable: this source uses a *import conversion expansion. Use Transpile to generate C.
Identify the source file, declaration line, and namespace; include the registered package identity when known. This is a blocked execution request, not a partially executed program or a successful run. Conversion and native compilation remain separate explicit actions with their usual checks.
Scope of the check: examine the current primary source and its explicitly supplied execution dependencies, not unrelated editor tabs or every installed add-on. A declaration in a supplied dependency also blocks the launch. A missing or disabled expansion, or a similarly named installed Python library, does not permit Python fallback for *import. Ordinary import alone does not trigger this rule, and expansion syntax inside comments or string literals is not a declaration. Invalid declarations receive syntax diagnostics before launch.
Implementation contract: preflight uses the current source snapshot and the engine-owned declaration/binding information, without executing user modules or plugin code to probe importability. Source or relevant dependency edits invalidate earlier results. Return a structured blocked status and source-linked diagnostics consistently through API and UI; keyboard shortcuts and stale UI state cannot bypass the check. Merely typing never launches a scan, worker, or progress dialog. Run Python must not silently remove the declaration, substitute a Python implementation, or automatically transpile and run C.
Focused sequence and completion gates
Work on engine structure, public contracts, and harnesses first. Create only the SDK skeleton, public Python API slice, and minimal CLI consumer needed to prove those contracts. Begin the full desktop UI after the engine/contract proofs. Documentation and tests grow with each stage; no stage advances merely because one demonstration ran.
First prerequisite: prepare the existing engineP0 establishes the baseline. P1 makes the semantic and extension boundaries executable through existing Typed and Runtime paths. P2 proves them through an installed external client. Record the actual component changes, call paths, shared services, remaining route-specific behavior, and regression evidence. A new interface declaration alone does not complete this work. Both exercised conversion paths must consume engine-owned eligibility and ownership contracts, and extension resolution must occur before unsupported-import rejection. Adapt current components incrementally while preserving accepted behavior. This gate establishes a dependable extension foundation; it does not imply support for every Python feature or library.
P0
Freeze the baseline and map engine preparation
Owner: PyCForge.
Capture accepted/rejected conversion fixtures, diagnostics, output, timing, and memory for both routes. Map existing parser, resolver, analysis, ownership, lowering, validation, and publication boundaries. Identify duplicated policies, private coupling, and the integration points for plugin symbol resolution and shared services. Keep an immutable baseline and isolated working copy.
Gate: Repeatable comparisons cover both modes and the working filesystem/session, clipboard, character-map, read-only C, and no-typing-progress behavior. Record inherited failures explicitly. Deliver a component-to-interface map and a bounded migration sequence with regression checks for each change.
P1
Prepare executable contracts and minimal expansion binding
Owner: PyCForge; minimal SDK API client.
Introduce small abstract behavioral interfaces, operation registration, typed handles, shared ownership services, route adapters, and engine scheduler boundaries. Adapt representative existing Typed and Runtime conversions to execute through them. Define eligibility outcomes, diagnostic/result contracts, hook prerequisites/effects/invalidation, and initial compatibility rules. Decide the compiler-side authoring language; ordinary Python through the public API is the recommendation. Implement the minimal *import frontend/binding path and shared Run Python preflight rather than postponing them to P4. Specify both public APIs, landscape schemas, installed public catalogue folder/manifest, ordered scan profiles, registration requests, and package identities. Prototype XML publication and a headless SDK reader/schema validator without XML ingestion in PyCForge. Establish the separate minimal SDK client project.
Gate: A registered operation has complete semantic and route declarations; missing decisions fail. Actual conversion paths consume shared eligibility/ownership contracts. Reject invalid/stale handles and illegal hook order with structured findings. The minimal declaration binds an extension before ordinary unsupported-import rejection. Run Python blocks real declarations before user side effects, preserving comments/string and ordinary-import behavior. Descriptors agree with registered calls. Direct SDK API calls work headlessly through public interfaces; protected baseline checks pass. Identify unfinished migration and private coupling explicitly.
P2
Prove an installed package from declaration to native result
Owner: PyCForge; minimal SDK Python API and CLI consumer.
Ship the machine-readable landscape in the installed engine’s public folder and matching discovery identity. Implement SDK startup refresh, discover/describe, scaffold, scan/test, and prototype packaging. Qualify the proposed archive/JSON manifest, metadata-only discovery, independent validation, and atomic registration. Establish worker bounds, cancellation, malformed-result rejection, and rollback before external code is executed. Use an invented scalar plugin selected by *import to exercise symbol binding, eligibility, both declared routes, generated C, native compilation, execution, and clear failures. Run a standalone Python authoring client and equivalent CLI workflow; invoke the existing host’s conversion and Run Python services without requiring the future SDK GUI.
Gate: An actual archive installs and works against an installed engine outside either source checkout, with the SDK absent from the host. Clients consume the published catalogue and agree on approved content and structured outcomes. Test built-wheel and source-distribution installs without internet access. Required checks gate packaging and host activation; malformed/tampered packages, stale reports, missing prerequisites, conflicting namespaces, missing exports, invalid aliases/shadowing, incompatible schemas/features, and failed native fixtures cannot succeed. Prove minimal *import and pre-execution Run Python blocking through public and host UI services. Qualify XML export/SDK reading and package format independently before freezing them. No Qt display is needed for SDK API/CLI tests.
P3
Prove hard boundaries and unchanged-client evolution
Owner: PyCForge; frozen minimal SDK API/CLI harness.
Exercise a buffer/view plugin and an opaque native-resource plugin using shared interfaces. Include constructor-to-view-to-method binding, nested result types, owner retention, shape/stride, mutation, acquisition/transfer/cleanup, error exits, cancellation, and both conversion routes. Exercise interacting hooks, invalidated analyses, cycles/conflicting writers, bounded iteration, stale handles, and wrong-stage API calls. Freeze the client artifact, add a compatible engine capability and its landscape entry, and run the upgrade proof described below.
Gate: The unchanged client discovers the new capability, scaffolds its use, scans/tests through the updated engine, and packages the plugin. No client patch, private engine import, or duplicated eligibility rule is allowed. Borrowing/cleanup, runtime errors, unsupported routes/targets, and invalid contracts have tested outcomes. Add a required engine-side scan check within the same client protocol; the frozen client reports passing/failing fixtures and cannot reuse earlier evidence when the updated profile requires a new check. Independent reference expectations cover values, errors, mutation, order, and cleanup.
P4
Extend the main-editor sub-script and prove composition
Owner: PyCForge.
Extend the minimal *import, namespace binding, and Run Python gate already proved in P1/P2. Add typed options, checked requirements, and legal whole-function or consecutive-statement regions on the established engine interfaces. Publish the extended grammar, templates, limits, and diagnostics in the landscape. Exercise the language from the main Python editor and public engine API. Keep implementation in PyCForge; a completed SDK GUI is not required.
Gate: An SDK-built installed plugin is selected through *import and applied through validated bindings and richer directives. Whole functions and consecutive complete statements have validated input/output, mutation, lifetime, and exit behavior. Reject malformed/partial regions, ambiguous attachment, unsupported crossings, and disallowed nesting/overlap. Cooperating plugins use explicit contracts; conflicts and nonconverging transformations terminate with diagnostics. Preserve Run Python pre-execution blocking and absence of false blocks. Editor and API requests agree for the same source and policy; required generated-C reference tests pass.
P5
Complete and harden the SDK API and CLI
Owner: SDK generic tools; PyCForge runtime and rules.
Finish the public discovery, scaffold, scan, test, build, report, and registration services. Qualify direct Python API and noninteractive CLI use against PyCForge-owned scan mechanics. Verify that an engine-only ruleset/check update changes the applicable scan through the unchanged SDK. Harden worker bounds, dependency resolution, timeouts, cancellation, snapshots, invalidation, protocol failures, and reproducibility. Publish executable API examples and diagnostic correction guidance.
Gate: Installed API and CLI clients complete the workflow with documented structured outcomes. Missing/skipped required checks block approval. Crashes, hangs, malformed results, and canceled builds cannot publish partial success. Public SDK imports and headless operations work without Qt. Human- and AI-authored cases receive the same required checks; no caller can approve its own unchecked output.
P6
Build the thin SDK desktop interface
Owner: Separate PyCForge-SDK project.
Add the PySide6 single editor without tabs, left class/interface method tree, Tree Options dialog, upper contextual detail area, template insertion, compact file selection, scan results, settings, and concise offline help over the qualified shared services. Populate engine-specific content entirely from the selected landscape.
Gate: Repeat the frozen-client upgrade test with the installed API client, GUI, and CLI. Update PyCForge alone, relaunch the unchanged SDK, and confirm the published folder refreshes its method/class/group/signature/template/guidance without an SDK code change. Also test explicit refresh during an open session, the unfiltered view, and saved class selections. Single-click shows the method explanation above the editor; double-click inserts its editable template at the cursor without execution. Verify those behaviors alongside saved class filters, hidden-class guidance, no-tab file switching, unresolved-placeholder diagnostics, complete package scanning, edit preservation, read-only C, accessibility, and no-typing-progress behavior. Changing only tree visibility must leave scan outcomes and approved snapshot identity unchanged.
P7
Prove human and AI authoring and host integration
Owner: Both products through public interfaces.
An independent programmer and an AI system each construct a new useful conversion extension beyond the bundled demonstration, using delivered public documentation and examples. Include a direct SDK Python API workflow, a CLI workflow, and the human-facing editor. Each author encounters an intentionally failing case, uses the diagnostics to correct it, and completes required testing and packaging. Complete destination setup, registration, and legal-region use in PyCForge; test paths, unavailable folders, duplicates, upgrades, removal, and interrupted registration.
Gate: Record both authoring attempts, engine/client versions, tool calls or commands, interventions, findings, and resulting evidence. Neither author depends on private imports, a core patch for the supported case, or undocumented coaching. Fix required API gaps and repeat blocked steps. Equivalent inputs and policies receive equivalent checks across clients. Host filesystem/session regressions pass; CC verifies native Windows interaction. If either authoring trial is unavailable, keep that portion of the gate open.
P8
Release independently against the compatibility contract
Owner: Each project owns its release.
Qualify final installed artifacts, compatibility combinations, Linux/Windows targets, documentation, measured resource behavior, and engine-only/SDK-only upgrades. Verify the complete normal authoring/scan/build/registration workflow without internet access after local dependencies are installed. Conversion-speed results are reported without a fixed regression cap. Verify the engine API, SDK API, protocol compatibility, and deprecation policies established in the earlier contract phases against the final release matrix. Publish stable versions only after earlier gates pass.
Gate: PyCForge runs finished plugins without the SDK. The SDK can browse/edit offline and use a separately selected engine. Both routes pass their declared contracts. Deliver a wheel, source .tar.gz, and verification report with hashes for each released project; CC alone publishes to PyPI.
P1/P2 prove minimal expansion declarations and host execution blocking. P3 proves hard contracts and communication evolution with a minimal client; P6 repeats that proof with the full editor. P4 extends the source language without requiring a completed SDK GUI. Set effort estimates after P2 exposes real integration cost. A failed gate keeps dependent work open and the working conversion path available.
The unchanged-SDK upgrade proof
- Record the installed SDK/client artifact hash. Connect it to engine A; save its landscape and run a known passing plugin.
- Create engine B with a new public method using the same supported protocol and landscape schema. Add its group/detail/template and declared eligibility, ownership, routes, targets, known issues, and fixtures.
- Update the selected PyCForge installation and its published catalogue folder. Relaunch the exact same client artifact and verify automatic startup refresh, new information, and old-plugin compatibility. Repeat with explicit refresh in an open session; the SDK must obtain the new engine rules through the selected public services.
- Generate or insert the new call, implement a plugin using it, obtain scan/test results from engine B, compile/run required fixtures, and build the approved package. Exercise the frozen SDK Python API client as well as its CLI; repeat with the GUI at P6.
- Run the packaged plugin in engine B with the SDK absent. Confirm the client artifact hash is unchanged and that no private import or client-side semantic special case was introduced.
- Exercise an incompatible schema/required feature, a malformed refresh, stale cached information, and an unsupported route. Expect explicit diagnostics, no false scan approval, and retention of the last valid catalogue.
Acceptance boundary: compatible capability additions and updated guidance travel as engine data. A genuinely new required client behavior or incompatible protocol needs negotiation and may require a new SDK release. Adding an engine method alone must not force that outcome.
Focused qualification requirements
| Area | Evidence required |
| Eligibility and semantics | Supported, conditional, unsupported, unknown, and deliberately incompatible cases. Compare reference values, errors, mutation, order, evaluation count, numeric policy, and resource cleanup. A method’s presence is never sufficient evidence of eligibility. |
| Portability | Typed/runtime route support is explicit. Compile/run declared Linux and Windows toolchains and check widths, alignment, ABI, dependency availability, and error paths. PCFC11 claims need evidence for emitted constructs. macOS remains unverified until tested. |
| Ownership and scheduling | Shared types/views, transfer/borrow boundaries, lifetime violations, errors, early exits, conflicts, dependencies, invalidated facts, bounded rewriting, and cleanup. One engine-owned policy must serve both routes. |
| Offline publication and XML boundary | With internet access blocked, verify the proposed PyCForge XML export and SDK-only parsing/schema validation, bundled local resources, version/feature handling, safe parse limits, and headless operation. Check generated descriptors against actual engine registrations. Passing XML structure checks cannot replace engine semantic checks or fixture evidence. |
| Startup discovery and rule ownership | Verify fresh startup, unchanged hashes, engine-only upgrades, selected-environment changes, missing installations/resources, partial updates, incompatible schemas, labeled offline cache, and successful recovery. Catalogue refresh executes no plugin code, rewrites no source, and never updates SDK code. Check that semantic results come from the selected engine and that SDK and engine identities match before approval. |
| Landscape and clients | Descriptors agree with implementations; templates are executable examples when inserted into fixtures. Verify schema negotiation, exact version/hash association, known issues, offline status, failed refresh, unchanged-client upgrades, and documented incompatible changes. |
| Scan rules and execution order | Verify engine-owned check prerequisites/order and matching ruleset/profile identities. Upgrade the engine’s scan implementation with the SDK unchanged, exercise passing and failing fixtures, and verify that obsolete or incomplete evidence cannot approve a package. Compare SDK API/CLI/GUI findings with direct engine service results for the same inputs and profile. |
| Package identity and activation | Container paths/limits/duplicates, closed inventory and hashes, entry-point/manifest agreement, required-feature negotiation, separate compiler/target dependencies, namespace conflicts, forged or stale reports, and atomic failure recovery. Resolve and pin provider identities; test replacement/removal while a job is active. Package format and XML catalogue format are independent contracts. |
| Handles, binding, and error ownership | Wrong-kind, fabricated, stale, cross-job and wrong-stage handles; stable operation/type IDs; alias/shadowing and nested-method resolution; compile-time rejection versus dynamic runtime guards; failed allocation and cleanup; structured plugin failure, cancellation, and protocol errors. Python exception handling in an expansion cannot approve failed engine checks or substitute for generated-C error paths. |
| Scan and package | Complete required checks, exact snapshot capture across every declared source/asset/test, final author/version metadata, stale report invalidation, artifact/report identity, and independent host revalidation. Hidden classes and non-visible files remain covered. Unresolved required template placeholders prevent approval. Tree filters and the current file view do not change validation outcomes. Cancellation or a missing compiler/engine cannot produce a successful scan. |
| Runtime and host | Crashes, hangs, oversized/invalid messages, cancellation, interrupted install, duplicates, native dependency errors, and reproducible clean-worker results. Confirm no successful partial publication or changes to private project/session schemas. |
| Expansion imports and Run Python | Test *import with and without aliases, in primary and supplied companion source, plus absent/disabled packages, namespace conflicts, malformed declarations, and an installed same-name Python module. A blocked request performs no user side effects even before the declaration. Test normal imports, unused registered add-ons, comments, strings, and unrelated open files for false blocks. Source edits invalidate cached eligibility. API and GUI report the same blocked reason and source location. |
| Human and AI workflow | Public Python API results, CLI JSON/status, and GUI results agree for the same inputs and policy. An independent human and an AI author each discover, implement, diagnose, correct, test, and package an extension through documented interfaces. Capture interventions and unresolved obstacles; leave unperformed trials open. Authorship never relaxes scan/build requirements. |
Performance and resource behavior: modular plugin support, correct semantics, and usable public APIs take priority over conversion throughput. The earlier fixed conversion-speed regression cap is withdrawn. Additional conversion time, including plugin-disabled overhead, is acceptable for the modular architecture and its checks; it is not a release failure by itself. Measure conversion time separately from generated-program execution and record workload, hardware/OS, timing, and memory so future optimization is evidence-based. Discovery measurements at representative catalogue sizes remain useful observations, not fixed speed gates. Do not assume a slowdown is inevitable or promise its size before measurement.
Control and correctness remain required: cancellation, bounded transformation execution, crash containment, memory safety, and a responsive editor remain functional requirements. A slow conversion must remain controllable and must never report an incomplete result as success. Measure cancellation recovery on supported platforms; these control requirements do not reinstate a conversion-throughput budget. Generated-program behavior and declared resource requirements remain independently validated.
Assess eligibility once per applicable conversion plan so all routes consume the same established decision. Batching and reuse are optional optimizations; reuse verified results only when all relevant inputs match. Fingerprints include source/directives, engine/API/landscape/check versions, plugin/assets/dependencies, target/ABI, and compiler where tested. Establish correct uncached behavior before introducing caching. Zero executable plugin calls or discovery scans occur per editor keystroke.
Scope discipline: this work supplies general conversion machinery. NumPy, SciPy, Numba, and Cult of Atom adapters are independent author work. Defer marketplaces, automatic dependency installation, cloud/remote execution, additional target languages, and a separate general sub-script evaluator. New libraries may expose missing reusable primitives; no claim is made that the core will never need further capabilities.
The next implementation increment
Prepare the current engine through P0 and P1, then prove it through P2. The first reviewable deliverable is a reproducible baseline and component map, implemented shared-service boundaries with regression evidence, public contracts for both APIs, and a minimal SDK Python API/CLI client demonstrating a complete external conversion. The graphical SDK follows the earlier engine and protocol gates.
- Freeze the 1.3.57 baseline and map current Typed/Runtime components, duplicate policies, private dependencies, and extension resolution points.
- Implement and exercise shared eligibility, ownership, route, and scheduling interfaces incrementally, preserving baseline behavior and testing positive and rejected cases.
- Specify both public APIs, the installed public catalogue folder and startup discovery contract, landscape/export, and request/result protocol; map descriptors to the same registered interfaces that the engine executes.
- Implement minimal
*import binding, Run Python preflight, and the package identity/validation/registration path early enough for P2. Build the minimal SDK Python API and CLI clients and scalar fixture, with required validation, compilation/execution, equivalent client outcomes, and package evidence. - Review the P2 results before expanding into P3’s hard ownership cases and frozen-client upgrade proof. Keep every unmet prerequisite visible.
Each stage records exact artifacts, environments, tests, results, limitations, and changed contracts. This roadmap is design work only; it does not assert that Crucible restructuring, the SDK, or any new gate is implemented. Existing PyCForge release README/image rules remain applicable to actual application releases, with concise user-facing documentation.
Prior source inspection and revision continuity
The 1.3.57 inspection found a public conversion façade, staged typed pipeline, rule/helper registries, and separate typed/runtime conversion routes. Both module resolvers reject imports outside supplied source bundles; plugin symbol resolution must participate before that rejection. Those findings motivate adapters around existing components rather than making a wholesale rewrite a prerequisite.
Revision 0.6 retains the original baseline safeguards, hard buffer/native-resource examples, sub-script ownership, independent-author trial, platform qualification, and separate release artifacts. It replaces SDK-maintained engine knowledge with engine-owned discovery, moves eligibility/abstract interfaces into P1, adds the frozen-client gate in P3/P6, and makes the CLI the foundation for GUI and AI authoring. Revision 0.7 makes dependable human and AI use a central product objective, specifies a public SDK Python API alongside the engine API, extends client parity and authoring trials, and requires executable preparation of the current engine before broader SDK work. Revision 0.8 records CC’s acceptance of conversion-time overhead for modular plugin support, withdraws the fixed speed cap, and carries forward the precise single-click/double-click SDK behavior and engine-owned sub-script in PyCForge’s main editor. Cancellation, correctness, and required validation remain mandatory. Revision 0.9 adopts CC’s explicit *import marker for conversion expansions, superseding comment-only selection and the proposed blanket restriction on ordinary imports. It requires Run Python to stop before user execution for actual expansion declarations, with shared API/UI preflight and source diagnostics. Revision 0.10 specifies class/interface grouping, a top-of-tree Tree Options dialog, persistent visibility filters, and the single-editor workflow without tabs. It distinguishes presentation preferences from complete package snapshots and mandatory scan checks, including unresolved template placeholders. Revision 0.11 makes PyCForge ownership of the rules and installed public catalogue explicit, requires automatic SDK startup discovery and refresh, and separates that folder from authored add-on packages. It preserves the general SDK, engine-enforced validation, compatible unchanged-client evolution, and labeled offline use. Revision 0.12 makes scan mechanics, ordered required checks, and acceptance criteria explicitly PyCForge-owned alongside the rules. It requires the generic SDK scanner to invoke the selected engine’s versioned services and to re-establish evidence applicability after relevant updates. Revision 0.13 records offline normal operation and XML as a publication-format candidate, with PyCForge exporting registered definitions and the SDK alone parsing/validating them. Executable scan and conversion semantics remain in Crucible. Full format and offline-workflow qualification remain open; a format experiment does not close application gates. Revision 0.14 corrects the minimal declaration/execution-gate sequence, adds the outstanding language/handle/hook/native/compatibility contracts, and proposes a JSON-manifest expansion archive independently of the XML catalogue. It explains namespace and nested-method binding, registration states, and error ownership. The Python authoring language and archive layout remain recommendations to qualify in P1/P2. This document revision implements no application code and closes no application test or release gate.