batch-adjust.json 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. {
  2. "version": "3.16",
  3. "name": "BatchAdjust",
  4. "description": "Apply multiple small adjustments in one pass — e.g., rename fields, add buttons across pages, fix multiple UI issues. Decomposes the request into atomic changes, executes each, and finalizes the project without validation gating.",
  5. "sectionMerge": true,
  6. "registry": {
  7. "params": [
  8. "batchRequest(STRING)",
  9. "currentMeta(OBJECT)"
  10. ],
  11. "services": [],
  12. "apis": [],
  13. "components": [],
  14. "vars": [
  15. "$changeList(ARRAY)",
  16. "$changeResults(ARRAY)",
  17. "$updatedMeta(OBJECT)"
  18. ],
  19. "files": {
  20. "inputs": [
  21. ".vl-code/ProjectMeta.json",
  22. "Sections/*",
  23. "Services/*",
  24. "Database/*",
  25. "Apps/*"
  26. ],
  27. "artifacts": [
  28. ".vl-code/ProjectMeta.json",
  29. "Sections/*",
  30. "Services/*",
  31. "Database/*",
  32. "Apps/*",
  33. "ExtComponents/*"
  34. ]
  35. },
  36. "docs": {
  37. "1": "VL 3.7 Syntax Rules"
  38. }
  39. },
  40. "steps": [
  41. {
  42. "id": "LLM_010_Decompose",
  43. "meta": {
  44. "title": "1. Decompose batch request into atomic changes"
  45. },
  46. "in": {
  47. "docs": [
  48. "1"
  49. ],
  50. "max_tokens": 32768,
  51. "messages": [
  52. {
  53. "role": "user",
  54. "content": "You are a VL project architect. Break down the following batch change request into a list of atomic, independent changes.\n\nCurrent ProjectMeta:"
  55. },
  56. {
  57. "role": "user",
  58. "content": "=currentMeta"
  59. },
  60. {
  61. "role": "user",
  62. "content": "Batch request:"
  63. },
  64. {
  65. "role": "user",
  66. "content": "=batchRequest"
  67. },
  68. {
  69. "role": "user",
  70. "content": "Return JSON with:\n- updatedMeta: FULL updated ProjectMeta reflecting ALL changes\n- changes: [{id: \"change_01\", type: \"editSection\"|\"editService\"|\"editDatabase\"|\"editApp\"|\"newComponent\", file: \"path/to/file\", description: \"what to change\", priority: 1-5}]\n\nSort changes by priority (1=highest). Group related changes into single atomic operations where possible. Each change must be independently executable."
  71. }
  72. ],
  73. "output_config": {
  74. "format": {
  75. "type": "json_object"
  76. }
  77. },
  78. "stream": true
  79. },
  80. "out": {
  81. "$changeList": "=_result.changes",
  82. "$updatedMeta": "=_result.updatedMeta"
  83. },
  84. "next": "Pause_020_ReviewChanges"
  85. },
  86. {
  87. "id": "Pause_020_ReviewChanges",
  88. "meta": {
  89. "title": "2. Review change list (developer checkpoint)"
  90. },
  91. "resumeResultTarget": "$approved",
  92. "next": "Branch_025_CheckApproval"
  93. },
  94. {
  95. "id": "Branch_025_CheckApproval",
  96. "meta": {
  97. "title": "Check approval"
  98. },
  99. "cases": [
  100. {
  101. "condition": "=$approved === false",
  102. "next": "Stop_Cancelled"
  103. }
  104. ],
  105. "default": "Loop_030_ExecuteChanges"
  106. },
  107. {
  108. "id": "Loop_030_ExecuteChanges",
  109. "meta": {
  110. "title": "3. Execute each atomic change"
  111. },
  112. "source": "=$changeList",
  113. "mode": "serial",
  114. "children": [
  115. "LLM_031_ApplyChange"
  116. ],
  117. "next": "Set_040_UpdateMeta",
  118. "onError": "skip"
  119. },
  120. {
  121. "id": "LLM_031_ApplyChange",
  122. "meta": {
  123. "title": "Apply change: =_item.id — =_item.description"
  124. },
  125. "in": {
  126. "docs": [
  127. "1"
  128. ],
  129. "max_tokens": 32768,
  130. "stream": true,
  131. "readFiles": [
  132. "=_item.file"
  133. ],
  134. "messages": [
  135. {
  136. "role": "user",
  137. "content": "Apply the following change to a VL file.\n\nChange spec:"
  138. },
  139. {
  140. "role": "user",
  141. "content": "=_item"
  142. },
  143. {
  144. "role": "user",
  145. "content": "Updated project metadata (for reference):"
  146. },
  147. {
  148. "role": "user",
  149. "content": "=$updatedMeta"
  150. },
  151. {
  152. "role": "user",
  153. "content": "IMPORTANT: Output the COMPLETE updated file. Preserve everything that isn't being changed. Use VL 3.7 syntax with hyphen indentation.\n\nIMPORTANT: The file MUST start with '// VL_VERSION:3.7' as the first non-empty line."
  154. }
  155. ]
  156. },
  157. "out": {
  158. "/{_item.file}": "=_result"
  159. },
  160. "onError": "skip"
  161. },
  162. {
  163. "id": "Set_040_UpdateMeta",
  164. "meta": {
  165. "title": "4. Update ProjectMeta"
  166. },
  167. "in": {},
  168. "out": {
  169. "/.vl-code/ProjectMeta.json": "=$updatedMeta"
  170. },
  171. "next": "Set_050_SkipValidation"
  172. },
  173. {
  174. "id": "Set_050_SkipValidation",
  175. "meta": {
  176. "title": "5. Skip validation (generation-only mode)"
  177. },
  178. "target": "$validationSkipped",
  179. "value": "=true",
  180. "next": "Stop_Done"
  181. },
  182. {
  183. "id": "Stop_Done",
  184. "meta": {
  185. "title": "Batch adjustment complete"
  186. }
  187. },
  188. {
  189. "id": "Stop_Cancelled",
  190. "meta": {
  191. "title": "Batch adjustment cancelled by developer"
  192. }
  193. }
  194. ]
  195. }