| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724 |
- {
- "version": "3.16",
- "name": "VL_FullStack_CodeGen_6Files",
- "description": "Full-stack code generation for medium-large projects using 6 auxiliary files, default Theme/Theme.vth, and fully parallel VL file generation.",
- "registry": {
- "params": [
- "userRequest(STRING)",
- "targetLang(STRING)"
- ],
- "services": [],
- "apis": [],
- "components": [],
- "vars": [
- "$blueprint(OBJECT)",
- "$blueprintStr(STRING)",
- "$dataSchema(OBJECT)",
- "$dataSchemaStr(STRING)",
- "$layoutPlan(OBJECT)",
- "$layoutPlanStr(STRING)",
- "$fileManifest(OBJECT)",
- "$fileManifestStr(STRING)",
- "$contractSheet(OBJECT)",
- "$contractSheetStr(STRING)",
- "$stateBehavior(OBJECT)",
- "$stateBehaviorStr(STRING)",
- "$vdbCode(STRING)",
- "$vthCode(STRING)",
- "$specValidation(OBJECT)",
- "$codeValidation(OBJECT)",
- "$repairPlan(OBJECT)"
- ],
- "files": {
- "inputs": [],
- "artifacts": [
- "Process/Specs/*",
- "Database/*",
- "Theme/*",
- "Services/*",
- "Sections/*",
- "ExtComponents/*",
- "Apps/*"
- ]
- },
- "docs": {
- "1": "VL Syntax Rules",
- "61": "Agent-100-Blueprint-Prompt",
- "62": "Agent-200-DataSchema-Prompt",
- "63": "Agent-250-LayoutPlan-Prompt",
- "64": "Agent-300-ContractSheet-Prompt",
- "65": "Agent-400-StateBehavior-Prompt",
- "66": "Agent-450-FileManifest-Prompt",
- "67": "Agent-610-VDB-Prompt",
- "68": "Agent-620-VTH-Prompt",
- "69": "Agent-630-VS-Prompt",
- "70": "Agent-640-CP-Prompt",
- "71": "Agent-650-SC-Prompt",
- "72": "Agent-660-VX-Prompt",
- "79": "VL-Aux-6File-Spec"
- }
- },
- "steps": [
- {
- "id": "ClearFiles_005_ClearExisting",
- "meta": {
- "title": "0. Clear existing VL files before regeneration"
- },
- "in": {},
- "out": {},
- "next": "LLM_GenBlueprint"
- },
- {
- "id": "LLM_GenBlueprint",
- "meta": {
- "title": "Phase 0: Generate Blueprint (structured requirements)"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "61"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "User Requirement:"
- },
- {
- "role": "user",
- "content": "=userRequest"
- },
- {
- "role": "user",
- "content": "Target Language:"
- },
- {
- "role": "user",
- "content": "=targetLang || 'zh-CN'"
- },
- {
- "role": "user",
- "content": "Generate Blueprint.json. This is the structured requirements file — define projectName, valueDomains, roles, entities, apps (with pages and sections), and features. Follow the 6-file spec precisely. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$blueprint": "=_result",
- "$blueprintStr": "=_result",
- "/Process/Specs/Blueprint.json": "=_result"
- },
- "next": "Fork_Phase1"
- },
- {
- "id": "Fork_Phase1",
- "meta": {
- "title": "Phase 1: DataSchema + LayoutPlan + FileManifest (parallel)"
- },
- "children": [
- "LLM_GenDataSchema",
- "LLM_GenLayoutPlan",
- "LLM_GenFileManifest"
- ],
- "next": "LLM_GenContractSheet"
- },
- {
- "id": "LLM_GenDataSchema",
- "meta": {
- "title": "Agent-200 DataSchema"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "62"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Blueprint:"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "Generate DataSchema.json. Transform Blueprint entity drafts into precise table structures with VL types, indexes, relations, and testData. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$dataSchema": "=_result",
- "$dataSchemaStr": "=_result",
- "/Process/Specs/DataSchema.json": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "LLM_GenLayoutPlan",
- "meta": {
- "title": "Agent-250 LayoutPlan"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "63"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Blueprint:"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "Generate LayoutPlan.json. Define app layouts (layoutTree with containers, sections, conditionalViews, modals), section structure sketches, and extracted components. Pure visual structure — no data flow. Each app entry MUST include filePath for the final .vx file. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$layoutPlan": "=_result",
- "$layoutPlanStr": "=_result",
- "/Process/Specs/LayoutPlan.json": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "LLM_GenFileManifest",
- "meta": {
- "title": "Agent-450 FileManifest"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "66"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Blueprint:"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "Generate FileManifest.json. Enumerate all VL files (vdb, vth, vs, cp, sc, vx) with paths, types, generatedBy, sourceId, dependsOn, and inter-file references. REQUIRED top-level fields: files([{path,type,sourceId}]), references([{from,to,refType}]). Use format: databaseFile, themeFile, serviceFiles, componentFiles, sectionFiles, appFiles for compatibility. CRITICAL naming rules: databaseFile.path MUST be Database/<ProjectName>.vdb and themeFile.path MUST be Theme/Theme.vth. Every service/component/section/app file must include its exact final filePath. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$fileManifest": "=_result",
- "$fileManifestStr": "=_result",
- "/Process/Specs/FileManifest.json": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "LLM_GenContractSheet",
- "meta": {
- "title": "Phase 2: ContractSheet (depends on DataSchema)"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "64"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Blueprint:"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "DataSchema:"
- },
- {
- "role": "user",
- "content": "=$dataSchemaStr"
- },
- {
- "role": "user",
- "content": "Generate ContractSheet.json. Define: serviceDomains (with VirtualTable declarations and service signatures), sectionContracts (publicProps, publicEvents, publicMethods, consumesServices), componentContracts. All output types must be precise to field level. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$contractSheet": "=_result",
- "$contractSheetStr": "=_result",
- "/Process/Specs/ContractSheet.json": "=_result"
- },
- "next": "LLM_GenStateBehavior"
- },
- {
- "id": "LLM_GenStateBehavior",
- "meta": {
- "title": "Phase 3: StateBehavior (depends on ContractSheet + LayoutPlan)"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "65"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Blueprint:"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "ContractSheet:"
- },
- {
- "role": "user",
- "content": "=$contractSheetStr"
- },
- {
- "role": "user",
- "content": "LayoutPlan:"
- },
- {
- "role": "user",
- "content": "=$layoutPlanStr"
- },
- {
- "role": "user",
- "content": "Generate StateBehavior.json. Define: appStates (global vars, initSequence), sectionBehaviors (keyStates, serviceBindings, initBehavior, internalMethods), eventWiring (cross-module events with handler steps), modalTriggers. keyStates types must match service output types. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$stateBehavior": "=_result",
- "$stateBehaviorStr": "=_result",
- "/Process/Specs/StateBehavior.json": "=_result"
- },
- "next": "Set_390_SkipSpecValidation"
- },
- {
- "id": "Set_390_SkipSpecValidation",
- "meta": {
- "title": "Skip spec validation (generation-only mode)"
- },
- "target": "$specValidation",
- "value": "={\"success\":true,\"skipped\":true,\"reason\":\"validation disabled\"}",
- "next": "Fork_CodeGen"
- },
- {
- "id": "Fork_CodeGen",
- "meta": {
- "title": "Phase 4: Seed default Theme + generate all VL code in parallel"
- },
- "children": [
- "LLM_GenVDB",
- "SeedTheme_GenVTH",
- "Loop_GenVS",
- "Loop_GenCP",
- "Loop_GenSC",
- "Loop_GenVX"
- ],
- "next": "Set_590_SkipCodeValidation"
- },
- {
- "id": "LLM_GenVDB",
- "meta": {
- "title": "Generate .vdb Database"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "67"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Blueprint (valueDomains):"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "DataSchema:"
- },
- {
- "role": "user",
- "content": "=$dataSchemaStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .vdb source code based on DataSchema entities, relations, and testData. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "$vdbCode": "=_result",
- "/{$fileManifest.databaseFile.path || ('Database/' + $blueprint.projectName + '.vdb')}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "SeedTheme_GenVTH",
- "meta": {
- "title": "Seed default Theme/Theme.vth"
- },
- "in": {
- "path": "Theme/Theme.vth"
- },
- "out": {
- "$vthCode": "=_result",
- "/{$fileManifest.themeFile.path || 'Theme/Theme.vth'}": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "Loop_GenVS",
- "meta": {
- "title": "Generate all .vs Service Domains (parallel)"
- },
- "mode": "parallel",
- "source": "=$contractSheet.serviceDomains",
- "children": [
- "LLM_GenVSFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenVSFile",
- "meta": {
- "title": "Generate .vs Service"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "69"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Service Domain:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "Blueprint (valueDomains):"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "DataSchema:"
- },
- {
- "role": "user",
- "content": "=$dataSchemaStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .vs source code. Include VirtualTables and all service methods. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "/{_item.filePath}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Loop_GenCP",
- "meta": {
- "title": "Generate all .cp Components (parallel)"
- },
- "mode": "parallel",
- "source": "=$contractSheet.componentContracts",
- "children": [
- "LLM_GenCPFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenCPFile",
- "meta": {
- "title": "Generate .cp Component"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "70"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Component Contract:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "Blueprint (valueDomains):"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "LayoutPlan (preview sizes):"
- },
- {
- "role": "user",
- "content": "=$layoutPlanStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .cp source code. Pure UI component — NO service calls. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "/{_item.filePath}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Loop_GenSC",
- "meta": {
- "title": "Generate all .sc Sections (parallel)"
- },
- "mode": "parallel",
- "source": "=$contractSheet.sectionContracts",
- "children": [
- "LLM_GenSCFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenSCFile",
- "meta": {
- "title": "Generate .sc Section"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "71"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Section Contract:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "ContractSheet (service signatures):"
- },
- {
- "role": "user",
- "content": "=$contractSheetStr"
- },
- {
- "role": "user",
- "content": "LayoutPlan (section structure):"
- },
- {
- "role": "user",
- "content": "=$layoutPlanStr"
- },
- {
- "role": "user",
- "content": "StateBehavior (state + bindings):"
- },
- {
- "role": "user",
- "content": "=$stateBehaviorStr"
- },
- {
- "role": "user",
- "content": "Blueprint (valueDomains):"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .sc source code. Section handles business logic and service calls. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "/{_item.filePath}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Loop_GenVX",
- "meta": {
- "title": "Generate all .vx Apps (parallel)"
- },
- "mode": "parallel",
- "source": "=$layoutPlan.apps",
- "children": [
- "LLM_GenVXFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenVXFile",
- "meta": {
- "title": "Generate .vx App"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "79",
- "72"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "App Layout:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "ContractSheet (section interfaces):"
- },
- {
- "role": "user",
- "content": "=$contractSheetStr"
- },
- {
- "role": "user",
- "content": "StateBehavior (event wiring):"
- },
- {
- "role": "user",
- "content": "=$stateBehaviorStr"
- },
- {
- "role": "user",
- "content": "Blueprint (valueDomains):"
- },
- {
- "role": "user",
- "content": "=$blueprintStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .vx source code. App manages routing, section placement, and cross-section event wiring. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "/{_item.filePath || ('Apps/' + _item.appId + '.vx')}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Set_590_SkipCodeValidation",
- "meta": {
- "title": "Phase 5: Skip generated-code validation"
- },
- "target": "$codeValidation",
- "value": "={\"success\":true,\"skipped\":true,\"reason\":\"validation disabled\"}",
- "next": "Stop_Done"
- },
- {
- "id": "Stop_Done",
- "meta": {
- "title": "Code Generation Complete"
- }
- }
- ]
- }
|