| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- {
- "version": "3.16",
- "name": "IncrementalUpdate",
- "sectionMerge": true,
- "registry": {
- "params": [
- "changeRequest(STRING)",
- "currentMeta(OBJECT)"
- ],
- "services": [],
- "apis": [],
- "components": [],
- "vars": [
- "$updatedMeta(OBJECT)",
- "$metaDiff(OBJECT)",
- "$affectedFiles(OBJECT)",
- "$regeneratedFiles(OBJECT)"
- ],
- "files": {
- "inputs": [
- ".vl-code/ProjectMeta.json"
- ],
- "artifacts": [
- "Services/*",
- "Sections/*",
- "ExtComponents/*",
- "Apps/*"
- ]
- },
- "docs": {
- "1": "VL Syntax Rules"
- }
- },
- "steps": [
- {
- "id": "LLM_010_AnalyzeMeta",
- "meta": {
- "title": "Analyze current metadata + change request"
- },
- "in": {
- "docs": [
- "1"
- ],
- "max_tokens": 32768,
- "messages": [
- {
- "role": "user",
- "content": "Current ProjectMeta:"
- },
- {
- "role": "user",
- "content": "=currentMeta"
- },
- {
- "role": "user",
- "content": "Change Request:"
- },
- {
- "role": "user",
- "content": "=changeRequest"
- },
- {
- "role": "user",
- "content": "Return ONLY the FULL updated ProjectMeta JSON. Preserve specVersion, projectName, vlVersion, config, every existing filePath, and every unaffected app/section/component/service/database entry. Apply only the requested change and keep the result internally consistent."
- }
- ],
- "output_config": {
- "format": {
- "type": "json_object"
- }
- }
- },
- "out": {
- "$updatedMeta": "=_result"
- },
- "next": "MetaDiff_020_DiffMeta"
- },
- {
- "id": "MetaDiff_020_DiffMeta",
- "meta": {
- "title": "Compute metadata diff (deterministic, no LLM)"
- },
- "in": {
- "oldMeta": "=currentMeta",
- "newMeta": "=$updatedMeta"
- },
- "out": {
- "$metaDiff": "=_result",
- "$affectedFiles": "=_result.affectedFiles",
- "/.vl-code/ProjectMeta.json": "=$updatedMeta"
- },
- "next": "Loop_RegenFiles"
- },
- {
- "id": "Loop_RegenFiles",
- "meta": {
- "title": "Regenerate affected VL files"
- },
- "source": "=$affectedFiles",
- "mode": "parallel",
- "children": [
- "LLM_030_RegenFile"
- ],
- "next": "Set_040_SkipValidation",
- "onError": "skip"
- },
- {
- "id": "LLM_030_RegenFile",
- "meta": {
- "title": "Regenerate single VL file"
- },
- "in": {
- "docs": [
- "1"
- ],
- "stream": true,
- "max_tokens": 32768,
- "readFiles": [
- "=_item"
- ],
- "messages": [
- {
- "role": "user",
- "content": "File to regenerate:"
- },
- {
- "role": "user",
- "content": "=_item"
- },
- {
- "role": "user",
- "content": "Updated metadata:"
- },
- {
- "role": "user",
- "content": "=$updatedMeta"
- },
- {
- "role": "user",
- "content": "Change context (diff):"
- },
- {
- "role": "user",
- "content": "=$metaDiff"
- },
- {
- "role": "user",
- "content": "Regenerate the COMPLETE file at this path using the updated metadata and diff context. Preserve unaffected behavior and structure, and output ONLY the updated file contents. For VL source files (.vs/.cp/.sc/.vx), the first non-empty line MUST be '// VL_VERSION:3.7'."
- }
- ]
- },
- "out": {
- "/{_item}": "=_result"
- },
- "onError": "retry",
- "retryCount": 1,
- "next": "RETURN"
- },
- {
- "id": "Set_040_SkipValidation",
- "meta": {
- "title": "Skip validation (generation-only mode)"
- },
- "target": "$validationSkipped",
- "value": "=true",
- "next": "Stop_Done"
- },
- {
- "id": "Stop_Done",
- "meta": {
- "title": "Incremental update complete"
- }
- }
- ]
- }
|