| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860 |
- {
- "version": "3.16",
- "name": "VL_FullStack_CodeGen_9Files",
- "description": "Full-stack code generation using 9 auxiliary files, default Theme/Theme.vth, and fully parallel VL file generation.",
- "_source": "DocCenter paths: 91-107 (agent prompts), 109 (9-file aux spec), 1 (VL 3.7 syntax)",
- "registry": {
- "params": [
- "userRequest(STRING)",
- "userRequirement(STRING)",
- "targetLang(STRING)"
- ],
- "services": [],
- "apis": [],
- "components": [
- "ClearExisting"
- ],
- "vars": [
- "$intentSpec(OBJECT)",
- "$intentSpecStr(STRING)",
- "$domainSchema(OBJECT)",
- "$domainSchemaStr(STRING)",
- "$serviceContractMap(OBJECT)",
- "$serviceContractMapStr(STRING)",
- "$uiContractMap(OBJECT)",
- "$uiContractMapStr(STRING)",
- "$moduleManifest(OBJECT)",
- "$moduleManifestStr(STRING)",
- "$dependencyGraph(OBJECT)",
- "$qualityGateSpec(OBJECT)",
- "$specValidation(OBJECT)",
- "$executionPlan(OBJECT)",
- "$vdbCode(STRING)",
- "$vthCode(STRING)",
- "$codeValidation(OBJECT)",
- "$repairPlan(OBJECT)",
- "$runState(OBJECT)"
- ],
- "files": {
- "inputs": [],
- "artifacts": [
- "Process/Specs/*",
- "Process/Run/*",
- "Database/*",
- "Theme/*",
- "Services/*",
- "Sections/*",
- "ExtComponents/*",
- "Apps/*"
- ]
- },
- "docs": {
- "1": "VL 3.7 Syntax Specification",
- "91": "Agent-100-IntentSpec-Prompt",
- "92": "Agent-200-DomainSchema-Prompt",
- "93": "Agent-300-ServiceContractMap-Prompt",
- "94": "Agent-400-UIContractMap-Prompt",
- "95": "Agent-500-ModuleManifest-Prompt",
- "96": "Agent-600-DependencyGraph-Prompt",
- "97": "Agent-700-QualityGateSpec-Prompt",
- "98": "Agent-800-ExecutionPlan-Prompt",
- "99": "Agent-900-RepairSpecs-Prompt",
- "100": "Agent-GenDatabase-Prompt",
- "101": "Agent-GenTheme-Prompt",
- "102": "Agent-GenServiceDomain-Prompt",
- "103": "Agent-GenComponent-Prompt",
- "104": "Agent-GenSection-Prompt",
- "105": "Agent-GenApp-Prompt",
- "106": "Agent-RepairPlan-Prompt",
- "107": "Agent-RepairVLFile-Prompt",
- "109": "VL-Aux-9File-Spec"
- }
- },
- "steps": [
- {
- "id": "Component_ClearExisting",
- "meta": {
- "title": "0. Clear existing VL files before regeneration"
- },
- "in": {},
- "out": {},
- "next": "Set_InitRunState"
- },
- {
- "id": "Set_InitRunState",
- "target": "$runState",
- "value": "={\"phase\":\"init\",\"status\":\"running\"}",
- "next": "LLM_GenIntentSpec",
- "meta": {
- "title": "Initialize RunState"
- }
- },
- {
- "id": "LLM_GenIntentSpec",
- "meta": {
- "title": "Agent-100 Generate IntentSpec"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "91"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "User Requirement:"
- },
- {
- "role": "user",
- "content": "=userRequest || userRequirement"
- },
- {
- "role": "user",
- "content": "Target Language:"
- },
- {
- "role": "user",
- "content": "=targetLang || 'zh-CN'"
- },
- {
- "role": "user",
- "content": "Generate Process/Specs/IntentSpec.json. Follow the spec precisely. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$intentSpec": "=_result",
- "$intentSpecStr": "=_result",
- "/Process/Specs/IntentSpec.json": "=_result"
- },
- "next": "LLM_GenDomainSchema"
- },
- {
- "id": "LLM_GenDomainSchema",
- "meta": {
- "title": "Agent-200 Generate DomainSchema"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "92"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "IntentSpec:"
- },
- {
- "role": "user",
- "content": "=$intentSpecStr"
- },
- {
- "role": "user",
- "content": "Generate Process/Specs/DomainSchema.json. Use exact VL types and canonical valueDomains. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$domainSchema": "=_result",
- "$domainSchemaStr": "=_result",
- "/Process/Specs/DomainSchema.json": "=_result"
- },
- "next": "Set_FanoutContractDesign"
- },
- {
- "id": "Set_FanoutContractDesign",
- "target": "$runState.phase",
- "value": "\"contract_design\"",
- "children": [
- "LLM_GenServiceContractMap",
- "LLM_GenQualityGateSpec"
- ],
- "next": "LLM_GenUIContractMap",
- "meta": {
- "title": "Parallel: ServiceContractMap + QualityGateSpec"
- }
- },
- {
- "id": "LLM_GenServiceContractMap",
- "meta": {
- "title": "Agent-300 ServiceContractMap"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "93"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "IntentSpec:"
- },
- {
- "role": "user",
- "content": "=$intentSpecStr"
- },
- {
- "role": "user",
- "content": "DomainSchema:"
- },
- {
- "role": "user",
- "content": "=$domainSchemaStr"
- },
- {
- "role": "user",
- "content": "Generate Process/Specs/ServiceContractMap.json. Keep strict DomainId.ServiceName format. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$serviceContractMap": "=_result",
- "$serviceContractMapStr": "=_result",
- "/Process/Specs/ServiceContractMap.json": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "LLM_GenQualityGateSpec",
- "meta": {
- "title": "Agent-700 QualityGateSpec"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "97"
- ],
- "max_tokens": 8192,
- "messages": [
- {
- "role": "user",
- "content": "IntentSpec:"
- },
- {
- "role": "user",
- "content": "=$intentSpecStr"
- },
- {
- "role": "user",
- "content": "DomainSchema:"
- },
- {
- "role": "user",
- "content": "=$domainSchemaStr"
- },
- {
- "role": "user",
- "content": "Generate Process/Specs/QualityGateSpec.json. Include spec integrity and VL code safety gate rules. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$qualityGateSpec": "=_result",
- "/Process/Specs/QualityGateSpec.json": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "LLM_GenUIContractMap",
- "meta": {
- "title": "Agent-400 UIContractMap"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "94"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "IntentSpec:"
- },
- {
- "role": "user",
- "content": "=$intentSpecStr"
- },
- {
- "role": "user",
- "content": "DomainSchema:"
- },
- {
- "role": "user",
- "content": "=$domainSchemaStr"
- },
- {
- "role": "user",
- "content": "ServiceContractMap:"
- },
- {
- "role": "user",
- "content": "=$serviceContractMapStr"
- },
- {
- "role": "user",
- "content": "Generate Process/Specs/UIContractMap.json. Enforce section cohesion, event wiring completeness, and app/section/component boundaries. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$uiContractMap": "=_result",
- "$uiContractMapStr": "=_result",
- "/Process/Specs/UIContractMap.json": "=_result"
- },
- "next": "Set_FanoutManifestGraph"
- },
- {
- "id": "Set_FanoutManifestGraph",
- "target": "$runState.phase",
- "value": "\"manifest_graph\"",
- "children": [
- "LLM_GenModuleManifest",
- "LLM_GenDependencyGraph"
- ],
- "next": "Set_320_SkipSpecValidation",
- "meta": {
- "title": "Parallel: ModuleManifest + DependencyGraph"
- }
- },
- {
- "id": "LLM_GenModuleManifest",
- "meta": {
- "title": "Agent-500 ModuleManifest"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "95"
- ],
- "max_tokens": 8192,
- "messages": [
- {
- "role": "user",
- "content": "IntentSpec:"
- },
- {
- "role": "user",
- "content": "=$intentSpecStr"
- },
- {
- "role": "user",
- "content": "ServiceContractMap:"
- },
- {
- "role": "user",
- "content": "=$serviceContractMapStr"
- },
- {
- "role": "user",
- "content": "UIContractMap:"
- },
- {
- "role": "user",
- "content": "=$uiContractMapStr"
- },
- {
- "role": "user",
- "content": "Generate Process/Specs/ModuleManifest.json. REQUIRED top-level fields: databaseFile({path,name}), themeFile({path,name}), serviceFiles([{path,name,domainId}]), componentFiles([{path,name,componentId}]), sectionFiles([{path,name,sectionId}]), appFiles([{path,name,appId}]). 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 use its exact final path. Paths must be relative. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$moduleManifest": "=_result",
- "$moduleManifestStr": "=_result",
- "/Process/Specs/ModuleManifest.json": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "LLM_GenDependencyGraph",
- "meta": {
- "title": "Agent-600 DependencyGraph"
- },
- "in": {
- "stream": true,
- "docs": [
- "109",
- "96"
- ],
- "max_tokens": 8192,
- "messages": [
- {
- "role": "user",
- "content": "ServiceContractMap:"
- },
- {
- "role": "user",
- "content": "=$serviceContractMapStr"
- },
- {
- "role": "user",
- "content": "UIContractMap:"
- },
- {
- "role": "user",
- "content": "=$uiContractMapStr"
- },
- {
- "role": "user",
- "content": "Generate Process/Specs/DependencyGraph.json. Build accurate module/service/state dependency edges. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$dependencyGraph": "=_result",
- "/Process/Specs/DependencyGraph.json": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "Set_320_SkipSpecValidation",
- "meta": {
- "title": "Skip spec validation (generation-only mode)"
- },
- "target": "$specValidation",
- "value": "={\"success\":true,\"skipped\":true,\"reason\":\"validation disabled\"}",
- "next": "LLM_BuildExecutionPlan"
- },
- {
- "id": "LLM_BuildExecutionPlan",
- "meta": {
- "title": "Build ExecutionPlan"
- },
- "in": {
- "stream": true,
- "docs": [
- "109",
- "98"
- ],
- "max_tokens": 8192,
- "messages": [
- {
- "role": "user",
- "content": "ModuleManifest:"
- },
- {
- "role": "user",
- "content": "=$moduleManifestStr"
- },
- {
- "role": "user",
- "content": "DependencyGraph:"
- },
- {
- "role": "user",
- "content": "=$dependencyGraph"
- },
- {
- "role": "user",
- "content": "QualityGateSpec:"
- },
- {
- "role": "user",
- "content": "=$qualityGateSpec"
- },
- {
- "role": "user",
- "content": "Generate Process/Run/ExecutionPlan.json. Build DAG tasks and parallel groups from module dependencies. Output ONLY valid JSON."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$executionPlan": "=_result",
- "/Process/Run/ExecutionPlan.json": "=_result"
- },
- "next": "Set_GenerationStart"
- },
- {
- "id": "Set_GenerationStart",
- "target": "$runState.phase",
- "value": "\"generation\"",
- "children": [
- "LLM_GenDatabase",
- "SeedTheme_GenTheme",
- "Loop_GenServiceDomains",
- "Loop_GenComponents",
- "Loop_GenSections",
- "Loop_GenApps"
- ],
- "next": "Set_560_SkipCodeValidation",
- "meta": {
- "title": "Code Generation Fanout (parallel)"
- }
- },
- {
- "id": "LLM_GenDatabase",
- "meta": {
- "title": "Generate .vdb Database"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "100"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "DomainSchema:"
- },
- {
- "role": "user",
- "content": "=$domainSchemaStr"
- },
- {
- "role": "user",
- "content": "ModuleManifest database file:"
- },
- {
- "role": "user",
- "content": "=$moduleManifest.databaseFile"
- },
- {
- "role": "user",
- "content": "Generate complete VL .vdb source code. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "$vdbCode": "=_result",
- "/{$moduleManifest.databaseFile.path}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "SeedTheme_GenTheme",
- "meta": {
- "title": "Seed default Theme/Theme.vth"
- },
- "in": {
- "path": "Theme/Theme.vth"
- },
- "out": {
- "$vthCode": "=_result",
- "/{$moduleManifest.themeFile.path || 'Theme/Theme.vth'}": "=_result"
- },
- "next": "RETURN"
- },
- {
- "id": "Loop_GenServiceDomains",
- "meta": {
- "title": "Generate all .vs (parallel)"
- },
- "mode": "parallel",
- "source": "=$moduleManifest.serviceFiles",
- "children": [
- "LLM_GenServiceDomainFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenServiceDomainFile",
- "meta": {
- "title": "Generate .vs Service"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "102"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "Target file:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "ServiceContractMap:"
- },
- {
- "role": "user",
- "content": "=$serviceContractMapStr"
- },
- {
- "role": "user",
- "content": "DomainSchema:"
- },
- {
- "role": "user",
- "content": "=$domainSchemaStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .vs source code for this service domain. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "/{_item.path}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Loop_GenComponents",
- "meta": {
- "title": "Generate all .cp (parallel)"
- },
- "mode": "parallel",
- "source": "=$moduleManifest.componentFiles",
- "children": [
- "LLM_GenComponentFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenComponentFile",
- "meta": {
- "title": "Generate .cp Component"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "103"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "Target file:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "UIContractMap:"
- },
- {
- "role": "user",
- "content": "=$uiContractMapStr"
- },
- {
- "role": "user",
- "content": "IntentSpec:"
- },
- {
- "role": "user",
- "content": "=$intentSpecStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .cp source code. Pure UI only, no service calls. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "/{_item.path}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Loop_GenSections",
- "meta": {
- "title": "Generate all .sc (parallel)"
- },
- "mode": "parallel",
- "source": "=$moduleManifest.sectionFiles",
- "children": [
- "LLM_GenSectionFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenSectionFile",
- "meta": {
- "title": "Generate .sc Section"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "104"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "Target file:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "UIContractMap:"
- },
- {
- "role": "user",
- "content": "=$uiContractMapStr"
- },
- {
- "role": "user",
- "content": "ServiceContractMap:"
- },
- {
- "role": "user",
- "content": "=$serviceContractMapStr"
- },
- {
- "role": "user",
- "content": "DomainSchema:"
- },
- {
- "role": "user",
- "content": "=$domainSchemaStr"
- },
- {
- "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.path}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Loop_GenApps",
- "meta": {
- "title": "Generate all .vx (parallel)"
- },
- "mode": "parallel",
- "source": "=$moduleManifest.appFiles",
- "children": [
- "LLM_GenAppFile"
- ],
- "next": "RETURN"
- },
- {
- "id": "LLM_GenAppFile",
- "meta": {
- "title": "Generate .vx App"
- },
- "in": {
- "stream": true,
- "docs": [
- "1",
- "109",
- "105"
- ],
- "max_tokens": 16000,
- "messages": [
- {
- "role": "user",
- "content": "Target file:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "UIContractMap:"
- },
- {
- "role": "user",
- "content": "=$uiContractMapStr"
- },
- {
- "role": "user",
- "content": "Generate complete VL .vx source code. App controls routing, section orchestration, and app-level state/event wiring. Output ONLY VL source code, no markdown fences."
- }
- ]
- },
- "out": {
- "/{_item.path}": "=_result"
- },
- "onError": "skip",
- "next": "RETURN"
- },
- {
- "id": "Set_560_SkipCodeValidation",
- "meta": {
- "title": "Skip generated-code validation (generation-only mode)"
- },
- "target": "$codeValidation",
- "value": "={\"success\":true,\"skipped\":true,\"reason\":\"validation disabled\"}",
- "next": "Stop_Success"
- },
- {
- "id": "Stop_Success",
- "meta": {
- "title": "Code Generation Complete"
- }
- }
- ]
- }
|