aontu 0.61.0 → 0.63.0

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 (371) hide show
  1. package/README.md +4 -4
  2. package/dist/agentsmd.d.ts +1 -0
  3. package/dist/agentsmd.js +7 -28
  4. package/dist/agentsmd.js.map +1 -1
  5. package/dist/alias.js.map +1 -1
  6. package/dist/allow.d.ts +23 -0
  7. package/dist/allow.js +138 -0
  8. package/dist/allow.js.map +1 -0
  9. package/dist/aontu.d.ts +4 -2
  10. package/dist/aontu.js +4 -80
  11. package/dist/aontu.js.map +1 -1
  12. package/dist/aontumodel.d.ts +4 -0
  13. package/dist/aontumodel.js +33 -0
  14. package/dist/aontumodel.js.map +1 -0
  15. package/dist/cli.d.ts +10 -1
  16. package/dist/cli.js +877 -479
  17. package/dist/cli.js.map +1 -1
  18. package/dist/ctx.js +0 -48
  19. package/dist/ctx.js.map +1 -1
  20. package/dist/diff.js +0 -32
  21. package/dist/diff.js.map +1 -1
  22. package/dist/err.js +0 -40
  23. package/dist/err.js.map +1 -1
  24. package/dist/escape.js +0 -45
  25. package/dist/escape.js.map +1 -1
  26. package/dist/exactjson.d.ts +0 -35
  27. package/dist/exactjson.js +0 -131
  28. package/dist/exactjson.js.map +1 -1
  29. package/dist/format.js +55 -189
  30. package/dist/format.js.map +1 -1
  31. package/dist/grammar.d.ts +9 -0
  32. package/dist/grammar.js +54 -0
  33. package/dist/grammar.js.map +1 -0
  34. package/dist/graph.js +0 -26
  35. package/dist/graph.js.map +1 -1
  36. package/dist/hcanon.js +0 -82
  37. package/dist/hcanon.js.map +1 -1
  38. package/dist/helpdoc.d.ts +16 -0
  39. package/dist/helpdoc.js +59 -0
  40. package/dist/helpdoc.js.map +1 -0
  41. package/dist/hints.d.ts +0 -6
  42. package/dist/hints.js +59 -47
  43. package/dist/hints.js.map +1 -1
  44. package/dist/jsonschema.js +0 -114
  45. package/dist/jsonschema.js.map +1 -1
  46. package/dist/keyorder.d.ts +0 -7
  47. package/dist/keyorder.js +0 -41
  48. package/dist/keyorder.js.map +1 -1
  49. package/dist/lang.js +32 -877
  50. package/dist/lang.js.map +1 -1
  51. package/dist/lower.d.ts +3 -0
  52. package/dist/lower.js +14 -61
  53. package/dist/lower.js.map +1 -1
  54. package/dist/lsp-server.js +0 -16
  55. package/dist/lsp-server.js.map +1 -1
  56. package/dist/lsp.d.ts +1 -1
  57. package/dist/lsp.js +12 -159
  58. package/dist/lsp.js.map +1 -1
  59. package/dist/mcp-server.js +0 -26
  60. package/dist/mcp-server.js.map +1 -1
  61. package/dist/mcp.js +0 -113
  62. package/dist/mcp.js.map +1 -1
  63. package/dist/mod-tool.js +0 -130
  64. package/dist/mod-tool.js.map +1 -1
  65. package/dist/mod.js +0 -162
  66. package/dist/mod.js.map +1 -1
  67. package/dist/patch.js +0 -217
  68. package/dist/patch.js.map +1 -1
  69. package/dist/provenance.js +0 -140
  70. package/dist/provenance.js.map +1 -1
  71. package/dist/query.js +0 -75
  72. package/dist/query.js.map +1 -1
  73. package/dist/reach.js +0 -43
  74. package/dist/reach.js.map +1 -1
  75. package/dist/relation.d.ts +2 -0
  76. package/dist/relation.js +3 -58
  77. package/dist/relation.js.map +1 -1
  78. package/dist/render.js +33 -143
  79. package/dist/render.js.map +1 -1
  80. package/dist/report-sarif.d.ts +0 -11
  81. package/dist/report-sarif.js +0 -28
  82. package/dist/report-sarif.js.map +1 -1
  83. package/dist/sig.js +0 -35
  84. package/dist/sig.js.map +1 -1
  85. package/dist/sigdecl.js +1 -1
  86. package/dist/sigdecl.js.map +1 -1
  87. package/dist/siggate.js +0 -4
  88. package/dist/siggate.js.map +1 -1
  89. package/dist/site.js +3 -29
  90. package/dist/site.js.map +1 -1
  91. package/dist/subsume.d.ts +0 -10
  92. package/dist/subsume.js +0 -137
  93. package/dist/subsume.js.map +1 -1
  94. package/dist/template.d.ts +2 -1
  95. package/dist/template.js +58 -138
  96. package/dist/template.js.map +1 -1
  97. package/dist/trim.js +0 -41
  98. package/dist/trim.js.map +1 -1
  99. package/dist/tsconfig.tsbuildinfo +1 -1
  100. package/dist/type.js.map +1 -1
  101. package/dist/unify.js +12 -242
  102. package/dist/unify.js.map +1 -1
  103. package/dist/utility.js +0 -22
  104. package/dist/utility.js.map +1 -1
  105. package/dist/val/AbnfFuncVal.d.ts +18 -0
  106. package/dist/val/AbnfFuncVal.js +132 -0
  107. package/dist/val/AbnfFuncVal.js.map +1 -0
  108. package/dist/val/AbsentVal.d.ts +11 -0
  109. package/dist/val/AbsentVal.js +30 -0
  110. package/dist/val/AbsentVal.js.map +1 -0
  111. package/dist/val/AggFuncVal.d.ts +10 -1
  112. package/dist/val/AggFuncVal.js +104 -116
  113. package/dist/val/AggFuncVal.js.map +1 -1
  114. package/dist/val/ArithFuncVal.js +0 -12
  115. package/dist/val/ArithFuncVal.js.map +1 -1
  116. package/dist/val/BagVal.js +1 -78
  117. package/dist/val/BagVal.js.map +1 -1
  118. package/dist/val/BigDecimalVal.js +0 -16
  119. package/dist/val/BigDecimalVal.js.map +1 -1
  120. package/dist/val/BigIntegerVal.js +0 -16
  121. package/dist/val/BigIntegerVal.js.map +1 -1
  122. package/dist/val/CloseFuncVal.js +0 -9
  123. package/dist/val/CloseFuncVal.js.map +1 -1
  124. package/dist/val/CmpFuncVal.d.ts +20 -0
  125. package/dist/val/CmpFuncVal.js +188 -0
  126. package/dist/val/CmpFuncVal.js.map +1 -0
  127. package/dist/val/ConjunctVal.js +0 -29
  128. package/dist/val/ConjunctVal.js.map +1 -1
  129. package/dist/val/ConstraintVal.js +0 -500
  130. package/dist/val/ConstraintVal.js.map +1 -1
  131. package/dist/val/ContainerKindVal.js +0 -2
  132. package/dist/val/ContainerKindVal.js.map +1 -1
  133. package/dist/val/CopyFuncVal.js +0 -3
  134. package/dist/val/CopyFuncVal.js.map +1 -1
  135. package/dist/val/Decimal.js +0 -179
  136. package/dist/val/Decimal.js.map +1 -1
  137. package/dist/val/DeprecateFuncVal.js.map +1 -1
  138. package/dist/val/DisjunctVal.js +0 -152
  139. package/dist/val/DisjunctVal.js.map +1 -1
  140. package/dist/val/EachFuncVal.d.ts +1 -2
  141. package/dist/val/EachFuncVal.js +12 -29
  142. package/dist/val/EachFuncVal.js.map +1 -1
  143. package/dist/val/EmitFuncVal.d.ts +1 -1
  144. package/dist/val/EmitFuncVal.js +6 -119
  145. package/dist/val/EmitFuncVal.js.map +1 -1
  146. package/dist/val/ExpectVal.js +0 -62
  147. package/dist/val/ExpectVal.js.map +1 -1
  148. package/dist/val/FilterFuncVal.js +0 -25
  149. package/dist/val/FilterFuncVal.js.map +1 -1
  150. package/dist/val/FuncBaseVal.d.ts +1 -0
  151. package/dist/val/FuncBaseVal.js +7 -127
  152. package/dist/val/FuncBaseVal.js.map +1 -1
  153. package/dist/val/GraphAtomVal.js +0 -15
  154. package/dist/val/GraphAtomVal.js.map +1 -1
  155. package/dist/val/HideFuncVal.js +0 -13
  156. package/dist/val/HideFuncVal.js.map +1 -1
  157. package/dist/val/IntegerVal.js +0 -61
  158. package/dist/val/IntegerVal.js.map +1 -1
  159. package/dist/val/JunctionVal.js +0 -20
  160. package/dist/val/JunctionVal.js.map +1 -1
  161. package/dist/val/KeyFuncVal.js +0 -46
  162. package/dist/val/KeyFuncVal.js.map +1 -1
  163. package/dist/val/ListVal.js +0 -57
  164. package/dist/val/ListVal.js.map +1 -1
  165. package/dist/val/LowerFuncVal.js +11 -6
  166. package/dist/val/LowerFuncVal.js.map +1 -1
  167. package/dist/val/MapVal.js +0 -151
  168. package/dist/val/MapVal.js.map +1 -1
  169. package/dist/val/MatchFuncVal.js +0 -27
  170. package/dist/val/MatchFuncVal.js.map +1 -1
  171. package/dist/val/{FormFuncVal.d.ts → MaybeFuncVal.d.ts} +5 -5
  172. package/dist/val/MaybeFuncVal.js +50 -0
  173. package/dist/val/MaybeFuncVal.js.map +1 -0
  174. package/dist/val/MoveFuncVal.js +0 -18
  175. package/dist/val/MoveFuncVal.js.map +1 -1
  176. package/dist/val/NilVal.js +2 -36
  177. package/dist/val/NilVal.js.map +1 -1
  178. package/dist/val/NomFuncVal.d.ts +12 -0
  179. package/dist/val/NomFuncVal.js +153 -0
  180. package/dist/val/NomFuncVal.js.map +1 -0
  181. package/dist/val/NumberVal.js +0 -15
  182. package/dist/val/NumberVal.js.map +1 -1
  183. package/dist/val/OpBaseVal.d.ts +1 -0
  184. package/dist/val/OpBaseVal.js +3 -15
  185. package/dist/val/OpBaseVal.js.map +1 -1
  186. package/dist/val/PackFuncVal.js +0 -34
  187. package/dist/val/PackFuncVal.js.map +1 -1
  188. package/dist/val/PathFuncVal.js +0 -6
  189. package/dist/val/PathFuncVal.js.map +1 -1
  190. package/dist/val/PathVal.js +0 -41
  191. package/dist/val/PathVal.js.map +1 -1
  192. package/dist/val/PlaceVal.js +0 -25
  193. package/dist/val/PlaceVal.js.map +1 -1
  194. package/dist/val/PlusOpVal.d.ts +1 -7
  195. package/dist/val/PlusOpVal.js +13 -74
  196. package/dist/val/PlusOpVal.js.map +1 -1
  197. package/dist/val/PrefFuncVal.js +0 -1
  198. package/dist/val/PrefFuncVal.js.map +1 -1
  199. package/dist/val/PrefVal.js +0 -167
  200. package/dist/val/PrefVal.js.map +1 -1
  201. package/dist/val/RecurseVal.js +0 -55
  202. package/dist/val/RecurseVal.js.map +1 -1
  203. package/dist/val/RefVal.js +0 -282
  204. package/dist/val/RefVal.js.map +1 -1
  205. package/dist/val/ReferFuncVal.js +0 -232
  206. package/dist/val/ReferFuncVal.js.map +1 -1
  207. package/dist/val/ScalarKindVal.js +0 -49
  208. package/dist/val/ScalarKindVal.js.map +1 -1
  209. package/dist/val/ScalarVal.js +0 -11
  210. package/dist/val/ScalarVal.js.map +1 -1
  211. package/dist/val/StrFuncVal.js +0 -18
  212. package/dist/val/StrFuncVal.js.map +1 -1
  213. package/dist/val/SuperFuncVal.js +0 -32
  214. package/dist/val/SuperFuncVal.js.map +1 -1
  215. package/dist/val/TopVal.js +0 -1
  216. package/dist/val/TopVal.js.map +1 -1
  217. package/dist/val/TranslateFuncVal.d.ts +12 -0
  218. package/dist/val/TranslateFuncVal.js +99 -0
  219. package/dist/val/TranslateFuncVal.js.map +1 -0
  220. package/dist/val/UpperFuncVal.js +11 -6
  221. package/dist/val/UpperFuncVal.js.map +1 -1
  222. package/dist/val/Val.d.ts +1 -0
  223. package/dist/val/Val.js +2 -133
  224. package/dist/val/Val.js.map +1 -1
  225. package/dist/val/VarVal.js +0 -12
  226. package/dist/val/VarVal.js.map +1 -1
  227. package/dist/val/arith.js +0 -37
  228. package/dist/val/arith.js.map +1 -1
  229. package/dist/val/caserange.d.ts +3 -0
  230. package/dist/val/caserange.js +49 -0
  231. package/dist/val/caserange.js.map +1 -0
  232. package/dist/val/members.js +0 -6
  233. package/dist/val/members.js.map +1 -1
  234. package/dist/val/numcmp.js +0 -11
  235. package/dist/val/numcmp.js.map +1 -1
  236. package/dist/val/numkind.js +0 -145
  237. package/dist/val/numkind.js.map +1 -1
  238. package/dist/val/valutil.js +0 -16
  239. package/dist/val/valutil.js.map +1 -1
  240. package/dist/vet.d.ts +12 -0
  241. package/dist/vet.js +159 -412
  242. package/dist/vet.js.map +1 -1
  243. package/dist/view.js +0 -414
  244. package/dist/view.js.map +1 -1
  245. package/dist/walk.js +0 -41
  246. package/dist/walk.js.map +1 -1
  247. package/grammar/aontu.abnf +9 -7
  248. package/grammar/aontu.gbnf +5 -5
  249. package/grammar/aontu.lark +5 -5
  250. package/grammar/aontu.tmLanguage.json +1 -1
  251. package/package.json +4 -2
  252. package/skill/SKILL.md +8 -0
  253. package/skill/init/check.sh +28 -0
  254. package/skill/init/data.aon +12 -0
  255. package/skill/init/model.aon +19 -0
  256. package/skill/tasks.md +151 -0
  257. package/src/agentsmd.ts +8 -32
  258. package/src/alias.ts +0 -39
  259. package/src/allow.ts +221 -0
  260. package/src/aontu.ts +10 -108
  261. package/src/aontumodel.ts +32 -0
  262. package/src/cli.ts +1009 -540
  263. package/src/ctx.ts +0 -103
  264. package/src/diff.ts +0 -40
  265. package/src/err.ts +0 -40
  266. package/src/escape.ts +0 -46
  267. package/src/exactjson.ts +0 -131
  268. package/src/format.ts +63 -234
  269. package/src/grammar.ts +72 -0
  270. package/src/graph.ts +0 -61
  271. package/src/hcanon.ts +0 -82
  272. package/src/helpdoc.ts +77 -0
  273. package/src/hints.ts +72 -49
  274. package/src/jsonschema.ts +0 -123
  275. package/src/keyorder.ts +0 -42
  276. package/src/lang.ts +39 -895
  277. package/src/lower.ts +15 -65
  278. package/src/lsp-server.ts +0 -16
  279. package/src/lsp.ts +12 -180
  280. package/src/mcp-server.ts +0 -31
  281. package/src/mcp.ts +0 -130
  282. package/src/mod-tool.ts +0 -158
  283. package/src/mod.ts +0 -178
  284. package/src/patch.ts +0 -232
  285. package/src/provenance.ts +0 -183
  286. package/src/query.ts +0 -84
  287. package/src/reach.ts +0 -53
  288. package/src/relation.ts +7 -71
  289. package/src/render.ts +33 -180
  290. package/src/report-sarif.ts +0 -48
  291. package/src/sig.ts +0 -35
  292. package/src/sigdecl.ts +1 -1
  293. package/src/siggate.ts +0 -30
  294. package/src/site.ts +3 -29
  295. package/src/subsume.ts +1 -161
  296. package/src/template.ts +69 -140
  297. package/src/trim.ts +0 -53
  298. package/src/type.ts +2 -45
  299. package/src/unify.ts +13 -251
  300. package/src/utility.ts +0 -31
  301. package/src/val/AbnfFuncVal.ts +181 -0
  302. package/src/val/AbsentVal.ts +54 -0
  303. package/src/val/AggFuncVal.ts +152 -188
  304. package/src/val/ArithFuncVal.ts +0 -20
  305. package/src/val/BagVal.ts +1 -78
  306. package/src/val/BigDecimalVal.ts +0 -16
  307. package/src/val/BigIntegerVal.ts +0 -16
  308. package/src/val/CloseFuncVal.ts +0 -9
  309. package/src/val/CmpFuncVal.ts +249 -0
  310. package/src/val/ConjunctVal.ts +0 -33
  311. package/src/val/ConstraintVal.ts +2 -537
  312. package/src/val/ContainerKindVal.ts +0 -18
  313. package/src/val/CopyFuncVal.ts +0 -5
  314. package/src/val/Decimal.ts +1 -185
  315. package/src/val/DeprecateFuncVal.ts +0 -10
  316. package/src/val/DisjunctVal.ts +0 -157
  317. package/src/val/EachFuncVal.ts +12 -53
  318. package/src/val/EmitFuncVal.ts +8 -208
  319. package/src/val/ExpectVal.ts +0 -62
  320. package/src/val/FilterFuncVal.ts +0 -55
  321. package/src/val/FuncBaseVal.ts +9 -130
  322. package/src/val/GraphAtomVal.ts +0 -42
  323. package/src/val/HideFuncVal.ts +0 -15
  324. package/src/val/IntegerVal.ts +0 -61
  325. package/src/val/JunctionVal.ts +0 -20
  326. package/src/val/KeyFuncVal.ts +0 -48
  327. package/src/val/ListVal.ts +0 -59
  328. package/src/val/LowerFuncVal.ts +12 -7
  329. package/src/val/MapVal.ts +0 -151
  330. package/src/val/MatchFuncVal.ts +0 -59
  331. package/src/val/MaybeFuncVal.ts +86 -0
  332. package/src/val/MoveFuncVal.ts +0 -20
  333. package/src/val/NilVal.ts +2 -36
  334. package/src/val/NomFuncVal.ts +200 -0
  335. package/src/val/NumberVal.ts +0 -16
  336. package/src/val/OpBaseVal.ts +4 -17
  337. package/src/val/PackFuncVal.ts +0 -63
  338. package/src/val/PathFuncVal.ts +0 -32
  339. package/src/val/PathVal.ts +0 -66
  340. package/src/val/PlaceVal.ts +0 -45
  341. package/src/val/PlusOpVal.ts +18 -75
  342. package/src/val/PrefFuncVal.ts +0 -1
  343. package/src/val/PrefVal.ts +0 -179
  344. package/src/val/RecurseVal.ts +0 -81
  345. package/src/val/RefVal.ts +1 -285
  346. package/src/val/ReferFuncVal.ts +0 -255
  347. package/src/val/ScalarKindVal.ts +0 -50
  348. package/src/val/ScalarVal.ts +0 -12
  349. package/src/val/StrFuncVal.ts +0 -44
  350. package/src/val/SuperFuncVal.ts +0 -42
  351. package/src/val/TopVal.ts +0 -1
  352. package/src/val/TranslateFuncVal.ts +132 -0
  353. package/src/val/UpperFuncVal.ts +12 -7
  354. package/src/val/Val.ts +3 -192
  355. package/src/val/VarVal.ts +0 -15
  356. package/src/val/arith.ts +0 -92
  357. package/src/val/caserange.ts +53 -0
  358. package/src/val/members.ts +0 -23
  359. package/src/val/numcmp.ts +1 -27
  360. package/src/val/numkind.ts +0 -149
  361. package/src/val/valutil.ts +0 -16
  362. package/src/vet.ts +209 -504
  363. package/src/view.ts +0 -507
  364. package/src/walk.ts +0 -41
  365. package/dist/std.d.ts +0 -3
  366. package/dist/std.js +0 -637
  367. package/dist/std.js.map +0 -1
  368. package/dist/val/FormFuncVal.js +0 -55
  369. package/dist/val/FormFuncVal.js.map +0 -1
  370. package/src/std.ts +0 -648
  371. package/src/val/FormFuncVal.ts +0 -119
@@ -80,18 +80,20 @@ func = name %s"(" ws [ value *( ws %s"," ws value ) ws ] %s")"
80
80
 
81
81
  ; ORDER MATTERS where one name is a prefix of another: `refer` is
82
82
  ; listed before `re`, and `rem` before `re` as well.
83
- name = %s"above" / %s"acyclic" / %s"add" / %s"below" / %s"close"
84
- / %s"copy" / %s"deprecate" / %s"div"
85
- / %s"each" / %s"emit" / %s"esc" / %s"filter" / %s"form" / %s"greatest"
83
+ name = %s"abnf" / %s"above" / %s"acyclic" / %s"add" / %s"below" / %s"close"
84
+ / %s"copyfiles" / %s"copy" / %s"deprecate" / %s"div"
85
+ / %s"each" / %s"emit" / %s"esc" / %s"filter" / %s"greatest"
86
86
  / %s"hide"
87
87
  / %s"inverse" / %s"join" / %s"key" / %s"least"
88
- / %s"length" / %s"list" / %s"lower" / %s"map" / %s"match"
89
- / %s"max" / %s"min" / %s"mod" / %s"move"
88
+ / %s"length" / %s"listitems" / %s"list" / %s"lower" / %s"map" / %s"match"
89
+ / %s"maybe" / %s"max" / %s"min" / %s"mod" / %s"move"
90
90
  / %s"mul" / %s"must"
91
91
  / %s"neq"
92
- / %s"open" / %s"pack" / %s"path" / %s"pick" / %s"pref"
93
- / %s"refer" / %s"rel" / %s"rem" / %s"rep" / %s"re" / %s"split"
92
+ / %s"open" / %s"pack" / %s"parse" / %s"path" / %s"pick" / %s"pref"
93
+ / %s"refer" / %s"rel" / %s"rem" / %s"rep" / %s"re" / %s"sort" / %s"split"
94
94
  / %s"super"
95
+ / %s"content" / %s"file" / %s"folder" / %s"fragment" / %s"inject"
96
+ / %s"line" / %s"nom" / %s"project" / %s"slot" / %s"translate"
95
97
  / %s"sub" / %s"sum"
96
98
  / %s"type"
97
99
  / %s"unique" / %s"upper" / %s"usc"
@@ -81,15 +81,15 @@ element ::= spread | value
81
81
  func ::= name "(" ws ( value ( ws "," ws value )* ws )? ")"
82
82
 
83
83
  name ::=
84
- "above" | "acyclic" | "add" | "below" | "close" | "copy" | "deprecate" | "div"
85
- | "each" | "emit" | "esc" | "filter" | "form" | "greatest"
84
+ "content" | "file" | "folder" | "fragment" | "inject" | "line" | "nom" | "project" | "slot" | "translate" | "abnf" | "above" | "acyclic" | "add" | "below" | "close" | "copyfiles" | "copy" | "deprecate" | "div"
85
+ | "each" | "emit" | "esc" | "filter" | "greatest"
86
86
  | "hide"
87
87
  | "inverse" | "join" | "key" | "least"
88
- | "length" | "list" | "lower" | "map" | "match" | "max" | "min" | "mod" | "move"
88
+ | "length" | "listitems" | "list" | "lower" | "map" | "match" | "maybe" | "max" | "min" | "mod" | "move"
89
89
  | "mul" | "must"
90
90
  | "neq"
91
- | "open" | "pack" | "path" | "pick" | "pref" | "refer" | "rel" | "rem" | "rep" | "re"
92
- | "split" | "super"
91
+ | "open" | "pack" | "parse" | "path" | "pick" | "pref" | "refer" | "rel" | "rem" | "rep" | "re"
92
+ | "sort" | "split" | "super"
93
93
  | "sub" | "sum"
94
94
  | "type"
95
95
  | "unique" | "upper" | "usc"
@@ -62,15 +62,15 @@ element: spread
62
62
 
63
63
  func: name "(" [value ("," value)*] ")"
64
64
 
65
- name: "above" | "acyclic" | "add" | "below" | "close" | "copy" | "deprecate" | "div"
66
- | "each" | "emit" | "esc" | "filter" | "form" | "greatest"
65
+ name: "content" | "file" | "folder" | "fragment" | "inject" | "line" | "nom" | "project" | "slot" | "translate" | "abnf" | "above" | "acyclic" | "add" | "below" | "close" | "copyfiles" | "copy" | "deprecate" | "div"
66
+ | "each" | "emit" | "esc" | "filter" | "greatest"
67
67
  | "hide"
68
68
  | "inverse" | "join" | "key" | "least"
69
- | "length" | "list" | "lower" | "map" | "match" | "max" | "min" | "mod" | "move"
69
+ | "length" | "listitems" | "list" | "lower" | "map" | "match" | "maybe" | "max" | "min" | "mod" | "move"
70
70
  | "mul" | "must"
71
71
  | "neq"
72
- | "open" | "pack" | "path" | "pick" | "pref" | "refer" | "rel" | "rem" | "rep" | "re"
73
- | "split" | "super"
72
+ | "open" | "pack" | "parse" | "path" | "pick" | "pref" | "refer" | "rel" | "rem" | "rep" | "re"
73
+ | "sort" | "split" | "super"
74
74
  | "sub" | "sum"
75
75
  | "type"
76
76
  | "unique" | "upper" | "usc"
@@ -111,7 +111,7 @@
111
111
 
112
112
  "builtin": {
113
113
  "comment": "The engine's function registry. `func: name \"(\" ...` in aontu.lark — only these names can be called, so a call to anything else is deliberately left uncoloured rather than dressed up as valid. The prefix family is spelled longest-first (refer|rel|rem|re) to keep the intent legible; the trailing \\b already makes the order immaterial, since a short alternative that swallowed the stem fails the boundary and backtracks.",
114
- "match": "\\b(above|acyclic|add|below|close|copy|deprecate|div|each|emit|esc|filter|form|greatest|hide|inverse|join|key|least|length|list|lower|map|match|max|min|mod|move|mul|must|neq|open|pack|path|pick|pref|refer|rel|rem|rep|re|split|sub|sum|super|type|unique|upper|usc)\\b(?=\\s*\\()",
114
+ "match": "\\b(abnf|above|acyclic|add|below|close|content|copyfiles|copy|deprecate|div|each|emit|esc|file|filter|folder|fragment|greatest|hide|inject|inverse|join|key|least|length|line|listitems|list|lower|map|match|maybe|max|min|mod|move|mul|must|neq|nom|open|pack|parse|path|pick|pref|project|refer|rel|rem|rep|re|slot|sort|split|sub|sum|super|translate|type|unique|upper|usc)\\b(?=\\s*\\()",
115
115
  "captures": {
116
116
  "1": { "name": "support.function.builtin.aontu" }
117
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aontu",
3
- "version": "0.61.0",
3
+ "version": "0.63.0",
4
4
  "main": "dist/aontu.js",
5
5
  "type": "commonjs",
6
6
  "types": "dist/aontu.d.ts",
@@ -64,6 +64,8 @@
64
64
  "LICENSE"
65
65
  ],
66
66
  "dependencies": {
67
+ "@tabnas/abnf": "0.4.13",
68
+ "@tabnas/bnf": "0.1.15",
67
69
  "@tabnas/debug": "0.3.2",
68
70
  "@tabnas/directive": "0.5.2",
69
71
  "@tabnas/expr": "0.5.5",
@@ -73,7 +75,7 @@
73
75
  "@tabnas/jsonc": "0.5.6",
74
76
  "@tabnas/jsonic": "0.6.2",
75
77
  "@tabnas/multisource": "0.5.2",
76
- "@tabnas/parser": "0.8.7",
78
+ "@tabnas/parser": "0.9.7",
77
79
  "@tabnas/path": "0.3.2",
78
80
  "@tabnas/toml": "0.5.7",
79
81
  "@tabnas/yaml": "0.5.7"
package/skill/SKILL.md CHANGED
@@ -19,6 +19,8 @@ Start here:
19
19
 
20
20
  - Every JSON document is an aontu document. Write JSON, then add
21
21
  what JSON cannot say.
22
+ - [`tasks.md`](tasks.md) — the verb for a job, indexed by the word
23
+ you arrived with (ontology, schema, validate, model).
22
24
  - [`grammar-card.md`](grammar-card.md) — the whole surface on one
23
25
  page.
24
26
  - [`examples.md`](examples.md) — the JSON-superset ladder: plain
@@ -33,5 +35,11 @@ aontu vet schema.aon data.aon # does this data satisfy that truth?
33
35
  aontu get $.a.b file.aon # what does it say at a path?
34
36
  aontu why $.a.b file.aon # why does that value hold?
35
37
  aontu set $.a.b=1 --entry file.aon --overlay over.aon
38
+ aontu allow --role dev roles.aon $.a.b # may this role change that subtree?
36
39
  aontu hash file.aon # a pin that survives reformatting
37
40
  ```
41
+
42
+ These four files also ship INSIDE the command, so they answer with no
43
+ network and no checkout: `aontu help` lists the topics, `aontu help
44
+ language` is the grammar card, and `aontu explain <code>` says what one
45
+ refusal means.
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env sh
2
+ # check.sh --- the four questions to ask of a model. Run it after
3
+ # every edit to model.aon or data.aon.
4
+ #
5
+ # `aontu help tasks` maps a job to a verb; `aontu explain <code>` says
6
+ # what a refusal means; `aontu help language` is the whole grammar on
7
+ # one page. None of them needs a network.
8
+ set -eu
9
+
10
+ AONTU="${AONTU:-aontu}"
11
+ cd "$(dirname "$0")"
12
+
13
+ # 1. Does the data satisfy the truth -- and did the check examine
14
+ # anything? --strict-coverage exits 1 on a check that constrained no
15
+ # value, which is the failure a passing gate hides.
16
+ $AONTU vet --strict-coverage model.aon data.aon
17
+
18
+ # 2. What does it say at a path?
19
+ $AONTU get '$.entity.planet.table' data.aon
20
+
21
+ # 3. Why does it say that? Every contribution, with the line it is on.
22
+ $AONTU why '$.entity.planet.table' data.aon
23
+
24
+ # 4. A pin for the truth: it survives reformatting and moves on any
25
+ # change of meaning.
26
+ $AONTU hash model.aon
27
+
28
+ echo "ok --- model.aon and data.aon agree"
@@ -0,0 +1,12 @@
1
+ # data.aon --- an instance of the truth in model.aon. Edit it and run
2
+ # check.sh: every change is checked against the model, and a change the
3
+ # model refuses is named with the line it is on.
4
+ entity: {
5
+ planet: {
6
+ table: "planets"
7
+ fields: {
8
+ name: { type: "string", required: true }
9
+ diameter: { type: "integer" }
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,19 @@
1
+ # model.aon --- the truth. `aontu vet model.aon data.aon` asks whether
2
+ # a document satisfies it.
3
+ #
4
+ # `&:` is the construct to learn first: it meets EVERY key of the map
5
+ # it sits in, so one statement constrains every entity. A quoted "*" is
6
+ # not a wildcard -- it is a key named `*`, it meets nothing, and a
7
+ # schema written that way reports `valid` over data that violates it.
8
+ # `aontu vet --strict-coverage` refuses to pass such a check.
9
+ entity: {
10
+ &: {
11
+ table: string & re("^[a-z][a-z0-9_]*$")
12
+ fields: {
13
+ &: {
14
+ type: "string" | "integer" | "boolean"
15
+ required: *false | boolean
16
+ }
17
+ }
18
+ }
19
+ }
package/skill/tasks.md ADDED
@@ -0,0 +1,151 @@
1
+ # What do you want to do?
2
+
3
+ The verb for a job, found by the word you arrived with. aontu's own
4
+ vocabulary is on the right; yours is probably on the left.
5
+
6
+ ## Start from a document that works
7
+
8
+ Nothing written yet? Do not invent the first document, edit one:
9
+
10
+ ```
11
+ aontu init # into the working directory
12
+ aontu init model/ # or into a named one
13
+ sh check.sh # the four questions, on what was just written
14
+ ```
15
+
16
+ `init` writes `model.aon` (an entity map constrained with `&:`),
17
+ `data.aon` (an instance of it that holds) and `check.sh` (the four
18
+ checks to run after every edit). It never overwrites: if any
19
+ of the three already stands there, it refuses and writes none of them.
20
+
21
+ ## Describe a domain
22
+
23
+ An **ontology**, a **schema**, a **data model**, a **contract** — in
24
+ aontu these are all one thing: a document. Write the entities as a
25
+ **map keyed by name**, and say what every entry must satisfy with the
26
+ `&:` template:
27
+
28
+ ```
29
+ entity: {
30
+ &: {
31
+ table: string
32
+ fields: { &: { type: string, required: *false | boolean } }
33
+ }
34
+ planet: { table: "planets", fields: { name: { type: "string" } } }
35
+ moon: { table: "moons", fields: { name: { type: "string" } } }
36
+ }
37
+ ```
38
+
39
+ `&:` is the construct to reach for first, and the one most easily
40
+ missed. It meets **every** key of the map it sits in. A quoted `"*"`
41
+ is not a wildcard — it is a key named `*`, and a schema written that
42
+ way constrains nothing while still reporting `valid`.
43
+
44
+ Prefer a named map to a list unless the order is a fact (a migration
45
+ sequence, a rule table tried in order). A key is an address, a name
46
+ other parts can refer to, and a diff that shows one insertion instead
47
+ of every following element renumbered.
48
+
49
+ ## Check data against a model
50
+
51
+ ```
52
+ aontu vet model.aon data.aon
53
+ ```
54
+
55
+ Exit `0` valid, `1` a contradiction, `3` incomplete (nothing
56
+ contradicts, but the model is not yet satisfied), `4` the model does
57
+ not stand up on its own. `--format json` for the machine-readable
58
+ report, `--closed` to refuse keys the model does not declare,
59
+ `--max-errors <n>` to cap the list.
60
+
61
+ **Make the check prove it checked something.** A check that examined
62
+ nothing answers exactly like one that passed:
63
+
64
+ ```
65
+ aontu vet --coverage model.aon data.aon # what did it examine?
66
+ aontu vet --strict-coverage model.aon data.aon # exit 1 if nothing
67
+ ```
68
+
69
+ `--coverage` reports how many data leaves a declaration constrained,
70
+ the data paths none did, and the declarations no data met.
71
+ `--strict-coverage` exits 1 when the answer is nothing. The usual
72
+ cause is the `"*"` mistake above: reach for `&:`.
73
+
74
+ ## Check the model is coherent with itself
75
+
76
+ ```
77
+ aontu relations model.aon # declared entity edges: targets resolve, no cycles
78
+ aontu reaches planet moon model.aon # does one entity reach another, at any remove?
79
+ aontu trim --check model.aon # entries whose removal changes nothing
80
+ ```
81
+
82
+ ## Check code against a model
83
+
84
+ ```
85
+ aontu render --check src/ --profile go.aon model.aon
86
+ ```
87
+
88
+ `render` writes code from the model; `--check` writes nothing and
89
+ lists what on disk differs from what the model implies. That is the
90
+ gate: the model is the truth, the code is the claim, and drift is a
91
+ finding. `--coverage` reports the other direction — model paths no
92
+ output consumed, and rendered declarations no rule produced.
93
+
94
+ ## Ask what a model says, and why
95
+
96
+ ```
97
+ aontu get $.entity.planet.table model.aon
98
+ aontu why $.entity.planet.table model.aon
99
+ aontu get $.entity --keys model.aon
100
+ aontu get $.entity --types model.aon
101
+ ```
102
+
103
+ `why` names **every** contribution to a value, with the file and line
104
+ each was written on. It is the first thing to run when a value is not
105
+ what you expected, and the second thing to run when `vet` refuses.
106
+
107
+ ## Change a value without editing the file
108
+
109
+ ```
110
+ aontu set '$.entity.planet.table=planet_v2' --entry model.aon --overlay local.aon
111
+ ```
112
+
113
+ The change is checked before it is written; a change that contradicts
114
+ a pinned value is refused, and the file is left alone.
115
+
116
+ ## Gate a change to the model itself
117
+
118
+ ```
119
+ aontu subsume old.aon new.aon # does the general admit every specific?
120
+ aontu breaking --against git#HEAD~1 model.aon
121
+ aontu hash model.aon # a pin that survives reformatting
122
+ ```
123
+
124
+ ## Hand a model to another agent
125
+
126
+ ```
127
+ aontu agentsmd --write AGENTS.md model.aon
128
+ ```
129
+
130
+ Splices a derived stanza — the pin, the root keys, the shape, and the
131
+ commands spelled with paths that exist — between two markers, and
132
+ leaves the rest of the file alone. Re-run it in the commit that
133
+ changes the model.
134
+
135
+ ## When something refuses
136
+
137
+ Read the code in the brackets, then look it up:
138
+
139
+ ```
140
+ aontu explain no_scalar_unify
141
+ ```
142
+
143
+ Every finding carries a `code`, a `class`, a `path` and the **two
144
+ sites** that disagree — the value and the constraint it failed, each
145
+ with its file and line. The class says what kind of answer it is:
146
+ `conflict` (two things cannot both hold), `incomplete` (nothing is
147
+ wrong yet, something is missing), `parse`, `reference`, `budget`.
148
+
149
+ Full index: [`error-codes.md`](error-codes.md). The language on one
150
+ page: [`grammar-card.md`](grammar-card.md). The worked ladder from
151
+ plain JSON upward: [`examples.md`](examples.md).
package/src/agentsmd.ts CHANGED
@@ -1,16 +1,6 @@
1
1
  /* Copyright (c) 2025 Richard Rodger, MIT License */
2
2
  import { includeOpts } from './utility'
3
3
 
4
- // THE AGENTS.md STANZA (G7 phase 6,
5
- // docs/capability-review/g7-machine-access.md): generated FROM the
6
- // definition, so the prose entrypoint cannot drift from the formal
7
- // source it points at.
8
- //
9
- // A hand-written "here is where the config lives" paragraph is stale
10
- // the first time a key is renamed. This one is derived: the root keys
11
- // come from the document, the pin comes from G6's canon-hash, and the
12
- // commands are spelled with paths that exist. Re-running the verb
13
- // after an edit produces the stanza that edit implies.
14
4
 
15
5
  import { Aontu } from './aontu'
16
6
  import type { TrustOptions } from './type'
@@ -34,6 +24,7 @@ export type AgentsMdReport = {
34
24
  }
35
25
 
36
26
  export type AgentsMdOptions = {
27
+ depth?: number
37
28
  // The name the stanza should call the document. The engine never
38
29
  // reads a file; the CLI passes what the author typed.
39
30
  name?: string
@@ -42,9 +33,6 @@ export type AgentsMdOptions = {
42
33
  // (G5, docs/trust.md); vet's precedent.
43
34
  trust?: TrustOptions
44
35
 
45
- // Extensions additionally read as text (the CLI's `--text-ext`).
46
- // Rides beside `trust` because it is the other half of what an
47
- // include may read.
48
36
  textExt?: string[]
49
37
  }
50
38
 
@@ -64,14 +52,10 @@ export function agentsMd(
64
52
  }
65
53
 
66
54
  const keys = true === v.isMap ? Object.keys(v.peg).sort(cmpCodePoint) : []
67
- // THE SHAPE IS A SECOND EVALUATION, and it runs under the same
68
- // include options as the first. Taking `path` alone made it a
69
- // narrower reader than the stanza around it: a document whose keys
70
- // arrive through a `--text-ext` include listed those keys and then
71
- // reported an EMPTY shape, because the read the shape came from
72
- // refused the include the read above it had just honoured.
73
- const shape = get(src, '$',
74
- { view: 'types', depth: 2, path: options.path, ...includeOpts(options) })
55
+ const shape = get(src, '$', {
56
+ view: 'types', depth: options.depth ?? 2,
57
+ path: options.path, ...includeOpts(options),
58
+ })
75
59
 
76
60
  // A REAL path, so the example command works as written: the first
77
61
  // root key when there is one, the root itself when there is not.
@@ -107,6 +91,9 @@ export function agentsMd(
107
91
  '# change it without editing it',
108
92
  'aontu set ' + example + '=<value> --entry ' + name +
109
93
  ' --overlay overlay.aon',
94
+ '',
95
+ '# the language itself, offline: the whole grammar on one page',
96
+ 'aontu help language',
110
97
  '```',
111
98
  '',
112
99
  'Regenerate this section with `aontu agentsmd ' + name + '`.',
@@ -117,11 +104,6 @@ export function agentsMd(
117
104
  }
118
105
 
119
106
 
120
- // Splice the stanza into an existing document: replace what stands
121
- // between the markers, or append when there is nothing to replace. A
122
- // document is otherwise LEFT ALONE — the rest of an AGENTS.md is
123
- // someone's prose, and a generator that rewrote it would be a
124
- // generator nobody dared run twice.
125
107
  export function agentsMdSplice(existing: string, stanza: string): string {
126
108
  const from = existing.indexOf(AGENTSMD_BEGIN)
127
109
  const to = existing.indexOf(AGENTSMD_END)
@@ -130,12 +112,6 @@ export function agentsMdSplice(existing: string, stanza: string): string {
130
112
  ? existing : existing + '\n'
131
113
  return head + ('' === existing ? '' : '\n') + stanza
132
114
  }
133
- // Skip the end marker's line terminator, whatever it is, and only if
134
- // it is there. The full note is on the Go twin (go/agentsmd.go): `+1`
135
- // assumed one byte and got the CR of a CRLF document, leaving the LF
136
- // to become a blank line on every regeneration -- and past the end of
137
- // a document whose marker is its last content, where Go panicked and
138
- // this side quietly did not.
139
115
  let end = to + AGENTSMD_END.length
140
116
  if ('\r' === existing[end]) {
141
117
  end++
package/src/alias.ts CHANGED
@@ -1,44 +1,5 @@
1
1
  /* Copyright (c) 2021-2026 Richard Rodger, MIT License */
2
2
 
3
- // ALIAS EXPANSION FOR CANON. An alias is a name for a value, and
4
- // nothing more (docs/design/ALIASES.0.md §4): the declaration is
5
- // erased from generation, canon and the hash, and a reference resolves
6
- // to the value in place. One place a reference is NOT resolved in
7
- // place is a spread template -- `[&: %unit]`, `{&: {a: %u}}` -- because
8
- // a template applies to children that have not arrived, so it stands
9
- // in the settled tree as the reference it was written as. Canon has
10
- // erased the declaration, so the name alone would not reparse, and the
11
- // hash of `t: {&: %u}` would differ from the hash of `t: {&: integer}`,
12
- // which is the same document.
13
- //
14
- // This walk runs ONCE, after the last unification pass, and attaches
15
- // to every standing alias reference the value it names, which its
16
- // canon then renders instead of the name. The tree is not changed:
17
- // the reference still stands, still resolves at each destination, and
18
- // unification never reads the expansion.
19
- //
20
- // What a reference expands to. The ref-spread SNAPSHOT where one was
21
- // taken (MapVal.snapshotRefSpread: a path-dependent template captured
22
- // before its key()/path() resolved at the declaration), else the
23
- // declaration's settled value at the root. The snapshot is the
24
- // template the destinations actually saw; the settled value of
25
- // `%row = {name: key()}` is `{name: "%row"}`, the leak the snapshot
26
- // exists to prevent, and canon must not print it either.
27
- //
28
- // The knot. A recursive alias names itself inside its own template
29
- // (`%json = null | ... | [&: %json] | {&: %json}`). Its expansion
30
- // contains a reference to the name being expanded, and that reference
31
- // keeps its name: canon cannot spell the declaration it erased, and
32
- // an infinite unrolling is not a canon. Such a canon does not reparse
33
- // on its own -- the one place alias erasure and canon convergence
34
- // pull apart (use-cases/BUGS.md §82). Only the reference that closes
35
- // the cycle is left as a name; everything up to it expands.
36
- //
37
- // Every value is visited once (templates are shared across
38
- // destinations, and one declaration is reached through many
39
- // references), children in code-point key order, so the two ports
40
- // attach the same expansions in the same order and print one canon.
41
- // Twin of expandAliases in go/alias.go.
42
3
 
43
4
  import type { Val } from './type'
44
5