Case study · Backend / Python
WebWorks Generator (WWG)
Implemented · 9 production builds recorded, 5 operator-approved · 143 Python test files
Turns an existing web page into a reusable React/Next.js page, separating components, content, theme and local assets. It then verifies the result against the source one dimension at a time, so approval is attached to the exact generated artifact rather than assumed from a successful build.



Purpose
Turns an existing web page into a reusable React/Next.js page, separating components, content, theme and local assets.
The problem
A generated page can build successfully and still differ from its source. Approval has to attach to the exact generated artifact, not be assumed from a successful build.
What it contributes
Generation, in the WebWorks line: proven website designs become componentised products, verified against their source one dimension at a time.
Principal capabilities
Backend
A Python 3.12 producer parses HTML and CSS, captures computed styles in a real browser, classifies sections, roles, plugins and blocks, emits component code, and extracts theme tokens, content and local assets. It also supports derivatives by replacing content, theme skin and licensed stock imagery.
Verification
Before conversion, a source-passthrough gate proves the staged copy makes zero external network requests. Acceptance is defined by 17 dependency-ordered dimensions in a branched JSON contract shared by the Python writer and the TypeScript review console. Approval is bound to an artifact digest, so regeneration or a raised issue invalidates it.
Frontend
A local Next.js review console renders the generated page layer by layer, so a defect can be traced to the stage that introduced it before a dimension is approved.
Review console
Built with
- Python
- TypeScript
- React
- Next.js
def closure(requires: dict, start: str) -> set[str]:
"""`start` and everything it transitively requires.
A SET REACHED BY WALKING, not a list built by following one predecessor. The pipeline
branches — `roles` joins sections and plugins — so a chain-walk visited one arm and
silently declared a page complete with the other arm unaccepted.
"""
seen, stack = {start}, [start]
while stack:
for nxt in requires.get(stack.pop(), []):
if nxt not in seen:
seen.add(nxt)
stack.append(nxt)
return seenImplementation evidence
- 9 production builds recorded, 5 operator-approved.
- 143 Python test files.
- Recorded fixes include an encoding default that corrupted inherited punctuation and a test runner that could appear green when suites exited during import.
Visual evidence




A dimension can be accepted only after the dimensions it depends on. The sequence branches: blocks needs sections, capture and plugins; components needs roles and capture. Approval is bound to the artifact digest.