soloforge 1.1.46 → 1.1.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +12 -0
  2. package/dist/context/adapters/shared/integration_guide.js +3 -1
  3. package/dist/context/adapters/shared/integration_guide.js.map +1 -1
  4. package/dist/core/gate_record_store.d.ts +11 -7
  5. package/dist/core/gate_record_store.d.ts.map +1 -1
  6. package/dist/core/gate_record_store.js +31 -17
  7. package/dist/core/gate_record_store.js.map +1 -1
  8. package/dist/core/observer.d.ts.map +1 -1
  9. package/dist/core/observer.js +7 -4
  10. package/dist/core/observer.js.map +1 -1
  11. package/dist/domain/asset_registry/derived_registry.d.ts.map +1 -1
  12. package/dist/domain/asset_registry/derived_registry.js +20 -5
  13. package/dist/domain/asset_registry/derived_registry.js.map +1 -1
  14. package/dist/domain/asset_registry/derived_types.d.ts +5 -1
  15. package/dist/domain/asset_registry/derived_types.d.ts.map +1 -1
  16. package/dist/domain/build/contract.d.ts.map +1 -1
  17. package/dist/domain/build/contract.js +3 -8
  18. package/dist/domain/build/contract.js.map +1 -1
  19. package/dist/domain/build/engine.d.ts +3 -2
  20. package/dist/domain/build/engine.d.ts.map +1 -1
  21. package/dist/domain/build/engine.js +5 -2
  22. package/dist/domain/build/engine.js.map +1 -1
  23. package/dist/domain/design/contract.d.ts.map +1 -1
  24. package/dist/domain/design/contract.js +2 -31
  25. package/dist/domain/design/contract.js.map +1 -1
  26. package/dist/domain/design/engine.d.ts +3 -2
  27. package/dist/domain/design/engine.d.ts.map +1 -1
  28. package/dist/domain/design/engine.js +5 -2
  29. package/dist/domain/design/engine.js.map +1 -1
  30. package/dist/domain/engine_helpers.d.ts +18 -2
  31. package/dist/domain/engine_helpers.d.ts.map +1 -1
  32. package/dist/domain/engine_helpers.js +87 -8
  33. package/dist/domain/engine_helpers.js.map +1 -1
  34. package/dist/domain/operate/contract.js +1 -1
  35. package/dist/domain/operate/contract.js.map +1 -1
  36. package/dist/domain/operate/engine.d.ts +3 -2
  37. package/dist/domain/operate/engine.d.ts.map +1 -1
  38. package/dist/domain/operate/engine.js +5 -2
  39. package/dist/domain/operate/engine.js.map +1 -1
  40. package/dist/domain/verify/engine.d.ts +3 -2
  41. package/dist/domain/verify/engine.d.ts.map +1 -1
  42. package/dist/domain/verify/engine.js +5 -2
  43. package/dist/domain/verify/engine.js.map +1 -1
  44. package/dist/gate/executors/executors_artifact.d.ts.map +1 -1
  45. package/dist/gate/executors/executors_artifact.js +8 -5
  46. package/dist/gate/executors/executors_artifact.js.map +1 -1
  47. package/dist/gate/executors/executors_prerequisite.d.ts.map +1 -1
  48. package/dist/gate/executors/executors_prerequisite.js +26 -6
  49. package/dist/gate/executors/executors_prerequisite.js.map +1 -1
  50. package/dist/gate/executors/executors_regex_scan.js +2 -2
  51. package/dist/gate/executors/executors_regex_scan.js.map +1 -1
  52. package/dist/gate/executors/executors_trace.d.ts.map +1 -1
  53. package/dist/gate/executors/executors_trace.js +2 -0
  54. package/dist/gate/executors/executors_trace.js.map +1 -1
  55. package/dist/gate/gate_registry_bridge.d.ts +7 -6
  56. package/dist/gate/gate_registry_bridge.d.ts.map +1 -1
  57. package/dist/gate/gate_registry_bridge.js +51 -13
  58. package/dist/gate/gate_registry_bridge.js.map +1 -1
  59. package/dist/server/tools/sf_doctor.d.ts +1 -0
  60. package/dist/server/tools/sf_doctor.d.ts.map +1 -1
  61. package/dist/server/tools/sf_doctor.js +15 -1
  62. package/dist/server/tools/sf_doctor.js.map +1 -1
  63. package/dist/server/tools/sf_gate.d.ts +1 -1
  64. package/dist/server/tools/sf_gate.js +2 -2
  65. package/dist/server/tools/sf_gate.js.map +1 -1
  66. package/dist/server/tools/sf_work.d.ts.map +1 -1
  67. package/dist/server/tools/sf_work.js +18 -6
  68. package/dist/server/tools/sf_work.js.map +1 -1
  69. package/package.json +2 -1
  70. package/templates/build/enforced.md +73 -0
  71. package/templates/build//344/270/223/351/241/271/345/256/236/347/216/260.md +75 -0
  72. package/templates/build//345/256/211/345/205/250/345/212/240/345/233/272.md +75 -0
  73. package/templates/build//346/265/213/350/257/225/344/274/230/345/205/210/347/274/226/347/240/201.md +50 -79
  74. package/templates/build//346/265/213/350/257/225/350/256/241/345/210/222.md +26 -24
  75. package/templates/build//347/274/226/347/240/201/347/272/252/345/276/213.md +75 -0
  76. package/templates/build//350/260/203/350/257/225/346/216/222/346/237/245.md +44 -75
  77. package/templates/build//351/207/215/346/236/204/346/226/271/346/263/225.md +68 -0
  78. package/templates/design/API/346/216/245/345/217/243/350/247/204/346/240/274/346/226/207/346/241/243.md +31 -28
  79. package/templates/design/enforced.md +47 -77
  80. package/templates/design//345/205/250/347/224/237/345/221/275/345/221/250/346/234/237/345/267/245/344/275/234/346/265/201/345/257/274/350/210/252.md +1 -0
  81. package/templates/design//345/205/274/345/256/271/346/200/247/344/270/216/350/277/201/347/247/273/350/257/204/344/274/260.md +71 -0
  82. package/templates/design//345/206/263/347/255/226/344/270/216/351/200/211/345/236/213.md +70 -0
  83. package/templates/design//345/210/207/347/211/207/350/247/204/345/210/222.md +49 -55
  84. package/templates/design//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/346/226/207/346/241/243.md +33 -47
  85. package/templates/design//346/236/266/346/236/204/350/256/276/350/256/241.md +41 -83
  86. package/templates/design//351/234/200/346/261/202/345/210/206/346/236/220.md +31 -59
  87. package/templates/operate/enforced.md +11 -0
  88. package/templates/operate//344/270/212/347/272/277/350/247/202/345/257/237.md +53 -32
  89. package/templates/operate//345/217/221/345/270/203/350/257/264/346/230/216.md +3 -0
  90. package/templates/operate//351/203/250/347/275/262/351/205/215/347/275/256.md +83 -0
  91. package/templates/shared/enforced.md +46 -5
  92. package/templates/shared//345/217/215/351/246/210/344/277/256/345/244/215/351/227/255/347/216/257.md +86 -0
  93. package/templates/shared//345/267/245/347/250/213/346/211/247/350/241/214/346/200/273/347/272/262.md +148 -0
  94. package/templates/shared//345/267/245/347/250/213/347/272/252/345/276/213.md +71 -0
  95. package/templates/shared//345/274/200/345/217/221/350/200/205/345/256/252/346/263/225.md +48 -43
  96. package/templates/shared//346/234/272/345/210/266/350/257/264/346/230/216.md +67 -0
  97. package/templates/shared//350/257/201/346/215/256/351/251/261/345/212/250/344/270/216/345/217/215/345/271/273/350/247/211.md +27 -17
  98. package/templates/shared//350/264/241/347/214/256/350/247/204/350/214/203.md +78 -0
  99. package/templates/verify/enforced.md +3 -0
  100. package/templates/verify//344/272/244/344/273/230/345/256/214/345/244/207/346/200/247/345/256/241/346/237/245.md +45 -87
  101. package/templates/verify//344/273/243/347/240/201/345/256/241/346/237/245/346/212/245/345/221/212.md +7 -0
  102. package/templates/verify//345/256/241/346/237/245/346/270/205/345/215/225.md +79 -0
  103. package/templates/verify//351/252/214/350/257/201/346/226/271/346/263/225.md +72 -0
  104. package/templates/build/Bug/345/210/206/346/236/220.md +0 -59
  105. package/templates/build/Git/346/223/215/344/275/234.md +0 -48
  106. package/templates/build/OOD/350/256/276/350/256/241/346/221/230/350/246/201.md +0 -46
  107. package/templates/build/React/346/216/245/345/217/243/351/233/206/346/210/220.md +0 -42
  108. package/templates/build/Schema/345/217/230/346/233/264/346/265/201/346/260/264/347/272/277.md +0 -52
  109. package/templates/build/TS/350/264/250/351/207/217/345/256/241/346/237/245.md +0 -78
  110. package/templates/build//344/270/212/346/270/270/344/272/244/345/217/211/351/252/214/350/257/201.md +0 -68
  111. package/templates/build//344/270/273/351/223/276/350/267/257/346/216/245/345/205/245/351/252/214/350/257/201.md +0 -56
  112. package/templates/build//344/273/243/347/240/201/351/227/250/347/246/201.md +0 -58
  113. package/templates/build//345/205/250/346/240/210/346/265/201/347/250/213/344/277/256/345/244/215.md +0 -48
  114. package/templates/build//345/210/207/347/211/207/346/211/247/350/241/214/347/272/252/345/276/213.md +0 -108
  115. package/templates/build//345/210/207/347/211/207/347/253/257/345/210/260/347/253/257/351/252/214/350/257/201.md +0 -221
  116. package/templates/build//345/212/237/350/203/275/345/274/200/345/217/221.md +0 -66
  117. package/templates/build//345/220/216/347/253/257/345/256/236/347/216/260.md +0 -39
  118. package/templates/build//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213.md +0 -33
  119. package/templates/build//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213/345/256/241/346/237/245.md +0 -70
  120. package/templates/build//345/220/216/347/253/257/346/216/245/345/217/243/345/256/236/347/216/260.md +0 -43
  121. package/templates/build//345/233/275/351/231/205/345/214/226.md +0 -45
  122. package/templates/build//345/256/211/345/205/250/345/212/240/345/233/272/346/265/201/346/260/264/347/272/277.md +0 -68
  123. package/templates/build//345/256/211/345/205/250/345/256/241/346/237/245.md +0 -154
  124. package/templates/build//345/256/211/345/205/250/345/256/241/350/256/241.md +0 -47
  125. package/templates/build//345/267/245/347/250/213/347/272/252/345/276/213.md +0 -56
  126. package/templates/build//346/200/247/350/203/275/345/210/206/346/236/220.md +0 -59
  127. package/templates/build//346/200/247/350/203/275/346/265/201/346/260/264/347/272/277.md +0 -53
  128. package/templates/build//346/216/245/345/217/243/351/233/206/346/210/220/346/265/201/346/260/264/347/272/277.md +0 -76
  129. package/templates/build//346/225/260/346/215/256/345/272/223/350/277/201/347/247/273.md +0 -63
  130. package/templates/build//346/226/260/350/200/201/351/200/273/350/276/221/346/257/224/345/257/271/346/227/245/345/277/227.md +0 -39
  131. package/templates/build//346/235/203/351/231/220/350/256/244/350/257/201.md +0 -49
  132. package/templates/build//346/265/213/350/257/225/350/264/250/351/207/217.md +0 -45
  133. package/templates/build//347/206/224/346/226/255/351/231/215/347/272/247.md +0 -49
  134. package/templates/build//347/212/266/346/200/201/346/265/201/350/275/254.md +0 -43
  135. package/templates/build//347/213/254/347/253/213/345/256/241/346/237/245.md +0 -45
  136. package/templates/build//347/272/246/346/235/237/345/256/236/347/216/260.md +0 -47
  137. package/templates/build//347/274/226/347/240/201/345/260/261/347/273/252/345/256/241/346/237/245.md +0 -60
  138. package/templates/build//347/274/226/347/240/201/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -22
  139. package/templates/build//347/274/226/347/240/201/350/264/250/351/207/217.md +0 -46
  140. package/templates/build//347/274/226/347/240/201/351/230/266/346/256/265/346/211/247/350/241/214.md +0 -105
  141. package/templates/build//347/274/272/351/231/267/347/256/241/347/220/206.md +0 -47
  142. package/templates/build//350/200/246/345/220/210/346/243/200/346/265/213.md +0 -86
  143. package/templates/build//350/246/206/347/233/226/347/216/207/346/240/207/345/207/206.md +0 -40
  144. package/templates/build//350/264/250/351/207/217/345/256/241/346/237/245.md +0 -111
  145. package/templates/build//350/277/201/347/247/273/346/265/201/346/260/264/347/272/277.md +0 -52
  146. package/templates/build//351/200/232/347/224/250/350/264/250/351/207/217.md +0 -176
  147. package/templates/build//351/207/215/346/236/204/346/226/271/346/241/210.md +0 -61
  148. package/templates/build//351/207/215/346/236/204/346/265/201/346/260/264/347/272/277.md +0 -53
  149. package/templates/build//351/230/262/345/276/241/346/200/247/347/274/226/347/240/201.md +0 -94
  150. package/templates/build//351/233/206/346/210/220/351/252/214/350/257/201.md +0 -67
  151. package/templates/build//351/233/267/345/214/272/345/217/215/346/250/241/345/274/217.md +0 -135
  152. package/templates/build//351/252/214/346/224/266/346/240/207/345/207/206/345/256/241/346/237/245.md +0 -64
  153. package/templates/build//351/252/214/346/224/266/346/265/213/350/257/225/350/247/204/345/210/222.md +0 -75
  154. package/templates/design/API/350/256/276/350/256/241.md +0 -47
  155. package/templates/design/N/345/212/2401/346/237/245/350/257/242.md +0 -48
  156. package/templates/design/OOD/350/256/276/350/256/241.md +0 -72
  157. package/templates/design//344/270/200/350/207/264/346/200/247/346/240/241/351/252/214.md +0 -109
  158. package/templates/design//344/270/215/347/241/256/345/256/232/346/227/266/345/244/264/350/204/221/351/243/216/346/232/264.md +0 -105
  159. package/templates/design//344/273/273/345/212/241/346/213/206/350/247/243.md +0 -61
  160. package/templates/design//344/273/273/345/212/241/350/247/204/345/210/222.md +0 -84
  161. package/templates/design//344/274/232/350/257/235/346/201/242/345/244/215-procedures.md +0 -78
  162. package/templates/design//345/205/274/345/256/271/346/200/247/346/243/200/346/237/245.md +0 -89
  163. package/templates/design//345/210/207/347/211/207/350/256/241/345/210/222.md +0 -149
  164. package/templates/design//345/211/215/347/253/257/346/200/247/350/203/275.md +0 -49
  165. package/templates/design//345/216/206/345/217/262/351/201/227/347/225/231/351/233/267/345/214/272/346/270/205/345/215/225.md +0 -50
  166. package/templates/design//345/216/237/345/236/213/346/272/220/347/240/201/346/217/220/345/217/226.md +0 -78
  167. package/templates/design//345/216/237/345/236/213/350/257/264/346/230/216.md +0 -200
  168. package/templates/design//345/216/237/345/236/213/350/257/264/346/230/216/345/256/241/346/237/245.md +0 -81
  169. package/templates/design//345/220/221/345/220/216/345/205/274/345/256/271/346/200/247/345/220/210/350/247/204/346/212/245/345/221/212.md +0 -52
  170. package/templates/design//345/221/275/344/273/244/346/211/247/350/241/214-procedures.md +0 -45
  171. package/templates/design//345/221/275/344/273/244/350/267/257/347/224/261-procedures.md +0 -46
  172. package/templates/design//345/221/275/345/220/215.md +0 -49
  173. package/templates/design//345/242/236/351/207/217/350/276/271/347/225/214/347/225/214/345/256/232/346/226/207/346/241/243.md +0 -48
  174. package/templates/design//345/267/245/345/205/267/350/260/203/347/224/250-procedures.md +0 -41
  175. package/templates/design//345/271/266/345/217/221/346/216/247/345/210/266.md +0 -50
  176. package/templates/design//346/212/200/346/234/257/351/200/211/345/236/213.md +0 -33
  177. package/templates/design//346/216/245/345/217/243/345/257/271/346/216/245/346/226/271/346/241/210.md +0 -97
  178. package/templates/design//346/224/271/351/200/240/345/275/261/345/223/215/350/214/203/345/233/264/350/257/204/344/274/260.md +0 -56
  179. package/templates/design//346/225/260/346/215/256/345/272/223/345/217/230/346/233/264/346/226/271/346/241/210.md +0 -75
  180. package/templates/design//346/225/260/346/215/256/350/241/200/347/274/230/345/233/276.md +0 -49
  181. package/templates/design//346/227/240/351/232/234/347/242/215.md +0 -49
  182. package/templates/design//346/236/266/346/236/204/345/206/263/347/255/226/350/256/260/345/275/225.md +0 -53
  183. package/templates/design//346/236/266/346/236/204/345/256/241/346/237/245.md +0 -256
  184. package/templates/design//346/236/266/346/236/204/350/256/276/350/256/241-constraints.md +0 -177
  185. package/templates/design//346/236/266/346/236/204/350/256/276/350/256/241-procedures.md +0 -130
  186. package/templates/design//346/246/202/345/277/265/351/252/214/350/257/201/346/265/201/346/260/264/347/272/277.md +0 -47
  187. package/templates/design//346/272/220/347/240/201/345/216/237/345/236/213/344/272/244/344/273/230.md +0 -58
  188. package/templates/design//347/216/260/346/234/211/347/263/273/347/273/237/345/267/256/350/267/235/345/210/206/346/236/220.md +0 -114
  189. package/templates/design//347/237/245/350/257/206/347/273/264/346/212/244/346/265/201/346/260/264/347/272/277.md +0 -64
  190. package/templates/design//347/254/254/344/270/200/346/200/247/345/216/237/347/220/206/346/216/250/347/220/206.md +0 -182
  191. package/templates/design//347/264/247/346/200/245/345/233/236/346/273/232/346/211/213/345/206/214.md +0 -77
  192. package/templates/design//347/274/226/347/240/201/345/211/215/346/276/204/346/270/205.md +0 -85
  193. package/templates/design//350/200/201/347/263/273/347/273/237/345/210/207/347/211/207/350/247/204/345/210/222.md +0 -48
  194. package/templates/design//350/207/252/344/270/273/351/200/211/345/236/213.md +0 -57
  195. package/templates/design//350/256/276/350/256/241/344/270/200/350/207/264/346/200/247/351/252/214/346/224/266/346/212/245/345/221/212.md +0 -34
  196. package/templates/design//350/256/276/350/256/241/344/272/247/347/211/251/347/224/237/346/210/220/344/270/216/345/244/215/351/252/214.md +0 -60
  197. package/templates/design//350/256/276/350/256/241/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -21
  198. package/templates/design//350/257/246/347/273/206/350/256/276/350/256/241-procedures.md +0 -123
  199. package/templates/design//350/257/246/347/273/206/350/256/276/350/256/241.md +0 -109
  200. package/templates/design//350/257/246/347/273/206/350/256/276/350/256/241/345/256/241/346/237/245.md +0 -88
  201. package/templates/design//350/260/203/350/257/225/346/226/271/346/263/225/350/256/272.md +0 -43
  202. package/templates/design//350/277/201/347/247/273/350/257/204/344/274/260.md +0 -67
  203. package/templates/design//351/232/224/347/246/273/351/200/202/351/205/215/345/231/250/346/226/271/346/241/210.md +0 -44
  204. package/templates/design//351/234/200/346/261/202/346/276/204/346/270/205.md +0 -65
  205. package/templates/design//351/234/200/346/261/202/350/264/250/351/207/217/345/256/241/346/237/245.md +0 -88
  206. package/templates/design//351/242/206/345/237/237/351/251/261/345/212/250/350/256/276/350/256/241.md +0 -43
  207. package/templates/operate//345/217/221/345/270/203/350/257/264/346/230/216/345/256/241/346/237/245.md +0 -60
  208. package/templates/operate//350/277/220/347/273/264/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -22
  209. package/templates/operate//351/203/250/347/275/262/351/205/215/347/275/256/345/256/241/346/237/245.md +0 -59
  210. package/templates/shared/Diff/345/275/222/345/261/236/350/277/275/350/270/252.md +0 -55
  211. package/templates/shared/Java/350/264/250/351/207/217/351/227/250/347/246/201.md +0 -54
  212. package/templates/shared/OOD/344/270/216SOLID/350/256/276/350/256/241.md +0 -48
  213. package/templates/shared//344/272/247/347/211/251Schema/346/263/250/345/206/214/344/270/255/345/277/203.md +0 -57
  214. package/templates/shared//344/272/247/347/211/251/345/245/221/347/272/246.md +0 -44
  215. package/templates/shared//344/273/243/347/240/201/346/263/250/351/207/212/344/270/216/346/227/245/345/277/227/345/245/221/347/272/246.md +0 -116
  216. package/templates/shared//344/273/273/345/212/241/344/270/212/344/270/213/346/226/207/347/224/237/345/221/275/345/221/250/346/234/237.md +0 -45
  217. package/templates/shared//344/273/273/345/212/241/347/212/266/346/200/201/346/234/272.md +0 -55
  218. package/templates/shared//344/273/273/345/212/241/347/256/241/347/220/206/345/231/250.md +0 -55
  219. package/templates/shared//344/274/230/351/233/205/345/201/234/346/234/272.md +0 -43
  220. package/templates/shared//344/275/234/347/224/250/345/237/237/344/270/216/345/257/206/351/222/245/346/213/246/346/210/252.md +0 -54
  221. package/templates/shared//344/275/234/347/224/250/345/237/237/347/247/237/347/272/246.md +0 -55
  222. package/templates/shared//345/206/262/347/252/201/351/227/250/347/246/201.md +0 -55
  223. package/templates/shared//345/206/263/347/255/226/347/275/221/345/205/263.md +0 -47
  224. package/templates/shared//345/210/207/347/211/207/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -72
  225. package/templates/shared//345/217/230/345/274/202/345/256/241/350/256/241.md +0 -58
  226. package/templates/shared//345/220/216/347/253/257/345/256/236/347/216/260/345/267/245/347/250/213/345/245/221/347/272/246.md +0 -40
  227. package/templates/shared//345/221/275/344/273/244/346/211/247/350/241/214.md +0 -48
  228. package/templates/shared//345/221/275/344/273/244/350/267/257/347/224/261.md +0 -45
  229. package/templates/shared//345/233/236/345/275/222/347/237/251/351/230/265.md +0 -54
  230. package/templates/shared//345/244/232/347/247/237/346/210/267.md +0 -49
  231. package/templates/shared//345/256/241/350/256/241/346/227/245/345/277/227.md +0 -46
  232. package/templates/shared//345/257/274/345/205/245/345/257/274/345/207/272.md +0 -51
  233. package/templates/shared//345/267/245/344/275/234/345/214/272/344/272/222/346/226/245/351/224/201.md +0 -52
  234. package/templates/shared//345/267/245/344/275/234/345/214/272/345/224/244/351/206/222.md +0 -54
  235. package/templates/shared//345/267/245/344/275/234/346/265/201/345/245/221/347/272/246.md +0 -42
  236. package/templates/shared//345/267/245/344/275/234/346/265/201/345/274/225/346/223/216.md +0 -50
  237. package/templates/shared//345/267/245/344/275/234/346/265/201/346/250/241/347/211/210/345/214/205.md +0 -34
  238. package/templates/shared//345/267/245/345/205/267/350/260/203/347/224/250.md +0 -48
  239. package/templates/shared//345/271/266/345/217/221/351/224/201.md +0 -57
  240. package/templates/shared//346/211/247/350/241/214/345/256/210/345/215/253/350/257/204/344/274/260.md +0 -47
  241. package/templates/shared//346/211/251/345/261/225/347/224/237/345/221/275/345/221/250/346/234/237.md +0 -34
  242. package/templates/shared//346/212/200/346/234/257/345/206/263/347/255/226/344/270/273/346/235/203.md +0 -50
  243. package/templates/shared//346/212/245/350/241/250/347/273/237/350/256/241.md +0 -50
  244. package/templates/shared//346/224/257/344/273/230.md +0 -51
  245. package/templates/shared//346/225/217/346/204/237/344/277/241/346/201/257/345/244/204/347/220/206.md +0 -77
  246. package/templates/shared//346/225/217/346/204/237/344/277/241/346/201/257/346/211/253/346/217/217.md +0 -53
  247. package/templates/shared//346/225/260/346/215/256/346/235/203/351/231/220.md +0 -47
  248. package/templates/shared//346/226/275/345/267/245/346/214/207/344/273/244/345/245/221/347/272/246.md +0 -69
  249. package/templates/shared//346/227/245/345/277/227/346/262/273/347/220/206.md +0 -31
  250. package/templates/shared//346/234/272/345/210/266/350/207/252/346/262/273/347/220/206.md +0 -31
  251. package/templates/shared//346/240/207/345/207/206/350/265/204/344/272/247/350/246/206/347/233/226.md +0 -50
  252. package/templates/shared//346/240/270/345/277/203/344/275/223/351/252/214/345/216/237/345/210/231.md +0 -38
  253. package/templates/shared//346/240/270/345/277/203/345/267/245/347/250/213/346/211/247/350/241/214/345/216/237/345/210/231.md +0 -154
  254. package/templates/shared//346/250/241/347/211/210Frontmatter.md +0 -125
  255. package/templates/shared//346/250/241/347/211/210/350/264/241/347/214/256/346/214/207/345/215/227.md +0 -282
  256. package/templates/shared//346/250/241/347/211/210/350/265/204/344/272/247/345/217/257/350/247/201/346/200/247.md +0 -48
  257. package/templates/shared//346/262/273/347/220/206/350/277/220/350/241/214/346/227/266/345/276/252/347/216/257.md +0 -56
  258. package/templates/shared//346/263/250/345/206/214/350/241/250/345/237/272/347/241/200/350/256/276/346/226/275.md +0 -49
  259. package/templates/shared//346/274/224/350/277/233/345/233/236/345/275/222/351/227/250/346/216/247.md +0 -50
  260. package/templates/shared//347/224/250/346/210/267/345/217/215/351/246/210/345/245/221/347/272/246.md +0 -86
  261. package/templates/shared//347/237/245/350/257/206/344/270/273/346/235/203.md +0 -66
  262. package/templates/shared//347/237/245/350/257/206/346/262/273/347/220/206.md +0 -31
  263. package/templates/shared//347/237/245/350/257/206/346/263/250/345/205/245/350/276/271/347/225/214.md +0 -47
  264. package/templates/shared//347/273/206/350/212/202/347/272/252/345/276/213.md +0 -54
  265. package/templates/shared//350/204/221/346/232/264/344/270/216/346/226/271/346/241/210/346/216/242/347/264/242.md +0 -51
  266. package/templates/shared//350/256/241/345/210/222/345/211/215/347/275/256/351/227/250.md +0 -47
  267. package/templates/shared//350/256/276/350/256/241/344/272/247/347/211/251/345/214/205.md +0 -58
  268. package/templates/shared//350/257/255/344/271/211/350/257/201/346/215/256.md +0 -55
  269. package/templates/shared//350/267/250/345/271/263/345/217/260/350/267/257/345/276/204/345/256/211/345/205/250.md +0 -41
  270. package/templates/shared//350/276/223/345/205/245/346/235/220/346/226/231/345/245/221/347/272/246.md +0 -50
  271. package/templates/shared//350/277/220/350/241/214/345/256/211/345/205/250/345/214/205.md +0 -58
  272. package/templates/shared//351/200/232/347/224/250/345/206/263/347/255/226/347/240/224/350/256/250.md +0 -62
  273. package/templates/shared//351/200/232/347/224/250/346/234/272/346/242/260/346/235/241/346/254/276.md +0 -47
  274. package/templates/shared//351/200/232/347/237/245.md +0 -50
  275. package/templates/shared//351/203/250/347/275/262/351/205/215/347/275/256.md +0 -14
  276. package/templates/shared//351/205/215/347/275/256/344/274/230/345/205/210/347/272/247.md +0 -67
  277. package/templates/shared//351/205/215/347/275/256/350/220/275/347/233/230/350/276/271/347/225/214.md +0 -32
  278. package/templates/shared//351/230/262/345/255/244/345/262/233/345/256/236/347/216/260.md +0 -51
  279. package/templates/shared//351/233/266/351/205/215/347/275/256/345/210/235/345/247/213/345/214/226.md +0 -57
  280. package/templates/shared//351/252/214/346/224/266/346/250/241/347/211/210/350/276/223/345/207/272/345/245/221/347/272/246.md +0 -71
  281. package/templates/shared//351/252/214/350/257/201/345/221/275/344/273/244/347/224/237/346/210/220.md +0 -55
  282. package/templates/shared//351/252/214/350/257/201/345/245/221/347/272/246.md +0 -48
  283. package/templates/verify/Docker/351/203/250/347/275/262.md +0 -46
  284. package/templates/verify/POC/347/273/223/350/256/272.md +0 -53
  285. package/templates/verify/React/345/210/227/350/241/250/350/241/250/346/240/274.md +0 -43
  286. package/templates/verify/React/347/212/266/346/200/201/347/256/241/347/220/206.md +0 -42
  287. package/templates/verify/React/347/273/204/344/273/266.md +0 -42
  288. package/templates/verify/React/350/241/250/345/215/225.md +0 -43
  289. package/templates/verify/React/350/267/257/347/224/261.md +0 -43
  290. package/templates/verify/SOLID/344/273/243/347/240/201/345/256/241/346/237/245.md +0 -74
  291. package/templates/verify/SOLID/350/256/276/350/256/241.md +0 -31
  292. package/templates/verify/Schema/345/205/274/345/256/271.md +0 -42
  293. package/templates/verify/Vue/347/212/266/346/200/201/347/256/241/347/220/206.md +0 -42
  294. package/templates/verify/Vue/347/273/204/344/273/266.md +0 -42
  295. package/templates/verify/Vue/350/267/257/347/224/261.md +0 -43
  296. package/templates/verify//344/270/212/346/270/270/350/256/276/350/256/241/344/272/244/345/217/211/351/252/214/350/257/201/345/256/241/346/237/245.md +0 -76
  297. package/templates/verify//344/270/273/351/223/276/350/267/257/346/216/245/345/205/245.md +0 -38
  298. package/templates/verify//344/272/213/344/273/266/351/251/261/345/212/250.md +0 -46
  299. package/templates/verify//344/272/213/345/212/241/346/250/241/345/274/217.md +0 -42
  300. package/templates/verify//344/273/243/347/240/201/345/217/257/347/273/264/346/212/244/346/200/247/344/270/216/345/217/257/350/247/202/346/265/213/346/200/247/345/256/241/346/237/245.md +0 -92
  301. package/templates/verify//344/273/243/347/240/201/346/263/250/351/207/212/344/270/216/346/227/245/345/277/227/351/252/214/346/224/266.md +0 -64
  302. package/templates/verify//344/274/232/350/257/235/346/201/242/345/244/215.md +0 -46
  303. package/templates/verify//345/206/263/347/255/226/345/256/214/346/225/264/346/200/247/345/256/241/346/237/245.md +0 -71
  304. package/templates/verify//345/210/206/351/241/265/346/237/245/350/257/242.md +0 -41
  305. package/templates/verify//345/211/215/347/253/257/351/241/265/351/235/242.md +0 -40
  306. package/templates/verify//345/216/206/345/217/262/346/225/260/346/215/256/346/270/205/346/264/227/350/204/232/346/234/254.md +0 -55
  307. package/templates/verify//345/217/221/345/270/203/345/220/216/345/256/241/346/237/245.md +0 -73
  308. package/templates/verify//345/220/216/347/253/257API.md +0 -39
  309. package/templates/verify//345/242/236/345/210/240/346/224/271/346/237/245.md +0 -45
  310. package/templates/verify//345/244/226/351/203/250/344/276/235/350/265/226.md +0 -43
  311. package/templates/verify//345/245/221/347/272/246/345/205/274/345/256/271.md +0 -42
  312. package/templates/verify//345/256/232/346/227/266/344/273/273/345/212/241.md +0 -39
  313. package/templates/verify//345/256/236/346/227/266/346/216/250/351/200/201.md +0 -48
  314. package/templates/verify//345/256/241/346/237/245/346/221/230/350/246/201.md +0 -58
  315. package/templates/verify//345/267/245/344/275/234/346/265/201.md +0 -38
  316. package/templates/verify//345/271/266/345/217/221/345/256/241/346/237/245.md +0 -132
  317. package/templates/verify//345/274/202/346/255/245/345/257/274/345/207/272.md +0 -41
  318. package/templates/verify//346/200/247/350/203/275/345/256/241/346/237/245.md +0 -110
  319. package/templates/verify//346/216/245/345/217/243/345/245/221/347/272/246.md +0 -44
  320. package/templates/verify//346/216/245/345/217/243/345/245/221/347/272/246/345/256/241/346/237/245.md +0 -131
  321. package/templates/verify//346/220/234/347/264/242/346/250/241/345/274/217.md +0 -47
  322. package/templates/verify//346/225/205/351/232/234/345/244/215/347/233/230.md +0 -67
  323. package/templates/verify//346/225/260/346/215/256/345/272/223/345/217/230/346/233/264.md +0 -37
  324. package/templates/verify//346/225/260/346/215/256/351/232/220/347/247/201.md +0 -46
  325. package/templates/verify//346/226/207/344/273/266/344/270/212/344/274/240.md +0 -45
  326. package/templates/verify//346/227/245/345/277/227.md +0 -45
  327. package/templates/verify//346/234/254/345/234/260/346/265/217/350/247/210/345/231/250/351/252/214/346/224/266.md +0 -94
  328. package/templates/verify//346/240/270/345/277/203/345/267/245/347/250/213/346/211/247/350/241/214.md +0 -65
  329. package/templates/verify//347/237/245/350/257/206/346/263/250/345/205/245.md +0 -38
  330. package/templates/verify//347/264/247/346/200/245/344/277/256/345/244/215/346/265/201/346/260/264/347/272/277.md +0 -76
  331. package/templates/verify//347/274/223/345/255/230/347/255/226/347/225/245.md +0 -45
  332. package/templates/verify//350/201/224/350/260/203/350/256/276/350/256/241/347/274/272/351/231/267/345/210/244/345/256/232.md +0 -67
  333. package/templates/verify//350/201/224/350/260/203/351/252/214/350/257/201.md +0 -87
  334. package/templates/verify//350/256/276/350/256/241/345/256/241/350/256/241.md +0 -184
  335. package/templates/verify//350/257/225/350/277/220/350/241/214/347/206/224/346/226/255.md +0 -74
  336. package/templates/verify//350/276/223/345/205/245/346/240/241/351/252/214.md +0 -44
  337. package/templates/verify//351/203/250/347/275/262/345/217/221/345/270/203.md +0 -101
  338. package/templates/verify//351/224/231/350/257/257/345/244/204/347/220/206.md +0 -46
  339. package/templates/verify//351/224/231/350/257/257/350/276/271/347/225/214.md +0 -38
  340. package/templates/verify//351/232/220/347/247/201/345/256/241/346/237/245.md +0 -37
  341. package/templates/verify//351/252/214/350/257/201.md +0 -38
  342. package/templates/verify//351/252/214/350/257/201/350/201/232/345/220/210/346/243/200/346/237/245.md +0 -22
@@ -1,282 +0,0 @@
1
- ---
2
- id: 模版贡献指南
3
- kind: guidance
4
- title: 模版贡献指南
5
- sync_policy: engine_only
6
- status: active
7
- triggers:
8
- - 新增模版文件、模版贡献、模版资产维护
9
- extra:
10
- name: template-contribution-guide
11
- type: constraint
12
- lifecycle_status: active
13
- scope:
14
- - '*'
15
- domain:
16
- - '*'
17
- stage: _global
18
- owner_mechanism: mc-standard-asset-contract
19
- ---
20
-
21
- # 模版贡献指南
22
-
23
- 向 `templates/` 新增一个能被 SoloForge 正确路由、消费、验证的模版资产,需要完成四件事:**放对目录 → 填对 frontmatter → 注册到代码 → 本地验证**。本指南按这个顺序展开,每一步都给出真实可操作的规则。
24
-
25
- > **字段合法值权威来源**:`type` / `scope` / `domain` 等字段的完整合法值清单详见 `templates/internal/rules/模版Frontmatter.md`。**目录归属与代码注册机制以本指南为准**(规范文档的目录分区描述已滞后于实际磁盘结构)。
26
-
27
- ---
28
-
29
- ## 一、资产类型与目录归属
30
-
31
- SoloForge 的 `.md` 模版资产分 9 种 `type`,每种落在固定目录。`scaffolds/`(`.hbs`)和 `profiles/`(`.yaml`)不属于 `.md` 资产体系,由对应引擎直接消费,**无 frontmatter、无需注册**。
32
-
33
- | `type` | 目录 | 职责 |
34
- |--------|------|------|
35
- | `pattern` | `patterns/` | 用户编码规范 / 设计模式 |
36
- | `procedure` / `pipeline_procedure` | `procedures/` | 开发流程 / 管线工作流 |
37
- | `artifact_template` / `acceptance_template` | `artifacts/domain/...` | 产出物模版 / 验收交付模版 |
38
- | `review_rule` | `rules/domain/...` | 审查 / 校验规则 |
39
- | `governance_rule` | `internal/rules/` | 引擎治理硬规则 |
40
- | `pattern`(运行时) | `internal/patterns/` | 引擎运行时模式 |
41
- | `domain` | `domain/` | 领域知识 |
42
- | `checklist` | `checklists/` | 验收清单(打勾式) |
43
- | —(YAML 配置) | `gates/domain/*.yaml` | 阶段门控配置(独立格式) |
44
- | —(`.hbs`) | `scaffolds/{react,spring-boot}/` | 代码脚手架(无 frontmatter) |
45
- | —(`.yaml`) | `profiles/` | 产品配置(无 frontmatter) |
46
-
47
- ### 二级分区:按能力域(不是系统类型)
48
-
49
- `artifacts/`、`rules/`、`gates/` 在 `domain/` 下按**能力域**二级分区。这是当前磁盘的真实结构:
50
-
51
- ```text
52
- artifacts/domain/{brownfield, build, design, operate, verify}/
53
- rules/domain/ {build, design, operate, shared, verify}/
54
- gates/domain/ {build,design,operate,slice,verify}-gate.yaml (平铺)
55
- ```
56
-
57
- - `build` / `design` / `operate` / `verify` — 对应 4 能力域的通用产物
58
- - `brownfield`(仅 `artifacts/`)— 老系统改造专用产物(回滚、兼容、数据清洗等)
59
- - `shared`(仅 `rules/`)— 跨域能力复用的审查规则(如 SOLID)
60
-
61
- > 其余目录(`patterns/`、`procedures/`、`internal/`、`domain/`、`checklists/`)**平铺,无二级分区**。
62
-
63
- ### 验收文件归属
64
-
65
- | 内容形态 | 放哪 | `type` |
66
- |---------|------|--------|
67
- | 打勾式清单(AI 做校验) | `checklists/` | `checklist` |
68
- | 产出物格式模版(AI 按模版输出制品) | `artifacts/domain/<域>/` | `artifact_template` |
69
-
70
- 同名主题只能二选一。
71
-
72
- ---
73
-
74
- ## 二、命名规范
75
-
76
- 1. **用字统一**:文件名和正文一律使用「模版」(本仓库标准用字,禁用简体写法)。
77
- 2. **`procedures/` 后缀**(按语义区分):
78
- - `…流程` — 标准执行流程(功能开发、调试排查)
79
- - `…工作流` — 管线直接调度的工作流(架构设计、OOD 设计)
80
- - `…流水线` — 自动化多步骤(安全加固、数据迁移)
81
- 3. **机制 ID**:`mc-` 前缀 + kebab-case,按主题分组:
82
- - `mc-engine-runtime`(internal/patterns)、`mc-backend-pattern` / `mc-frontend-pattern` / `mc-infra-pattern` / `mc-general-pattern`(patterns/)
83
- - `mc-domain-knowledge`(domain/)、`mc-generic-artifact` / `mc-existing-system-artifact`(artifacts/)
84
- - `mc-generic-review` / `mc-existing-system-review` / `mc-new-system-review`(rules/)、`mc-checklist`(checklists/)
85
-
86
- ---
87
-
88
- ## 三、Frontmatter 字段
89
-
90
- ### 必填(缺一不可,由 `template_frontmatter_compliance.test.ts` 强制)
91
-
92
- ```yaml
93
- ---
94
- name: ood-design-summary # kebab-case 英文标识
95
- type: artifact_template # 见第一节 9 种合法值
96
- scope: # 技术栈适用范围
97
- - backend
98
- - frontend
99
- domain: "build" # 能力域;procedure/pipeline_procedure 必填具体域
100
- lifecycle_status: active # active | deprecated | draft
101
- owner_mechanism_id: mc-ood-solid-contract
102
- verification_layer: L2 # 校验层(必填):内置模板资产统一 L2(注入审查);项目自建 L0/L1 确定性探针规则见 docs/项目规则分层写法.md
103
- ---
104
- ```
105
-
106
- ### 常用选填
107
-
108
- | 字段 | 说明 |
109
- |------|------|
110
- | `triggers` | 触发关键词数组,辅助知识匹配(替代旧 `when` / `primary_triggers`)。写宽些,含中英文同义词 |
111
- | `authority` | `canonical`(仅 `internal/rules/`、`rules/domain/shared/` 允许)/ `supporting`(默认) |
112
- | `products` | 产品类型,当前全部 `['*']` |
113
- | `id` | 资产稳定标识,惯例 `ka-{type}-{中文名}`,如 `ka-artifact_template-OOD设计摘要模版` |
114
- | `priority` | `P0` / `P1`(P0 关键资产才进 ASSET_MANIFEST,见第四节) |
115
- | `consumes` / `emits` / `consumed_by` / `required_evidence` | 机制间依赖链;同簇内 `emits` 与 `required_evidence` 值匹配可自动推断 `consumes` |
116
- | `companions` / `requires_context` | **仅 artifact 模版**:配套规则与软知识 `companions: { rules: [文件名:usage], guides: [文件名] }`(usage ∈ execute/review/check)/ 上下文引擎视图 |
117
- | `version` / `last_reviewed` | 元数据,便于追溯 |
118
-
119
- > 精确路由类型(`procedure` / `pipeline_procedure`)必须声明**具体** `domain`,不能省略或写 `["*"]`——确保按域精确路由(由合规测试第 4 条守护)。`pattern` / `checklist` / `domain` 等通用类型可省略 `domain` 表示全域适用。
120
-
121
- ### 完整示例
122
-
123
- **artifact 模版**(`artifacts/domain/build/OOD设计摘要.md`):
124
-
125
- ```yaml
126
- ---
127
- name: ood-design-summary
128
- type: acceptance_template
129
- scope: [backend, frontend]
130
- domain: "build"
131
- lifecycle_status: active
132
- authority: supporting
133
- owner_mechanism_id: mc-ood-solid-contract
134
- priority: P1
135
- id: ka-artifact_template-OOD设计摘要模版
136
- triggers: ["面向对象设计", "SOLID", "复杂业务实现"]
137
- consumes: [mc-ood-solid-contract]
138
- emits: [acceptance_report]
139
- required_evidence: [ood_design_summary, code_review_findings]
140
- requires_context: []
141
- version: 1.1.0
142
- last_reviewed: '2026-06-01'
143
- ---
144
- ```
145
-
146
- **编码规范**(`patterns/SOLID设计.md`):`type: pattern`、`domain: "verify"`、`authority: supporting`。
147
-
148
- **验收清单**(`checklists/验证.md`):`type: checklist`、`domain: "verify"`、`emits: []`。
149
-
150
- ---
151
-
152
- ## 四、注册到代码(让系统认得)
153
-
154
- 光建 `.md` 文件不够,必须在代码注册表登记一条 entry,否则资产不会被消费(`template_consumption_coverage.test.ts` 会报红)。
155
-
156
- ### 4.1 普通资产 → `explicit_asset_registry`
157
-
158
- 在 `src/domain/asset_registry/explicit_asset_registry/` 下**按类型分组的文件**里加一条。分组文件命名见下表,照类型对号入座:
159
-
160
- | 资产类型 | 分组文件 |
161
- |---------|---------|
162
- | `pattern` | `patterns_part1.ts` / `patterns_part2.ts` / `patterns_part3.ts` |
163
- | `procedure` / `pipeline_procedure` | `procedures_part1.ts` / `procedures_part2.ts` |
164
- | `artifact_template`(通用) | `artifacts_shared_part1.ts` / `artifacts_shared_part2.ts` |
165
- | `artifact_template`(老系统) | `artifacts_existing_system.ts` |
166
- | `review_rule`(通用) | `rules_shared.ts` |
167
- | `review_rule`(管线) | `rules_pipeline.ts` |
168
- | `governance_rule` | `internal_rules_part1.ts` / `internal_rules_part2.ts` |
169
- | `pattern`(运行时) | `internal_patterns.ts` |
170
- | `checklist` / `domain` / `gates` / `scaffolds` / `profiles` | 同名文件 |
171
-
172
- **entry 写法**(以本指南自身的注册 `contributing.ts` 为范例):
173
-
174
- ```ts
175
- export const contributing_entries: Readonly<Record<string, ExplicitAssetEntry>> = {
176
- "templates/模版贡献.md": {
177
- applicable_stages: ["*"],
178
- asset_kind: "governance_rule", // 值与 frontmatter 的 type 一致(注意代码层键名是 asset_kind)
179
- owner_mechanism_id: "mc-standard-asset-contract",
180
- asset_visibility: "soloforge_internal", // 见第五节
181
- sync_to_user_project: false,
182
- sync_target: "none",
183
- runtime_visibility: "index_only",
184
- evidence_role: "template_guidance",
185
- user_visible: true,
186
- applicable_tech_stack: [] as const,
187
- lifecycle_status: "active",
188
- consume_category: "copy_only_pipeline",
189
- mainline_consumer: "",
190
- validation_entrypoint: "template_mechanism_auditor",
191
- },
192
- };
193
- ```
194
-
195
- > ⚠️ **术语陷阱**:代码注册结构体用 `asset_kind` 键名,frontmatter 用 `type` 键名——两者**值相同**(如都写 `governance_rule`),但键名不同,别混淆。
196
-
197
- ### 4.2 P0 关键资产 → 额外进 ASSET_MANIFEST
198
-
199
- 只有 `priority: P0`、需双层机制守护(模版层 + 代码层)的关键资产,才额外登记到 `src/context/templates/asset_manifest.ts` 的 `ASSET_MANIFEST`。
200
-
201
- 典型 P0 资产(命令路由、工作流契约、知识注入边界、工具调用、验证、防孤岛、主链路、隐私、命令执行等)还需声明 `enforcement_status` / `layer_status` / `consumption_mode`。
202
-
203
- **普通贡献无需进 ASSET_MANIFEST**。
204
-
205
- ---
206
-
207
- ## 五、可见性:你的资产会同步到哪里
208
-
209
- 每个资产必须声明 `asset_visibility`,决定它**是否同步到用户项目、运行时是否注入 AI prompt**。选错会导致内部术语泄露或资产不生效。
210
-
211
- | `asset_visibility` | 同步到用户项目 | 运行时 | 典型资产 |
212
- |--------------------|:------------:|--------|---------|
213
- | `user_project` | ✅ | 注入 prompt | 用户可见的编码规范、领域知识、产出物模版 |
214
- | `global_pattern` | ✅(global_patterns) | 仅索引 | 可复用全局模式 |
215
- | `soloforge_internal` | ❌ | 引擎内部 | 引擎治理硬规则、运行时模式(本指南属此类) |
216
- | `scaffold_only` | ❌ | 脚手架消费 | `.hbs` 脚手架 |
217
- | `adapter_runtime_only` | ❌ | 适配器运行时 | 适配器配置 |
218
-
219
- ### 内部术语保护(重要)
220
-
221
- `user_project` / `global_pattern` 资产的正文**不得含内部术语**(如 `Batch6`、`SoloForge Audit: PASS`、`Mechanism Contract Registry` 等)——这些是引擎内部概念,泄露到用户项目会造成困惑。
222
-
223
- `template_asset_visibility.test.ts` 的 `scanInternalTerms` 会扫描拦截。
224
-
225
- > 拿不准可见性?默认 `user_project`(用户可见)。引擎内部规则才用 `soloforge_internal`。
226
-
227
- ---
228
-
229
- ## 六、本地验证
230
-
231
- 提交前依次跑,全绿才算合格:
232
-
233
- ```bash
234
- # 1. frontmatter 合规(12 条规则:type/scope/domain/authority/lifecycle_status/owner_mechanism_id 等)
235
- npx vitest run tests/architecture/template_frontmatter_compliance.test.ts
236
-
237
- # 2. 消费覆盖率(新资产必须被注册且能被主链路消费)
238
- npx vitest run tests/architecture/template_consumption_coverage.test.ts
239
-
240
- # 3. 内容格式(正文规范、无禁止结构)
241
- npx vitest run tests/architecture/template_content_format.test.ts
242
-
243
- # 4. 可见性与内部术语保护
244
- npx vitest run tests/engine/template_asset_visibility.test.ts
245
-
246
- # 5. 枚举一致性(type 等 frontmatter 枚举与代码定义对齐)
247
- npm run check:schema-enum
248
-
249
- # 6. 全量(兜底)
250
- npm test
251
- ```
252
-
253
- 发布前维护者还会跑 `npm run validate-release`(15 phase 门禁,其中 phase 8(模版卫生与项目知识消费)、phase 14(模版消费覆盖率)直接守护模版资产)。
254
-
255
- ---
256
-
257
- ## 七、禁止字段(旧术语,不得出现在新文件)
258
-
259
- 以下字段已废弃,存量文件逐步清理(由合规测试 + 纯C重构守护):
260
-
261
- | 禁止字段 | 替代 |
262
- |---------|------|
263
- | `asset_kind`(frontmatter 层) | `type`(代码注册层仍用 `asset_kind` 键名,见第四节) |
264
- | `when` / `primary_triggers` / `secondary_triggers` / `negative_triggers` | `triggers` |
265
- | `stages`(旧 8 阶段) | `domain`(4 能力域) |
266
- | `routes` | `domain`(域约束统一用 `domain`) |
267
- | `status` | `lifecycle_status` |
268
- | `specificity` / `migration_note` / `artifact_schema` / `process_rules` / `forbidden_gaps` | 已迁移或删除 |
269
-
270
- ---
271
-
272
- ## 八、PR 清单
273
-
274
- 提交 PR 前自查:
275
-
276
- - [ ] 文件放在第一节对应的目录(`artifacts/rules/gates` 注意 `domain/` 能力域分区)
277
- - [ ] 文件名用字统一为「模版」;`procedures/` 后缀符合语义
278
- - [ ] frontmatter 必填字段齐全(`name` / `type` / `scope` / `domain` / `lifecycle_status` / `owner_mechanism_id`)
279
- - [ ] 无第七节禁止字段
280
- - [ ] 在 `explicit_asset_registry` 对应分组文件登记了 entry,`asset_kind` 值与 `type` 一致
281
- - [ ] `asset_visibility` 选对;`user_project` 资产正文无内部术语
282
- - [ ] 第六节 6 条验证全绿
@@ -1,48 +0,0 @@
1
- ---
2
- id: ka-hard-rule-模版资产可见性规则
3
- kind: guidance
4
- title: 模版资产可见性
5
- owner_mechanism: mc-template-asset-visibility
6
- sync_policy: internal
7
- status: active
8
- extra:
9
- name: template-asset-visibility
10
- scope:
11
- - '*'
12
- products:
13
- - '*'
14
- type: constraint
15
- lifecycle_status: active
16
- version: 1.1.0
17
- last_reviewed: '2026-06-01'
18
- verification_layer: L2
19
- stage: _global
20
- ---
21
-
22
- # 模版资产可见性规则
23
-
24
- ## 适用范围
25
-
26
- 所有 `templates/**` 资产的同步、索引、注入和消费入口。
27
-
28
- ## 可见性分类
29
-
30
- | 可见性 | 说明 |
31
- |--------|------|
32
- | user_project | 用户项目知识,可同步到 `.soloforge/knowledge` |
33
- | soloforge_internal | SoloForge 内部治理,不进入用户项目 |
34
- | adapter_runtime_only | 仅 adapter 运行时消费,不进入用户知识库 |
35
- | scaffold_only | 仅脚手架机制消费,不进入知识索引 |
36
- | global_pattern | 全局工程模式,进入 `~/.soloforge/patterns` |
37
-
38
- ## 硬规则
39
-
40
- - 内部资产不得同步到用户项目。
41
- - 不同技术栈的审查规则不得互相注入。
42
- - 脚手架模版只由脚手架机制消费。
43
- - 全局 patterns 只能作为 `template_guidance`,不得支撑项目事实。
44
- - 用户可见资产不得包含内部施工术语。
45
-
46
- ## 术语污染扫描
47
-
48
- 用户可见资产禁止出现: Batch、validate-release、SoloForge Audit: PASS、Mechanism Contract Registry 等内部术语。
@@ -1,56 +0,0 @@
1
- ---
2
- id: ka-pattern-governance_runtime_loop
3
- kind: knowledge
4
- title: 治理运行时循环
5
- sync_policy: internal
6
- status: active
7
- extra:
8
- name: governance_runtime_loop
9
- scope:
10
- - '*'
11
- products:
12
- - '*'
13
- lifecycle_status: active
14
- version: 1.1.0
15
- last_reviewed: '2026-06-01'
16
- type: knowledge
17
- verification_layer: L2
18
- stage: _global
19
- owner_mechanism: mc-engine-runtime
20
- ---
21
-
22
- ## 决策规则
23
-
24
- - 治理闭环: sample → escape → report → capability_update
25
- - 抽检使用风险加权抽样,critical 风险 100% 抽中
26
- - 逃逸报告记录发现的问题,不自动降级
27
- - 治理报告汇总全局状态,只读不改
28
- - 能力状态更新必须经 治理运行时 + 人工确认
29
-
30
- ## 验收项
31
-
32
- - [AC-01] 抽检→逃逸→报告闭环测试通过
33
- - [AC-02] 无自动降级行为
34
- - [AC-03] 状态更新需人工确认
35
- - [AC-04] report 数据与实际 escape 一致
36
-
37
- ## 何时使用
38
-
39
- advisory: 治理闭环只读不改,状态更新必须经 治理运行时 + 人工确认
40
-
41
- ## 是否 hard block
42
-
43
- 否。此能力为 advisory 状态,违规仅产生 advisory 警告,不阻断流程。
44
-
45
- ## 证据要求
46
-
47
- - 抽检→逃逸→报告→显式更新闭环测试通过
48
- - MCP handler 闭环测试通过
49
- - 无自动降级行为
50
- -
51
-
52
- ## 人工确认/降级边界
53
-
54
- - 此能力可被开发者决策覆盖
55
- - 升级到 enforced 需满足 promotion_conditions 并通过 lifecycle_test_files 测试
56
- - 降级/禁用需经 治理运行时 + 人工确认
@@ -1,49 +0,0 @@
1
- ---
2
- id: ka-hard-rule-注册表基础设施规则
3
- kind: guidance
4
- title: 注册表基础设施
5
- sync_policy: internal
6
- status: active
7
- triggers:
8
- - 注册表基础设施规则
9
- extra:
10
- name: registry-infrastructure
11
- scope:
12
- - '*'
13
- products:
14
- - '*'
15
- lifecycle_status: active
16
- version: 1.1.0
17
- last_reviewed: '2026-06-01'
18
- type: constraint
19
- verification_layer: L2
20
- stage: _global
21
- owner_mechanism: mc-registry-infrastructure
22
- ---
23
-
24
- # 注册表基础设施规则
25
-
26
- ## 核心原则
27
-
28
- 注册表是 SoloForge 契约体系的基础设施层。所有机制必须通过注册表发现、验证和追踪其契约和资产。
29
-
30
- ## 规则
31
-
32
- 1. **注册完整性**: 每个机制必须在 MechanismContractRegistry 注册,包含 id、status、priority
33
- 2. **资产可发现**: 所有可消费模版资产必须在 ConsumableAssetRegistry 注册,包含 path、consumption_mode、owner_mechanism_id
34
- 3. **生命周期测试**: 每个注册表条目必须有对应的生命周期测试,验证注册/查询/状态变更
35
- 4. **跨注册表一致性**: owner_mechanism_id 必须在 DualLayerMechanismRegistry 中存在对应条目
36
- 5. **注册表健康检查**: validate-mechanisms 和 audit-template-mechanisms 必须能检测注册表不一致
37
-
38
- ## 失败模式
39
-
40
- - 注册表条目无对应测试 → 应补充 lifecycle test
41
- - owner_mechanism_id 指向不存在的机制 → 应修复引用
42
- - 模版文件存在但未注册 → 应在 ConsumableAssetRegistry 登记
43
-
44
- ## 验收标准
45
-
46
- - [ ] 所有机制契约在 registry 中可查询
47
- - [ ] 所有模版资产有 owner_mechanism_id
48
- - [ ] 注册表查询函数返回非空结果
49
- - [ ] validate-mechanisms 不报告注册表缺失
@@ -1,50 +0,0 @@
1
- ---
2
- id: ka-hard-rule-演进回归门控规则
3
- kind: guidance
4
- title: 演进回归门控
5
- owner_mechanism: mc-evolution-regression
6
- sync_policy: internal
7
- status: active
8
- extra:
9
- name: evolution-regression-gate
10
- scope:
11
- - '*'
12
- products:
13
- - '*'
14
- type: constraint
15
- lifecycle_status: active
16
- version: 1.1.0
17
- last_reviewed: '2026-06-01'
18
- verification_layer: L2
19
- stage: _global
20
- ---
21
-
22
- # 演进回归门控规则
23
-
24
- ## hard_rules
25
-
26
- - 新增问题 / 新增 Batch / 新机制 / 新模版 / 新测试必须经过回归门控,不得打穿既有体系。
27
- - 必须包含以下检查项:
28
- 1. 跨 Batch 总回归门:新变更不得破坏已验收的 Batch 门禁。
29
- 2. 模版补齐检查:新机制必须有 required 模版资产。
30
- 3. 机制归属检查:新模版必须归属到正确机制。
31
- 4. 发布门禁更新:新问题/Batch 必须更新发布门禁配置。
32
- 5. 旧问题反向影响检查:新变更不得使已关闭问题重新失效。
33
- - 重复问题必须被 DuplicateIssueCheck 检测并阻断。
34
- - pending 状态的问题/机制不得通过门禁。
35
-
36
- ## not_done_if_missing
37
-
38
- - 新问题未经 DuplicateIssueCheck → hard fail。
39
- - 新增功能批次未继承既有历史回归基线 → hard fail。
40
- - 模版层需更新但未更新 → hard fail。
41
- - 新增机制无 required 模版资产 → hard fail。
42
- - 发布门禁配置未更新 → hard fail。
43
-
44
- ## verification_evidence
45
-
46
- - `EvolutionGateResult` 包含 passed/failed 状态和检查项列表。
47
- - `DuplicateCheckResult` 包含重复检测结果。
48
- - `performEvolutionGate()` 执行全部五项检查。
49
- - `checkDuplicateIssue()` 检测重复问题。
50
- - `diagnostic_codes`: duplicate-issue, pending-gate, missing-template, batch-regression-failed。
@@ -1,86 +0,0 @@
1
- ---
2
- id: ka-hard-rule-用户反馈契约规则
3
- kind: guidance
4
- title: 用户反馈契约
5
- sync_policy: internal
6
- status: active
7
- triggers:
8
- - 用户反馈契约规则
9
- extra:
10
- name: user-feedback-contract
11
- scope:
12
- - '*'
13
- products:
14
- - '*'
15
- lifecycle_status: active
16
- version: 1.1.0
17
- last_reviewed: '2026-06-01'
18
- type: constraint
19
- verification_layer: L2
20
- stage: _global
21
- owner_mechanism: mc-user-feedback
22
- ---
23
-
24
- # 用户反馈契约规则
25
-
26
- ## 核心约束
27
-
28
- 1. 每个工具只能输出其 `getAllowedFeedbackKinds` 允许的反馈类型。
29
- 2. 反馈消息必须包含:kind、severity、title、summary。禁止空洞反馈。
30
- 3. 技术内容(路径、命令、错误码)禁止翻译,必须保留原文。
31
- 4. `blocked` 类型反馈必须包含阻塞原因和建议下一步。
32
- 5. `failure` 类型反馈必须包含失败证据和 retry_hint。
33
- 6. 任何用户反馈、缺陷、设计疑问或实际使用偏差,不得只按表面文件、单个目录或单个场景收窄处理。
34
- 7. 进入修复讨论前,必须先完成全局抽象审查:
35
- - 该问题属于哪个机制族?
36
- - 是否只是某个现象暴露出来的系统性问题?
37
- - 是否同时影响 SoloForge 自身与用户项目使用路径?
38
- - 是否涉及模版层、知识层、机制层、adapter、CLI、MCP、发布门禁、迁移和防回归?
39
- - 是否需要抽象成通用能力,而不是只修当前案例?
40
- 8. 如果全局抽象审查未完成,只能输出待分析项、影响矩阵和建议讨论顺序,不得直接给单点修复结论。
41
- 9. 如果当前案例只是系统性问题的一个样本,修复方案必须覆盖同类入口、同类资产、同类任务和新增资产防回归。
42
-
43
- ## 适用场景
44
-
45
- - 所有 SoloForge 工具的输出反馈
46
- - sf_gate 结果反馈
47
- - sf_work action=verify 学习反馈
48
- - sf_work action=act 降级/澄清反馈
49
- - 用户反馈实际使用问题
50
- - 讨论新增机制、模版、规则、流程、验收或发布风险
51
- - 将问题落入 Batch、备忘录、发布门槛或施工合同前
52
-
53
- ## 违规处理
54
-
55
- - 禁止的反馈类型 → hard_fail,阻断输出
56
- - 空洞反馈 → advisory,标记质量降级
57
- - 翻译技术内容 → advisory,标记违规
58
- - 未做全局抽象审查就收窄为单点修复 → hard_fail,退回机制族归因
59
- - 只修当前文件/目录/样例但未覆盖同类路径和防回归 → hard_fail,要求补齐通用能力
60
- - 未分析 SoloForge 自身与用户项目双路径影响 → hard_fail,要求补齐影响矩阵
61
- - 未说明模版层、知识层、机制层、adapter、CLI、MCP、发布门禁、迁移和防回归影响 → hard_fail,要求补齐跨层影响
62
-
63
- ## 全局抽象审查输出
64
-
65
- 每次用户反馈进入讨论或施工合同前,必须形成以下结构化结论:
66
-
67
- ```text
68
- 1. 表面现象:
69
- 2. 机制族归因:
70
- 3. 是否系统性问题:
71
- 4. SoloForge 自身影响:
72
- 5. 用户项目影响:
73
- 6. 涉及层级:
74
- - 模版层:
75
- - 知识层:
76
- - 机制层:
77
- - adapter:
78
- - CLI:
79
- - MCP:
80
- - 发布门禁:
81
- - 迁移:
82
- - 防回归:
83
- 7. 是否应抽象成通用能力:
84
- 8. 不应只修的局部案例:
85
- 9. 施工和验收必须覆盖的同类路径:
86
- ```
@@ -1,66 +0,0 @@
1
- ---
2
- id: ka-pattern-authority
3
- kind: knowledge
4
- title: 知识主权
5
- sync_policy: internal
6
- status: active
7
- extra:
8
- name: authority
9
- scope:
10
- - '*'
11
- products:
12
- - '*'
13
- lifecycle_status: active
14
- version: 1.1.0
15
- last_reviewed: '2026-06-01'
16
- type: knowledge
17
- verification_layer: L2
18
- stage: _global
19
- owner_mechanism: mc-engine-runtime
20
- ---
21
-
22
- ## 决策规则
23
-
24
- - knowledge/patterns/core/ 为人工维护只读区,AI 严禁修改
25
- - AI 进化产物只能写入 knowledge/patterns/temp/
26
- - 自进化机制(evolve)生成的知识条目经 KnowledgeWriter 写入 temp/
27
- - KnowledgeWriter.promoteToActive() 路由所有 pattern 类型到 patterns/temp/
28
- - updateKnowledge() 检测 core/ 路径时直接拒绝,返回知识隔离错误
29
- - drift_ratio >= 0.3 时触发漂移检测,根因分析判定:
30
- - code_degradation: 安全规则违反,禁止更新知识库
31
- - business_evolution: 多文件普遍违反,允许更新知识库(仅 temp/)
32
- - unknown: 人工审核后决定
33
- - drift_ratio >= 0.5 且 code_degradation 时触发逻辑奇点警告
34
-
35
- ## 验收项
36
-
37
- - [AC-01] core/ 目录下任何文件无法通过 AI 工具修改
38
- - [AC-02] evolve() 写入的条目路径包含 temp/
39
- - [AC-03] updateKnowledge() 对 core/ 条目返回"知识隔离"错误
40
- - [AC-04] KnowledgeWriter.isCorePath() 正确识别 core/ 路径
41
- - [AC-05] 自进化知识条目 status 从 staged → active 的路径仅经过 temp/
42
-
43
- ## 逆向退化防护
44
-
45
- - 连续 3 次 drift 检测均为 code_degradation 时,暂停自动自愈
46
- - 暂停后需人工审查代码库状态,确认不是 AI 连续敷衍导致的退化
47
-
48
- ## 何时使用
49
-
50
- advisory: 知识治理是建议性的,尚未接入强制门禁
51
-
52
- ## 是否 hard block
53
-
54
- 否。此能力为 advisory 状态,违规仅产生 advisory 警告,不阻断流程。
55
-
56
- ## 证据要求
57
-
58
- - 知识模版格式验证测试通过
59
- - 中文语义化路径测试通过
60
- -
61
-
62
- ## 人工确认/降级边界
63
-
64
- - 此能力可被开发者决策覆盖
65
- - 升级到 enforced 需满足 promotion_conditions 并通过 lifecycle_test_files 测试
66
- - 降级/禁用需经 治理运行时 + 人工确认
@@ -1,31 +0,0 @@
1
- ---
2
- id: ka-hard-rule-知识治理规则
3
- kind: guidance
4
- title: 知识治理
5
- owner_mechanism: mc-knowledge-governance
6
- sync_policy: internal
7
- status: active
8
- extra:
9
- name: knowledge-governance
10
- scope:
11
- - '*'
12
- products:
13
- - '*'
14
- type: constraint
15
- lifecycle_status: active
16
- version: 1.1.0
17
- last_reviewed: '2026-06-01'
18
- verification_layer: L2
19
- stage: _global
20
- ---
21
-
22
- # 知识治理规则
23
-
24
- 知识资产从草稿、演进、同步到注入必须有统一治理入口。
25
-
26
- ## 硬规则
27
-
28
- - 知识晋级必须有证据,不能由 AI 推理直接变成核心事实。
29
- - 中文优先项目的用户可见语义不得被英文默认模版污染。
30
- - 设计文档只能承载已验证事实,不能承载施工日志或未验证假设。
31
- - 多语言策略必须显式声明,不能用日志或 stderr 替代用户反馈。