Blender API Capsule Extractor
Abstract
Section titled “Abstract”This report evaluates Blender API Capsule Extractor, a locally generated CLI prototype that extracts backend documentation capsules from the official Blender Python API HTML documentation. Starting from a structured SpecBlock and a successful document preflight, the pipeline generated a command-line extractor, produced a user manual, and subjected the result to executable black-box qualification. A complete SpecBlock example for this prototype is available here:
Complete Blender API Capsule Extractor SpecBlock Example
The prototype reads an already-unpacked Blender Python API HTML tree, inspects selected official symbols, and builds two explicit artifacts: a canonical JSON capsule and an ACW-readable text capsule for the Blender relationships.py backend. The target corpus was substantial: 4,220 files, including 2,105 HTML files, for a total corpus size of 839.10 MiB. The goal was not to run Blender, render a scene, or generate assets. The goal was to recover a compact backend documentation payload that helps ACW project spatial-relationship abstractions into Blender Python code.
Qualification covered CLI discovery, help behavior, strict inspection of required Blender API symbols, optional-page diagnostics, strict capsule generation, dry-run behavior, expected user errors, JSON structure, text readability, required capsule sections, and critical API member extraction. The process identified a small set of product-boundary defects: strict inspection initially failed with unreadable html, the first generated capsule used a name/content section shape instead of the expected id/entries contract, and the text rendering was not yet fully ACW-readable. Each defect was localized, patched without changing the public CLI surface, and revalidated.
The final black-box run passed all 12 tests. The validated capsule contains the expected canonical schema, seven documentation sections, three official API symbols, 31 extracted official API members, and a readable text artifact of 14,546 characters. The final run completed in 32 minutes and 36 seconds, using 24 LLM calls across 6 agents, for an estimated total cost of 1.6925 USD. The experiment demonstrates that SPQE Lab can generate not only a functional backend documentation extractor, but also an auditable qualification trajectory including preflight, user documentation, black-box tests, defect detection, targeted correction, cost tracking, capsule recovery, and final validation.
Executive summary: vitrine and capsule recovery
Section titled “Executive summary: vitrine and capsule recovery”This experiment had two practical objectives.
The first objective was the SPQE Lab vitrine. The goal was to document a complete qualification trajectory: structured specification, generated prototype, generated user manual, black-box tests, observed defects, manual rescue patch, and final revalidation. This trajectory is now available as a reproducible qualification story for the showcase.
The second objective was to recover a usable backend documentation capsule for ACW. This objective was also achieved. The final build produced both expected artifacts:
relationships.acw_capsule.jsonrelationships.acw_capsule.txtThe recovered capsule is not a placeholder. It contains a canonical JSON structure, an ACW-readable text rendering, seven documentation sections, three validated Blender official API symbols, 31 extracted official API members, and complete backend doctrine sections for the relationships.py target.
The preflight had a major practical value. It proved before generation that the Blender documentation target was healthy: the required HTML pages existed, were readable, and contained the expected critical members. As a result, when inspect --strict later failed with unreadable html, the failure could be attributed to the generated prototype rather than to the documentation corpus.
This reduced ambiguity and accelerated debugging. The generated extractor was already close to correct on the first pass. The remaining defects were product-boundary micro-bugs: strict inspect hydration, capsule section shape, and text rendering format. They were not architecture failures and did not affect the CLI surface.
Blender API Capsule Extractor — backend qualification note
Section titled “Blender API Capsule Extractor — backend qualification note”Blender API Capsule Extractor is a deterministic local command-line prototype for building documentation capsules used by a backend-aware 3D scene-generation pipeline.
It is intentionally narrow. It does not execute Blender, does not require the Blender runtime, does not access the network, and does not attempt to become a general-purpose Blender documentation crawler. Its first target is the Blender backend implementation of relationships.py.
This page documents an SPQE Lab experiment. The Lab pipeline generated the prototype, produced a user manual, and then subjected the result to executable black-box qualification.
The experiment is relevant to the broader SPQE 3D roadmap, but the qualified artifact is more specific: it is a Blender backend documentation extractor. SPQE 3D is the scene-generation layer; Blender is only the first backend target.
User manual
Section titled “User manual”A generated user manual is available for the prototype. A PDF version of the generated user manual is available here:
Download the Blender API Capsule Extractor User Manual
The manual describes the CLI as a local, deterministic, stdlib-only tool for building backend documentation capsules from an already-unpacked official Blender Python API HTML tree.
Documented workflows:
python -m app.clipython -m app.cli --helppython -m app.cli build --helppython -m app.cli inspect --helpBuild workflow:
python -m app.cli build \ --api-html-root API_HTML_ROOT \ --out-json OUT_JSON \ --out-text OUT_TEXT \ --strictInspect workflow:
python -m app.cli inspect \ --api-html-root API_HTML_ROOT \ --symbol bpy.types.Object \ --strictThe manual also documents the prototype’s limitations: local files only, no network access, no running Blender instance, explicit output paths only, and a fixed MVP set of official API symbols.
1. Identification
Section titled “1. Identification”Prototype evaluated:
Blender API Capsule Extractor — First Backend for SpQE 3DLocal qualification context:
/content/archcode_runs/LIVE-PHASE2-PREFLIGHT-ACW-CHECKERS-1782720151/.archcodeCLI entry point:
/content/archcode_runs/LIVE-PHASE2-PREFLIGHT-ACW-CHECKERS-1782720151/.archcode/app/cli.pyBlender API HTML root:
/content/blender_python_reference_5_1_unzipped/blender_python_reference_5_1Target documentation corpus
Section titled “Target documentation corpus”The extractor was qualified against the following local Blender Python API HTML documentation tree:
/content/blender_python_reference_5_1_unzipped/blender_python_reference_5_1This target corpus was not an abstract or hidden source. It was a concrete local documentation tree with measurable size and structure.
Total files : 4220HTML files : 2105Total corpus size : 839.10 MiB (879855689 bytes)HTML corpus size : 687.12 MiB (720501322 bytes)MVP required pages : 3MVP pages present : trueMVP required pages size : 1.24 MiB (1297786 bytes)The MVP extraction contract focused on three official Blender API pages:
bpy.types.Object.html : present, 534.87 KiB (547711 bytes)bpy.types.Collection.html : present, 353.86 KiB (362357 bytes)bpy.types.ID.html : present, 378.63 KiB (387718 bytes)This inventory matters for qualification. The preflight established that the documentation target was present, readable, and sufficiently complete before prototype execution. Therefore, later defects such as strict-inspect hydration or capsule-shape mismatch could be attributed to the generated prototype rather than to a missing or corrupt documentation corpus.
Black-box report:
/content/archcode_runs/LIVE-PHASE2-PREFLIGHT-ACW-CHECKERS-1782720151/.archcode/blackbox_vitrine_tests/blender_api_extractor_blackbox_report.jsonGenerated capsule artifacts:
/content/archcode_runs/LIVE-PHASE2-PREFLIGHT-ACW-CHECKERS-1782720151/.archcode/blackbox_vitrine_tests/artifacts/relationships.acw_capsule.json/content/archcode_runs/LIVE-PHASE2-PREFLIGHT-ACW-CHECKERS-1782720151/.archcode/blackbox_vitrine_tests/artifacts/relationships.acw_capsule.txt2. Purpose of the qualification
Section titled “2. Purpose of the qualification”The goal was to verify that the regenerated prototype satisfied both its user-facing CLI contract and its capsule-quality contract.
The qualification focused on:
- CLI discovery and help behavior;
- strict symbol inspection;
- optional-page inspection diagnostics;
- strict build workflow;
- dry-run behavior;
- expected user-error behavior;
- JSON capsule structure;
- ACW-readable text capsule rendering;
- presence of required documentation sections;
- extraction of critical Blender API members for
relationships.py.
3. User-facing contract
Section titled “3. User-facing contract”The CLI exposes two documented subcommands:
buildinspectExpected help behavior:
python -m app.clipython -m app.cli --helppython -m app.cli build --helppython -m app.cli inspect --helpExpected result:
rc=0stdout contains usage informationstderr emptyExpected build behavior:
python -m app.cli build \ --api-html-root API_HTML_ROOT \ --out-json OUT_JSON \ --out-text OUT_TEXT \ --strictExpected result:
rc=0JSON artifact existstext artifact existsstdout contains explicit artifact pathsstderr emptyExpected inspect behavior:
python -m app.cli inspect \ --api-html-root API_HTML_ROOT \ --symbol bpy.types.Object \ --strictExpected result:
rc=0stdout contains symbol diagnosticsstderr emptyExpected user-error behavior:
missing API root => rc=2stderr non-emptystdout empty or non-business output4. Qualification method
Section titled “4. Qualification method”The test method is black-box.
The test battery invokes the prototype only through the public CLI:
python -m app.cliIt does not rely on internal imports for the primary verdict. It captures return code, stdout and stderr, then validates the observed behavior.
The artifact validation layer then reads the generated JSON and text capsule outputs and checks their public structure.
The correction strategy was minimal:
Observe failure→ identify contract breach→ patch the smallest responsible boundary→ re-run black-box tests→ preserve the generated CLI surface5. Initial result before rescue patch
Section titled “5. Initial result before rescue patch”The first black-box run showed that the visible CLI surface was healthy.
The following tests passed:
no_argstop_helpbuild_helpinspect_helpbuild_dry_run_no_artifactsinspect_missing_api_root_expected_failurebuild_missing_api_root_expected_failureHowever, five tests failed.
The first failure group concerned inspect --strict.
Observed behavior before correction:
python -m app.cli inspect \ --api-html-root API_HTML_ROOT \ --symbol bpy.types.Object \ --strict
rc=2stderr=error: bpy.types.Object: unreadable htmlThe same failure appeared for:
bpy.types.Objectbpy.types.Collectionbpy.types.IDThe second failure concerned the capsule structure. The build command returned rc=0 and wrote artifacts, but the JSON capsule did not expose the expected id/entries section structure. The generated sections used a name/content shape, which was not suitable for the vitrine quality contract.
The issue was not the Blender documentation itself: the required HTML files existed and were readable. The defect was in the generated prototype’s extraction and capsule-construction boundary.
6. Rescue correction
Section titled “6. Rescue correction”A manual rescue patch was applied without changing the CLI entry point.
The correction targeted the backend modules responsible for:
profile declarationpath resolutionHTML extractioncapsule constructiontext renderingfilesystem outputorchestrationThe patch preserved the public CLI surface and corrected the internal contract.
Corrected behavior:
inspect --strict succeeds for Object, Collection and IDbuild --strict produces canonical JSON and readable text artifactssections use id/entriesschema_version is archcode_blender_doc_capsule.v1critical Blender API members are presenttext output uses readable BEGIN_SECTION blocks7. Validated official API symbols
Section titled “7. Validated official API symbols”The strict inspect workflow validated the three MVP official Blender API symbols.
Object
Section titled “Object”symbol: bpy.types.Objectsource_path: bpy.types.Object.htmltitle: Object(ID)member_count: 20tokens_used: 448Collection
Section titled “Collection”symbol: bpy.types.Collectionsource_path: bpy.types.Collection.htmltitle: Collection(ID)member_count: 4tokens_used: 78symbol: bpy.types.IDsource_path: bpy.types.ID.htmltitle: ID(bpy_struct)member_count: 7tokens_used: 125The optional inspect workflow also validated optional page discovery in dry-run mode. It reported six documents when optional pages were included:
bpy.types.Objectbpy.types.ObjectConstraintsbpy.types.Constraintbpy.types.Scenebpy.types.ViewLayerbpy.types.LayerCollection8. Final black-box validation
Section titled “8. Final black-box validation”Final result:
total: 12passed: 12failed: 0verdict: passComplete validated test groups:
[OK] no_args[OK] top_help[OK] build_help[OK] inspect_help[OK] inspect_strict_bpy.types.Object[OK] inspect_strict_bpy.types.Collection[OK] inspect_strict_bpy.types.ID[OK] inspect_object_optional_strict_dry_run[OK] build_strict_capsule_artifacts[OK] build_dry_run_no_artifacts[OK] inspect_missing_api_root_expected_failure[OK] build_missing_api_root_expected_failureFinal verdict:
VERDICT: PASS9. Capsule artifact validation
Section titled “9. Capsule artifact validation”The strict build workflow produced both expected artifacts.
JSON capsule:
/content/archcode_runs/LIVE-PHASE2-PREFLIGHT-ACW-CHECKERS-1782720151/.archcode/blackbox_vitrine_tests/artifacts/relationships.acw_capsule.jsonText capsule:
/content/archcode_runs/LIVE-PHASE2-PREFLIGHT-ACW-CHECKERS-1782720151/.archcode/blackbox_vitrine_tests/artifacts/relationships.acw_capsule.txtValidated JSON properties:
schema_version = archcode_blender_doc_capsule.v1official_api_symbols_count = 3official_member_count = 31Validated capsule sections:
archcode_ownershipassignment_patternscreation_patternsforbidden_elementsofficial_api_symbolsoptional_symbol_pagessafety_rulesValidated text properties:
text_size_chars = 14546readable_section_blocks = trueno_single_line_json_section_blobs = true10. Validated test coverage
Section titled “10. Validated test coverage”The final battery validates the following layers.
CLI discovery layer
Section titled “CLI discovery layer”no args--helpbuild --helpinspect --helpInspect workflow
Section titled “Inspect workflow”inspect strict Objectinspect strict Collectioninspect strict IDinspect Object with optional pages, strict mode and dry-runBuild workflow
Section titled “Build workflow”build strictbuild dry-runexplicit JSON outputexplicit text outputno artifact creation in dry-run modeCapsule quality layer
Section titled “Capsule quality layer”canonical schema_versiontop-level sectionsrequired sections presentofficial API symbol entries presentcritical member extractionACW-readable text renderingno section-level single-line JSON blobsExpected user-error layer
Section titled “Expected user-error layer”missing API root in inspectmissing API root in buildrc=2stderr non-emptyno traceback11. SPQE 3D interpretation
Section titled “11. SPQE 3D interpretation”This experiment is not only a Blender documentation extraction task.
It demonstrates a broader design principle for SPQE 3D: backend-specific knowledge can be packaged as a compact documentation capsule and injected into ACW late in the pipeline.
The distinction is important:
SPQE 3D = the scene-generation layerBlender = the first backend targetBlender API Capsule Extractor = the qualified prototype on this pageIn this architecture:
3D scene abstraction→ backend documentation capsule→ ACW code generation→ target 3D engineThe generated capsule does not replace the scene-generation doctrine. It gives ACW the backend-specific facts needed to express that doctrine in Blender Python:
objectscollectionsIDstransformsparentingvisibilitycollection membershipmetadata carriersThis keeps the system aligned with the long-term goal: SPQE 3D should be able to target other professional 3D engines by changing backend documentation capsules rather than rewriting the conceptual pipeline.
12. Metrics
Section titled “12. Metrics”The qualification run completed successfully.
Final test status : PASSPytest result : 1 passedBlack-box validation : 12/12 passedDuration : 1956.73s (0:32:36)LLM calls : 24Agents involved : 6Effort profile : mediumModel stack : gpt-5.1, gpt-5.2-codex, gpt-5.4-miniToken usage summary:
input_tokens : 543636cached_input_tokens : 35584output_tokens : 146731Estimated total cost:
1.69249030 USDHigh-level cost distribution:
Planning and normalization : 0.3007 USDCode generation : 0.8099 USDSystem checking and harness: 0.5020 USDPackaging : 0.0297 USDUser manual : 0.0502 USDHigh-level token distribution:
Planning and normalization : 121629 tokensCode generation : 202621 tokensSystem checking and harness: 359763 tokensPackaging and user manual : 41938 tokensFor publication purposes, the detailed per-call execution trace is intentionally not exposed. The public metric layer reports only aggregated operational data sufficient to document reproducibility, cost envelope, and qualification effort without disclosing the internal execution choreography.
13. Manual debugging timeline
Section titled “13. Manual debugging timeline”The prototype was stabilized through a short manual rescue loop.
Sequence:
1. Run black-box test battery.2. Observe that CLI help and user-error behavior are already healthy.3. Detect strict inspect failure on Object, Collection and ID.4. Confirm that source HTML files are present and readable.5. Diagnose extraction and capsule-shape defects.6. Patch backend modules without modifying cli.py.7. Re-run strict inspect commands.8. Re-run strict build.9. Validate JSON schema and sections.10. Validate text rendering.11. Re-run full black-box battery.12. Obtain 12/12 PASS.This is an important demonstration point for SpQE Lab.
The value is not that the first generated prototype is perfect. The value is that the defect surface becomes visible, reproducible, locally patchable, and fully revalidated.
14. Final qualification statement
Section titled “14. Final qualification statement”Blender API Capsule Extractor is qualified as a local backend documentation capsule extractor for the Blender relationships.py target.
Final state:
CLI contract: OKinspect workflow: OKbuild workflow: OKdry-run workflow: OKexpected user errors: OKJSON capsule structure: OKACW-readable text capsule: OKcritical Blender API members: OKblack-box verdict: OKFinal verdict:
VERDICT: PASSThe prototype is therefore suitable for inclusion in the SPQE Lab showcase as a qualified Blender backend documentation extractor and as the first backend-capsule experiment supporting the broader SPQE 3D roadmap.