@latysh-development/monolith 0.0.0-stage → 0.1.0-alpha.1

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 (345) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +179 -2
  3. package/dist/brief/cli.d.ts +30 -0
  4. package/dist/brief/cli.d.ts.map +1 -0
  5. package/dist/brief/cli.js +85 -0
  6. package/dist/brief/collect.d.ts +17 -0
  7. package/dist/brief/collect.d.ts.map +1 -0
  8. package/dist/brief/collect.js +342 -0
  9. package/dist/brief/config.d.ts +40 -0
  10. package/dist/brief/config.d.ts.map +1 -0
  11. package/dist/brief/config.js +85 -0
  12. package/dist/brief/constants.d.ts +12 -0
  13. package/dist/brief/constants.d.ts.map +1 -0
  14. package/dist/brief/constants.js +11 -0
  15. package/dist/brief/docs.d.ts +53 -0
  16. package/dist/brief/docs.d.ts.map +1 -0
  17. package/dist/brief/docs.js +229 -0
  18. package/dist/brief/freshness.d.ts +104 -0
  19. package/dist/brief/freshness.d.ts.map +1 -0
  20. package/dist/brief/freshness.js +263 -0
  21. package/dist/brief/git-signals.d.ts +17 -0
  22. package/dist/brief/git-signals.d.ts.map +1 -0
  23. package/dist/brief/git-signals.js +101 -0
  24. package/dist/brief/index.d.ts +11 -0
  25. package/dist/brief/index.d.ts.map +1 -0
  26. package/dist/brief/index.js +5 -0
  27. package/dist/brief/reconcile.d.ts +75 -0
  28. package/dist/brief/reconcile.d.ts.map +1 -0
  29. package/dist/brief/reconcile.js +259 -0
  30. package/dist/brief/render.d.ts +67 -0
  31. package/dist/brief/render.d.ts.map +1 -0
  32. package/dist/brief/render.js +458 -0
  33. package/dist/brief/sanitize.d.ts +38 -0
  34. package/dist/brief/sanitize.d.ts.map +1 -0
  35. package/dist/brief/sanitize.js +48 -0
  36. package/dist/brief/selectors.d.ts +36 -0
  37. package/dist/brief/selectors.d.ts.map +1 -0
  38. package/dist/brief/selectors.js +75 -0
  39. package/dist/brief/story.d.ts +18 -0
  40. package/dist/brief/story.d.ts.map +1 -0
  41. package/dist/brief/story.js +59 -0
  42. package/dist/brief/types.d.ts +126 -0
  43. package/dist/brief/types.d.ts.map +1 -0
  44. package/dist/brief/types.js +11 -0
  45. package/dist/cli/index.d.ts +3 -0
  46. package/dist/cli/index.d.ts.map +1 -0
  47. package/dist/cli/index.js +199 -0
  48. package/dist/cli/init-args.d.ts +16 -0
  49. package/dist/cli/init-args.d.ts.map +1 -0
  50. package/dist/cli/init-args.js +24 -0
  51. package/dist/cli/ui-args.d.ts +23 -0
  52. package/dist/cli/ui-args.d.ts.map +1 -0
  53. package/dist/cli/ui-args.js +66 -0
  54. package/dist/cli/ui.d.ts +40 -0
  55. package/dist/cli/ui.d.ts.map +1 -0
  56. package/dist/cli/ui.js +180 -0
  57. package/dist/coordinatorium/checkpoint.d.ts +44 -0
  58. package/dist/coordinatorium/checkpoint.d.ts.map +1 -0
  59. package/dist/coordinatorium/checkpoint.js +124 -0
  60. package/dist/coordinatorium/cli.d.ts +39 -0
  61. package/dist/coordinatorium/cli.d.ts.map +1 -0
  62. package/dist/coordinatorium/cli.js +203 -0
  63. package/dist/coordinatorium/errors.d.ts +112 -0
  64. package/dist/coordinatorium/errors.d.ts.map +1 -0
  65. package/dist/coordinatorium/errors.js +145 -0
  66. package/dist/coordinatorium/index.d.ts +11 -0
  67. package/dist/coordinatorium/index.d.ts.map +1 -0
  68. package/dist/coordinatorium/index.js +5 -0
  69. package/dist/coordinatorium/lock.d.ts +187 -0
  70. package/dist/coordinatorium/lock.d.ts.map +1 -0
  71. package/dist/coordinatorium/lock.js +659 -0
  72. package/dist/coordinatorium/mission.d.ts +32 -0
  73. package/dist/coordinatorium/mission.d.ts.map +1 -0
  74. package/dist/coordinatorium/mission.js +87 -0
  75. package/dist/coordinatorium/state-keeper.d.ts +115 -0
  76. package/dist/coordinatorium/state-keeper.d.ts.map +1 -0
  77. package/dist/coordinatorium/state-keeper.js +396 -0
  78. package/dist/coordinatorium/types.d.ts +69 -0
  79. package/dist/coordinatorium/types.d.ts.map +1 -0
  80. package/dist/coordinatorium/types.js +27 -0
  81. package/dist/discovery/compose.d.ts +28 -0
  82. package/dist/discovery/compose.d.ts.map +1 -0
  83. package/dist/discovery/compose.js +159 -0
  84. package/dist/discovery/contracts.d.ts +211 -0
  85. package/dist/discovery/contracts.d.ts.map +1 -0
  86. package/dist/discovery/contracts.js +555 -0
  87. package/dist/discovery/docs.d.ts +278 -0
  88. package/dist/discovery/docs.d.ts.map +1 -0
  89. package/dist/discovery/docs.js +1182 -0
  90. package/dist/discovery/facts.d.ts +49 -0
  91. package/dist/discovery/facts.d.ts.map +1 -0
  92. package/dist/discovery/facts.js +541 -0
  93. package/dist/discovery/index.d.ts +8 -0
  94. package/dist/discovery/index.d.ts.map +1 -0
  95. package/dist/discovery/index.js +9 -0
  96. package/dist/discovery/orchestrate.d.ts +35 -0
  97. package/dist/discovery/orchestrate.d.ts.map +1 -0
  98. package/dist/discovery/orchestrate.js +32 -0
  99. package/dist/discovery/render.d.ts +36 -0
  100. package/dist/discovery/render.d.ts.map +1 -0
  101. package/dist/discovery/render.js +278 -0
  102. package/dist/discovery/traverse.d.ts +197 -0
  103. package/dist/discovery/traverse.d.ts.map +1 -0
  104. package/dist/discovery/traverse.js +510 -0
  105. package/dist/durable/assess.d.ts +105 -0
  106. package/dist/durable/assess.d.ts.map +1 -0
  107. package/dist/durable/assess.js +239 -0
  108. package/dist/durable/canonical.d.ts +25 -0
  109. package/dist/durable/canonical.d.ts.map +1 -0
  110. package/dist/durable/canonical.js +78 -0
  111. package/dist/durable/cli.d.ts +37 -0
  112. package/dist/durable/cli.d.ts.map +1 -0
  113. package/dist/durable/cli.js +141 -0
  114. package/dist/durable/errors.d.ts +192 -0
  115. package/dist/durable/errors.d.ts.map +1 -0
  116. package/dist/durable/errors.js +323 -0
  117. package/dist/durable/fs-store.d.ts +254 -0
  118. package/dist/durable/fs-store.d.ts.map +1 -0
  119. package/dist/durable/fs-store.js +1493 -0
  120. package/dist/durable/index.d.ts +20 -0
  121. package/dist/durable/index.d.ts.map +1 -0
  122. package/dist/durable/index.js +13 -0
  123. package/dist/durable/log.d.ts +33 -0
  124. package/dist/durable/log.d.ts.map +1 -0
  125. package/dist/durable/log.js +157 -0
  126. package/dist/durable/memory-store.d.ts +51 -0
  127. package/dist/durable/memory-store.d.ts.map +1 -0
  128. package/dist/durable/memory-store.js +302 -0
  129. package/dist/durable/projection.d.ts +35 -0
  130. package/dist/durable/projection.d.ts.map +1 -0
  131. package/dist/durable/projection.js +328 -0
  132. package/dist/durable/prune-check.d.ts +34 -0
  133. package/dist/durable/prune-check.d.ts.map +1 -0
  134. package/dist/durable/prune-check.js +72 -0
  135. package/dist/durable/register.d.ts +100 -0
  136. package/dist/durable/register.d.ts.map +1 -0
  137. package/dist/durable/register.js +532 -0
  138. package/dist/durable/retention.d.ts +49 -0
  139. package/dist/durable/retention.d.ts.map +1 -0
  140. package/dist/durable/retention.js +59 -0
  141. package/dist/durable/runtime.d.ts +499 -0
  142. package/dist/durable/runtime.d.ts.map +1 -0
  143. package/dist/durable/runtime.js +1288 -0
  144. package/dist/durable/seams.d.ts +44 -0
  145. package/dist/durable/seams.d.ts.map +1 -0
  146. package/dist/durable/seams.js +21 -0
  147. package/dist/durable/testing.d.ts +11 -0
  148. package/dist/durable/testing.d.ts.map +1 -0
  149. package/dist/durable/testing.js +25 -0
  150. package/dist/durable/types.d.ts +442 -0
  151. package/dist/durable/types.d.ts.map +1 -0
  152. package/dist/durable/types.js +75 -0
  153. package/dist/graph/builder.d.ts +11 -0
  154. package/dist/graph/builder.d.ts.map +1 -0
  155. package/dist/graph/builder.js +153 -0
  156. package/dist/graph/identity.d.ts +37 -0
  157. package/dist/graph/identity.d.ts.map +1 -0
  158. package/dist/graph/identity.js +46 -0
  159. package/dist/graph/index.d.ts +7 -0
  160. package/dist/graph/index.d.ts.map +1 -0
  161. package/dist/graph/index.js +3 -0
  162. package/dist/graph/resolver.d.ts +41 -0
  163. package/dist/graph/resolver.d.ts.map +1 -0
  164. package/dist/graph/resolver.js +36 -0
  165. package/dist/graph/types.d.ts +42 -0
  166. package/dist/graph/types.d.ts.map +1 -0
  167. package/dist/graph/types.js +1 -0
  168. package/dist/http/index.d.ts +5 -0
  169. package/dist/http/index.d.ts.map +1 -0
  170. package/dist/http/index.js +2 -0
  171. package/dist/http/server.d.ts +76 -0
  172. package/dist/http/server.d.ts.map +1 -0
  173. package/dist/http/server.js +195 -0
  174. package/dist/http/ui-assets.d.ts +22 -0
  175. package/dist/http/ui-assets.d.ts.map +1 -0
  176. package/dist/http/ui-assets.js +100 -0
  177. package/dist/ideas/cli.d.ts +33 -0
  178. package/dist/ideas/cli.d.ts.map +1 -0
  179. package/dist/ideas/cli.js +158 -0
  180. package/dist/ideas/format.d.ts +38 -0
  181. package/dist/ideas/format.d.ts.map +1 -0
  182. package/dist/ideas/format.js +194 -0
  183. package/dist/ideas/index.d.ts +6 -0
  184. package/dist/ideas/index.d.ts.map +1 -0
  185. package/dist/ideas/index.js +3 -0
  186. package/dist/ideas/store.d.ts +55 -0
  187. package/dist/ideas/store.d.ts.map +1 -0
  188. package/dist/ideas/store.js +262 -0
  189. package/dist/ideas/types.d.ts +54 -0
  190. package/dist/ideas/types.d.ts.map +1 -0
  191. package/dist/ideas/types.js +26 -0
  192. package/dist/index.d.ts +32 -0
  193. package/dist/index.d.ts.map +1 -0
  194. package/dist/index.js +28 -0
  195. package/dist/init/index.d.ts +12 -0
  196. package/dist/init/index.d.ts.map +1 -0
  197. package/dist/init/index.js +90 -0
  198. package/dist/init/prompts.d.ts +3 -0
  199. package/dist/init/prompts.d.ts.map +1 -0
  200. package/dist/init/prompts.js +47 -0
  201. package/dist/init/scaffold.d.ts +29 -0
  202. package/dist/init/scaffold.d.ts.map +1 -0
  203. package/dist/init/scaffold.js +208 -0
  204. package/dist/init/types.d.ts +14 -0
  205. package/dist/init/types.d.ts.map +1 -0
  206. package/dist/init/types.js +1 -0
  207. package/dist/managed/index.d.ts +73 -0
  208. package/dist/managed/index.d.ts.map +1 -0
  209. package/dist/managed/index.js +222 -0
  210. package/dist/readmodel/dashboard.d.ts +40 -0
  211. package/dist/readmodel/dashboard.d.ts.map +1 -0
  212. package/dist/readmodel/dashboard.js +236 -0
  213. package/dist/readmodel/index.d.ts +3 -0
  214. package/dist/readmodel/index.d.ts.map +1 -0
  215. package/dist/readmodel/index.js +1 -0
  216. package/dist/readmodel/types.d.ts +104 -0
  217. package/dist/readmodel/types.d.ts.map +1 -0
  218. package/dist/readmodel/types.js +15 -0
  219. package/dist/root/index.d.ts +186 -0
  220. package/dist/root/index.d.ts.map +1 -0
  221. package/dist/root/index.js +430 -0
  222. package/dist/root/safe-write.d.ts +268 -0
  223. package/dist/root/safe-write.d.ts.map +1 -0
  224. package/dist/root/safe-write.js +966 -0
  225. package/dist/root/write-artifacts.d.ts +20 -0
  226. package/dist/root/write-artifacts.d.ts.map +1 -0
  227. package/dist/root/write-artifacts.js +42 -0
  228. package/dist/scriptorium/compile.d.ts +4 -0
  229. package/dist/scriptorium/compile.d.ts.map +1 -0
  230. package/dist/scriptorium/compile.js +185 -0
  231. package/dist/scriptorium/frontmatter.d.ts +13 -0
  232. package/dist/scriptorium/frontmatter.d.ts.map +1 -0
  233. package/dist/scriptorium/frontmatter.js +90 -0
  234. package/dist/scriptorium/index.d.ts +3 -0
  235. package/dist/scriptorium/index.d.ts.map +1 -0
  236. package/dist/scriptorium/index.js +1 -0
  237. package/dist/scriptorium/markdown.d.ts +31 -0
  238. package/dist/scriptorium/markdown.d.ts.map +1 -0
  239. package/dist/scriptorium/markdown.js +88 -0
  240. package/dist/scriptorium/types.d.ts +78 -0
  241. package/dist/scriptorium/types.d.ts.map +1 -0
  242. package/dist/scriptorium/types.js +1 -0
  243. package/dist/types/enforcement.d.ts +11 -0
  244. package/dist/types/enforcement.d.ts.map +1 -0
  245. package/dist/types/enforcement.js +1 -0
  246. package/dist/types/integrity.d.ts +33 -0
  247. package/dist/types/integrity.d.ts.map +1 -0
  248. package/dist/types/integrity.js +1 -0
  249. package/dist/types/project-definition.d.ts +30 -0
  250. package/dist/types/project-definition.d.ts.map +1 -0
  251. package/dist/types/project-definition.js +1 -0
  252. package/dist/ui/assets/cosmic-glass-bg-Dwx47zPu.webp +0 -0
  253. package/dist/ui/assets/index-C4NhMaq7.js +28 -0
  254. package/dist/ui/assets/index-DMZ7ZvZY.css +1 -0
  255. package/dist/ui/index.html +13 -0
  256. package/dist/update/cli.d.ts +8 -0
  257. package/dist/update/cli.d.ts.map +1 -0
  258. package/dist/update/cli.js +115 -0
  259. package/dist/update/index.d.ts +78 -0
  260. package/dist/update/index.d.ts.map +1 -0
  261. package/dist/update/index.js +285 -0
  262. package/dist/validate/index.d.ts +6 -0
  263. package/dist/validate/index.d.ts.map +1 -0
  264. package/dist/validate/index.js +214 -0
  265. package/dist/version.d.ts +2 -0
  266. package/dist/version.d.ts.map +1 -0
  267. package/dist/version.js +1 -0
  268. package/package.json +67 -4
  269. package/templates/.gitkeep +0 -0
  270. package/templates/default-instance/instruction/.cursorrules +59 -0
  271. package/templates/default-instance/instruction/.windsurfrules +59 -0
  272. package/templates/default-instance/instruction/CLAUDE.md +57 -0
  273. package/templates/default-instance/managed/agent.md +20 -0
  274. package/templates/default-instance/managed/bootstrap.md +7 -0
  275. package/templates/default-instance/managed/index-idea.md +5 -0
  276. package/templates/default-instance/managed/routing-idea.md +14 -0
  277. package/templates/default-instance/monolith/AGENT.md +1 -0
  278. package/templates/default-instance/monolith/context/boot/HANDOFF.md +49 -0
  279. package/templates/default-instance/monolith/context/boot/WORK_SESSION.md +30 -0
  280. package/templates/default-instance/monolith/context/execution/current-state.md +30 -0
  281. package/templates/default-instance/monolith/context/maps/dependency-map.md +38 -0
  282. package/templates/default-instance/monolith/context/maps/project-map.md +85 -0
  283. package/templates/default-instance/monolith/context/maps/roadmap-index.md +41 -0
  284. package/templates/default-instance/monolith/context/maps/routing-map.md +151 -0
  285. package/templates/default-instance/monolith/context/maps/semantic-map.md +75 -0
  286. package/templates/default-instance/monolith/context/models/model-registry.md +37 -0
  287. package/templates/default-instance/monolith/context/models/privacy-classification.md +35 -0
  288. package/templates/default-instance/monolith/context/templates/plan-template.md +56 -0
  289. package/templates/default-instance/monolith/governance/README.md +29 -0
  290. package/templates/default-instance/monolith/governance/RULE_SCHEMA.md +58 -0
  291. package/templates/default-instance/monolith/learning/INDEX.md +48 -0
  292. package/templates/default-instance/monolith/learning/injection-map.md +49 -0
  293. package/templates/default-instance/monolith/learning/taxonomy.md +30 -0
  294. package/templates/default-instance/monolith/memory/errors/README.md +26 -0
  295. package/templates/default-instance/monolith/memory/errors/SCHEMA.md +47 -0
  296. package/templates/default-instance/monolith/memory/errors/TAXONOMY.md +27 -0
  297. package/templates/default-instance/monolith/memory/long-term/architecture-principles.md +31 -0
  298. package/templates/default-instance/monolith/memory/long-term/decisions.md +36 -0
  299. package/templates/default-instance/monolith/memory/long-term/execution-history.md +20 -0
  300. package/templates/default-instance/monolith/memory/long-term/tech-debt.md +25 -0
  301. package/templates/default-instance/monolith/memory/working/active.md +41 -0
  302. package/templates/default-instance/monolith/memory/working/governance-result.md +0 -0
  303. package/templates/default-instance/monolith/memory/working/integrity-result.md +0 -0
  304. package/templates/default-instance/monolith/memory/working/story-index.md +28 -0
  305. package/templates/default-instance/monolith/protocols/boot/boot-sequence.md +59 -0
  306. package/templates/default-instance/monolith/protocols/cognition/cognitive-modes.md +90 -0
  307. package/templates/default-instance/monolith/protocols/cognition/dry-run.md +56 -0
  308. package/templates/default-instance/monolith/protocols/cognition/execution-trace-format.md +52 -0
  309. package/templates/default-instance/monolith/protocols/cognition/semantic-planning.md +51 -0
  310. package/templates/default-instance/monolith/protocols/execution/hybrid-execution.md +37 -0
  311. package/templates/default-instance/monolith/protocols/execution/local-llm-governance.md +42 -0
  312. package/templates/default-instance/monolith/protocols/governance/command-policy.md +51 -0
  313. package/templates/default-instance/monolith/protocols/governance/core-invariants.md +40 -0
  314. package/templates/default-instance/monolith/protocols/governance/memory-governance.md +54 -0
  315. package/templates/default-instance/monolith/protocols/governance/metadata-schema.md +62 -0
  316. package/templates/default-instance/monolith/protocols/governance/skills.md +53 -0
  317. package/templates/default-instance/monolith/protocols/governance/work-session.md +46 -0
  318. package/templates/default-instance/monolith/skills/INDEX.md +32 -0
  319. package/templates/default-instance/monolith/skills/current-status/SKILL.md +47 -0
  320. package/templates/default-instance/monolith/skills/finalize-story/SKILL.md +86 -0
  321. package/templates/default-instance/monolith/skills/global-status/SKILL.md +56 -0
  322. package/templates/default-instance/monolith/skills/idea-capture/SKILL.md +157 -0
  323. package/templates/default-instance/monolith/skills/self-improvement/SKILL.md +77 -0
  324. package/templates/default-instance/monolith/state.json +11 -0
  325. package/templates/default-instance/monolith/tests/INDEX.md +57 -0
  326. package/templates/default-instance/monolith/tests/scenarios/architecture-review.md +32 -0
  327. package/templates/default-instance/monolith/tests/scenarios/debug-failure.md +32 -0
  328. package/templates/default-instance/monolith/tests/scenarios/dry-run-activation.md +33 -0
  329. package/templates/default-instance/monolith/tests/scenarios/execution-trace-verification.md +31 -0
  330. package/templates/default-instance/monolith/tests/scenarios/finalize-story.md +35 -0
  331. package/templates/default-instance/monolith/tests/scenarios/implement-feature.md +36 -0
  332. package/templates/default-instance/monolith/tests/scenarios/local-llm-delegation.md +31 -0
  333. package/templates/default-instance/monolith/tests/scenarios/planning-request.md +32 -0
  334. package/templates/default-instance/monolith/tests/scenarios/sensitive-context-task.md +30 -0
  335. package/templates/default-instance/monolith/tests/scenarios/validator-verification.md +33 -0
  336. package/templates/default-instance/monolith/tests/validation/expected-behavior.md +70 -0
  337. package/templates/default-instance/monolith/tests/validators/INDEX.md +17 -0
  338. package/templates/default-instance/monolith/tests/validators/delegation-semantics.md +22 -0
  339. package/templates/default-instance/monolith/tests/validators/mode-consistency.md +25 -0
  340. package/templates/default-instance/monolith/tests/validators/privacy-routing.md +23 -0
  341. package/templates/default-instance/monolith/tests/validators/protocol-references.md +27 -0
  342. package/templates/default-instance/monolith/tests/validators/routing-integrity.md +30 -0
  343. package/templates/default-instance/projectroot/AGENTS.md +111 -0
  344. package/templates/default-instance/projectroot/monolith.config.json +32 -0
  345. package/templates/default-instance/projectroot/project.definition.mjs.template +41 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dmytro Latysh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,180 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="./assets/branding/monolith-banner.png" alt="MONOLITH — Cognitive Infrastructure for AI" width="100%">
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ <h1 align="center">MONOLITH</h1>
6
+
7
+ <p align="center">
8
+ <strong>Cognitive Infrastructure for AI</strong><br>
9
+ Observable · Structured · Governed
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
14
+ <a href="./package.json"><img src="https://img.shields.io/badge/node-%3E%3D20-339933.svg" alt="Node.js >= 20"></a>
15
+ <img src="https://img.shields.io/badge/status-alpha-orange.svg" alt="Status: alpha">
16
+ <a href="https://hub.xerj.org/contributors/Demion-L"><img src="https://hub.xerj.org/contributors/Demion-L/badge.svg" alt="XERJ Corpus Hub contributor"></a>
17
+ </p>
18
+
19
+ ---
20
+
21
+ MONOLITH is an open-source toolkit for observable project state, structured
22
+ knowledge, and explicit execution governance. It gives a
23
+ human and an AI assistant a shared, inspectable record of a project —
24
+ structured knowledge, explicit read and write boundaries, and traceable
25
+ decisions — instead of relying on an assistant's unaided memory.
26
+
27
+ > **[MANIFESTO.md](./MANIFESTO.md)** — why this project exists and the engineering principles that govern it.
28
+ > **[AGENTS.md](./AGENTS.md)** — current scope, source structure, and the authoritative entry point for AI assistants working in this repository.
29
+
30
+ ## Why MONOLITH?
31
+
32
+ You are deep in a task when a good idea arrives — one that has nothing to do
33
+ with what you are doing right now. Switching to it would break your focus, so
34
+ you postpone it. A few hours later it is buried in a long chat, or simply gone.
35
+
36
+ A conversation history is a poor place to keep it. It is tied to one session,
37
+ it is hard to search, and an AI assistant that starts a new session does not
38
+ carry it over. A thought that only lives in a chat lasts as long as the chat.
39
+
40
+ MONOLITH keeps that knowledge in the project itself: ideas, structured project
41
+ context and recorded decisions, as plain Markdown that both a person and an
42
+ assistant can read, check and commit. You save the idea, and keep working.
43
+
44
+ > **Your AI assistant may forget the conversation. Your project shouldn't forget the ideas.**
45
+
46
+ Ideas are where MONOLITH started, not where it ends: the same approach — durable,
47
+ inspectable, deterministic — also covers project state and execution governance.
48
+
49
+ ## What MONOLITH Does
50
+
51
+ - **Idea Capture** — save a thought that is unrelated to the current task, without losing focus. You decide what to save; ideas are stored as one Markdown file each in `.monolith/memory/long-term/ideas/`, independent of the active story, and are managed with `monolith idea add|list|show` or by an assistant that follows your project's instructions.
52
+ - **Observable** — `monolith brief` summarizes project state in the terminal, including whether it looks stale; Mission Control shows it in a local, read-only web interface.
53
+ - **Structured** — structure is extracted from a project's own markdown (frontmatter, headings, explicit links) into an explicit relationship graph. No embeddings, no LLM, no fuzzy matching.
54
+ - **Governed** — protocols, skills and cognitive modes describe how an assistant reads and updates project memory; missions and checkpoints record progress. This is a recorded discipline, not a runtime gate.
55
+ - **Reproducible** — same input, same output. State lives in a schema-versioned file written with a lock and atomic replace; Durable State adds a hash-chained event log.
56
+ - **Bounded** — managed files are read and written through strict primitives that refuse symlinks; `monolith validate` never executes project code; Mission Control has no write endpoint.
57
+
58
+ ## Idea Capture Example
59
+
60
+ ```bash
61
+ monolith idea add \
62
+ --title 'Automatic Tool Tests' \
63
+ --description 'Generate tests from business tool contracts'
64
+
65
+ monolith idea list
66
+ monolith idea show IDEA-001
67
+ ```
68
+
69
+ `IDEA-001` is a demonstration ID; the real ID is printed by `idea add`, and
70
+ `idea list` shows every saved idea.
71
+
72
+ With an AI assistant, you can simply say: *"Save this idea for later."* The
73
+ assistant then saves it by running `monolith idea add` — it does not edit idea
74
+ files itself. This works because `monolith init` installs instructions and an
75
+ `idea-capture` skill for the assistant; it is not guaranteed for an arbitrary
76
+ model without that setup. Details and limits: [`monolith idea` in the CLI reference](./docs/reference/cli.md#monolith-idea).
77
+
78
+ Ideas are saved and recalled **manually**. There is no automatic idea detection,
79
+ no automatic recall or reminders, no idea status management and no idea UI yet.
80
+
81
+ ## Quick Start
82
+
83
+ Requires Node.js >= 20. Install the published alpha package from npm:
84
+
85
+ ```bash
86
+ npm install -g @latysh-development/monolith@alpha
87
+ ```
88
+
89
+ To build from source instead, see the [installation and release guide](./docs/release/alpha-installation.md).
90
+
91
+ Then, in a project directory:
92
+
93
+ ```bash
94
+ monolith init # scaffold a MONOLITH instance (refuses to overwrite existing files)
95
+ monolith validate # static integrity check of the instance
96
+ monolith brief # bounded, read-only summary of project state
97
+ monolith ui # Mission Control at http://127.0.0.1:4173 ; Ctrl+C to stop
98
+ ```
99
+
100
+ `monolith ui` must be run inside a directory that contains a MONOLITH
101
+ instance, and it does not open a browser — open the printed address yourself.
102
+ All commands: [CLI reference](./docs/reference/cli.md).
103
+
104
+ ## Updating an Existing Project
105
+
106
+ If a project was initialised with an earlier MONOLITH version, bring it up to the current agent integration (agent entry point and Idea Capture) with:
107
+
108
+ ```bash
109
+ monolith update # preview: shows the plan, writes nothing
110
+ monolith update --apply # applies the safe changes
111
+ ```
112
+
113
+ - The first command only prints a plan and does not modify the project.
114
+ - The second applies the safe changes (missing MONOLITH-owned files and managed blocks).
115
+ - Your project memory (`active.md`, `decisions.md`, roadmap, stories, ideas) and your own files are preserved.
116
+ - A managed block you have edited is never overwritten automatically.
117
+ - On a conflict the command writes nothing to that file and reports that manual resolution is required.
118
+
119
+ Details and the full list of verdicts: [`monolith update` in the CLI reference](./docs/reference/cli.md#monolith-update).
120
+
121
+ ## Architecture
122
+
123
+ ```text
124
+ Markdown artifact → Scriptorium (extraction) → ERG (relationship graph) → governed project memory
125
+
126
+ MONOLITH Kernel (src/) ──► Project Instance (.monolith/, monolith.config.json)
127
+ │ safe, bounded reads
128
+ ▼
129
+ Read model ──► loopback HTTP API ──► Mission Control UI
130
+ ```
131
+
132
+ > **Kernel knows HOW. Instance knows WHAT.** The Kernel holds generic
133
+ > mechanics and has no hardcoded knowledge of any project; an Instance — the
134
+ > `.monolith/` directory of a project using MONOLITH, this repository
135
+ > included — supplies the project's own knowledge. Details:
136
+ > [`docs/architecture/`](./docs/architecture/README.md).
137
+
138
+ ## Ecosystem
139
+
140
+ - **[Latysh Development](https://github.com/Demion-L)** — developer of MONOLITH.
141
+ - **[Webway](https://github.com/Demion-L/webway)** — a separate, independently developed project on semantic and associative knowledge linking. It was extracted from MONOLITH and has no runtime coupling to it.
142
+ - **SphynX** — a related application. MONOLITH does not depend on it, and this repository does not document it as a current consumer of MONOLITH.
143
+
144
+ ## Community & Recognition
145
+
146
+ MONOLITH is listed as a contributor project on
147
+ [XERJ Corpus Hub](https://hub.xerj.org/contributors/Demion-L). At the time of
148
+ writing, the contributor page exists, a MONOLITH commit is selected, the corpus
149
+ status is `candidate` and the manifest is `draft`. This is a contribution
150
+ listing — not an official partnership, endorsement or certification.
151
+
152
+ ## Documentation
153
+
154
+ - [CLI reference](./docs/reference/cli.md) — every command, `init`, `validate`, `brief`, `idea`, `mission`, `durable`, `ui`
155
+ - [Mission Control](./docs/reference/mission-control.md) — sections, LIVE/DEMO, skins, limitations
156
+ - [Security & Limitations](./docs/reference/security-and-limitations.md) — threat model, platform and filesystem caveats
157
+ - [Programmatic API](./docs/reference/write-scope-api.md) · [Development](./docs/reference/development.md)
158
+ - [Architecture](./docs/architecture/README.md) · [ADRs](./docs/adr/README.md) · [Knowledge-base index](./docs/README.md)
159
+ - [`AGENTS.md`](./AGENTS.md) — scope and entry point for AI assistants · [`MANIFESTO.md`](./MANIFESTO.md) — principles
160
+
161
+ ## Project Status
162
+
163
+ **Alpha** (`0.1.0-alpha.1`). The API and CLI are experimental and may change
164
+ without notice. Published to npm under the alpha dist-tag. Durable State and the Coordinatorium
165
+ (`monolith durable`, `monolith mission`) are experimental and are not part of
166
+ the Quick Start.
167
+
168
+ **Security:** Mission Control is read-only, listens on `127.0.0.1` only and has
169
+ no authentication. Concurrent adversarial mutation of a project is unsupported;
170
+ Windows is unverified. Durable State is merged but its security acceptance is
171
+ still open. See [Security & Limitations](./docs/reference/security-and-limitations.md).
172
+
173
+ **Not yet implemented:** a write-enabled UI, authentication for Mission
174
+ Control, `monolith context <topic>`, `monolith status`, `monolith dry-run`, the
175
+ enforcement gate engine and integrity validators (type declarations only), and
176
+ protocol drift detection. `AGENTS.md` is the authoritative status record.
177
+
178
+ ## License
179
+
180
+ [MIT](./LICENSE) © 2026 Dmytro Latysh
@@ -0,0 +1,30 @@
1
+ /**
2
+ * `monolith brief` CLI command handler.
3
+ *
4
+ * stdout carries only the brief's own content; CLI diagnostics and the
5
+ * INCOMPLETE warning go to stderr (section 12). Exit codes (DEC-CONTEXT-002):
6
+ * 0 — brief formed (COMPLETE or INCOMPLETE)
7
+ * 1 — CLI usage error (thrown as a plain Error, caught by src/cli/index.ts's main())
8
+ * 2 — --strict and the result is INCOMPLETE
9
+ *
10
+ * `--reconcile` (SELF-AWARENESS-002) prints the State Reconciliation Report
11
+ * instead of the brief: what a Freshness verdict rests on and what a person
12
+ * should check. Same read-only contract, same exit codes (a report is formed
13
+ * -> 0, whatever the Freshness; usage error -> 1). It does not combine with
14
+ * `--strict`, whose meaning (Completeness) belongs to the brief.
15
+ */
16
+ export interface BriefArgsOk {
17
+ ok: true;
18
+ maxChars: number;
19
+ strict: boolean;
20
+ /** Present (true) only when `--reconcile` was given, so existing result shapes are unchanged. */
21
+ reconcile?: true;
22
+ }
23
+ export interface BriefArgsErr {
24
+ ok: false;
25
+ message: string;
26
+ }
27
+ export type BriefArgsResult = BriefArgsOk | BriefArgsErr;
28
+ export declare function parseBriefArgs(args: string[]): BriefArgsResult;
29
+ export declare function runBrief(args: string[], targetDir?: string): Promise<void>;
30
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/brief/cli.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;GAcG;AAMH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,IAAI,CAAC;IACT,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,iGAAiG;IACjG,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,KAAK,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,YAAY,CAAC;AAIzD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,eAAe,CA6C9D;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,SAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BvF"}
@@ -0,0 +1,85 @@
1
+ /* eslint-disable no-console */
2
+ /**
3
+ * `monolith brief` CLI command handler.
4
+ *
5
+ * stdout carries only the brief's own content; CLI diagnostics and the
6
+ * INCOMPLETE warning go to stderr (section 12). Exit codes (DEC-CONTEXT-002):
7
+ * 0 — brief formed (COMPLETE or INCOMPLETE)
8
+ * 1 — CLI usage error (thrown as a plain Error, caught by src/cli/index.ts's main())
9
+ * 2 — --strict and the result is INCOMPLETE
10
+ *
11
+ * `--reconcile` (SELF-AWARENESS-002) prints the State Reconciliation Report
12
+ * instead of the brief: what a Freshness verdict rests on and what a person
13
+ * should check. Same read-only contract, same exit codes (a report is formed
14
+ * -> 0, whatever the Freshness; usage error -> 1). It does not combine with
15
+ * `--strict`, whose meaning (Completeness) belongs to the brief.
16
+ */
17
+ import { collect } from './collect.js';
18
+ import { render, DEFAULT_MAX_CHARS } from './render.js';
19
+ import { reconcile, renderReconciliation } from './reconcile.js';
20
+ const USAGE = 'Usage: monolith brief [--max-chars N] [--strict]\n monolith brief --reconcile [--max-chars N]';
21
+ export function parseBriefArgs(args) {
22
+ let maxChars = DEFAULT_MAX_CHARS;
23
+ let strict = false;
24
+ let reconcileMode = false;
25
+ const unknown = [];
26
+ let i = 0;
27
+ while (i < args.length) {
28
+ const arg = args[i];
29
+ if (arg === '--strict') {
30
+ strict = true;
31
+ i++;
32
+ continue;
33
+ }
34
+ if (arg === '--reconcile') {
35
+ reconcileMode = true;
36
+ i++;
37
+ continue;
38
+ }
39
+ if (arg === '--max-chars') {
40
+ const value = args[i + 1];
41
+ if (value === undefined) {
42
+ return { ok: false, message: `--max-chars requires a value.\n\n${USAGE}` };
43
+ }
44
+ const n = Number(value);
45
+ if (!Number.isInteger(n) || n <= 0) {
46
+ return { ok: false, message: `--max-chars must be a positive integer, got "${value}".\n\n${USAGE}` };
47
+ }
48
+ maxChars = n;
49
+ i += 2;
50
+ continue;
51
+ }
52
+ unknown.push(arg);
53
+ i++;
54
+ }
55
+ if (unknown.length > 0) {
56
+ return { ok: false, message: `Unknown argument(s) for 'monolith brief': ${unknown.join(' ')}\n\n${USAGE}` };
57
+ }
58
+ if (reconcileMode && strict) {
59
+ return { ok: false, message: `--strict cannot be combined with --reconcile.\n\n${USAGE}` };
60
+ }
61
+ return reconcileMode ? { ok: true, maxChars, strict, reconcile: true } : { ok: true, maxChars, strict };
62
+ }
63
+ export async function runBrief(args, targetDir = process.cwd()) {
64
+ const parsed = parseBriefArgs(args);
65
+ if (!parsed.ok) {
66
+ throw new Error(parsed.message);
67
+ }
68
+ const model = await collect(targetDir);
69
+ if (parsed.reconcile) {
70
+ if (!model.freshness || !model.freshnessEvidence) {
71
+ throw new Error('monolith brief --reconcile: no freshness evidence could be collected.');
72
+ }
73
+ process.stdout.write(renderReconciliation(reconcile(model.freshnessEvidence, model.freshness), parsed.maxChars).text);
74
+ process.exit(0);
75
+ }
76
+ const { text, completeness } = render(model, parsed.maxChars);
77
+ process.stdout.write(text);
78
+ if (completeness === 'INCOMPLETE') {
79
+ console.error('monolith brief: result is INCOMPLETE — see the Diagnostics section above.');
80
+ }
81
+ if (parsed.strict && completeness === 'INCOMPLETE') {
82
+ process.exit(2);
83
+ }
84
+ process.exit(0);
85
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `collect()` — the read-only Collection stage of the brief pipeline.
3
+ *
4
+ * readMonolithRoot → collect() → BriefModel → render(model, budget) → stdout
5
+ *
6
+ * Strictly read-only: no directories, lock files, or state.json are ever
7
+ * created; `mutateState()` is never imported here. state.json is read at
8
+ * most once (one `readFile` call) per invocation — every section that needs
9
+ * Coordinatorium data derives it from that single snapshot via the pure
10
+ * selectors in selectors.ts, never by calling `listMissions()`/
11
+ * `listCheckpoints()` (which each independently re-read the file).
12
+ */
13
+ import type { BriefModel } from './types.js';
14
+ /** SEC-001B.1: `active.md` is a short hand-written context file (~3 KB today). */
15
+ export declare const MAX_ACTIVE_CONTEXT_BYTES: number;
16
+ export declare function collect(targetDir: string): Promise<BriefModel>;
17
+ //# sourceMappingURL=collect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/brief/collect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAwBH,OAAO,KAAK,EACV,UAAU,EAOX,MAAM,YAAY,CAAC;AAiBpB,kFAAkF;AAClF,eAAO,MAAM,wBAAwB,QAAa,CAAC;AA8TnD,wBAAsB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAqEpE"}