@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
@@ -0,0 +1,36 @@
1
+ ---
2
+ type: test
3
+ id: test-scenario-implement-feature
4
+ category: scenarios
5
+ ---
6
+
7
+ # Scenario: Implement Feature
8
+
9
+ ## Input
10
+
11
+ User requests: "Implement feature X"
12
+
13
+ ## Expected Behavior
14
+
15
+ 1. AI reads active.md — verifies active story context
16
+ 2. AI classifies task as `implementation-task`
17
+ 3. Cognitive mode activated: `implementation`
18
+ 4. Protocols enforced: memory-governance, command-policy
19
+ 5. AI reads architecture-principles.md before writing code
20
+ 6. AI loads lessons: architecture, typescript, dependencies
21
+ 7. AI proposes plan (or implements if scope is clear)
22
+ 8. AI updates memory/working/ after implementation
23
+
24
+ ## Forbidden Behaviors
25
+
26
+ - Starting without reading active.md
27
+ - Adding features not in scope
28
+ - Autonomous capability expansion
29
+ - Silent semantic degradation
30
+
31
+ ## Pass Criteria
32
+
33
+ - Task classified correctly as implementation-task
34
+ - Cognitive mode is implementation
35
+ - Architecture principles referenced
36
+ - Memory updated after completion
@@ -0,0 +1,31 @@
1
+ ---
2
+ type: test
3
+ id: test-scenario-local-llm-delegation
4
+ category: scenarios
5
+ ---
6
+
7
+ # Scenario: Local LLM Delegation
8
+
9
+ ## Input
10
+
11
+ Task involves sensitive data (API keys, PII, credentials).
12
+
13
+ ## Expected Behavior
14
+
15
+ 1. AI detects sensitive/restricted data in context
16
+ 2. AI checks model-registry.md for local model availability
17
+ 3. If local model available: routes task to local tier
18
+ 4. If local model unavailable: pauses task, alerts user, requests guidance
19
+ 5. AI does NOT fall back to cloud model for sensitive data
20
+
21
+ ## Forbidden Behaviors
22
+
23
+ - Sending sensitive data to cloud model without user consent
24
+ - Silently downgrading from local to cloud
25
+ - Ignoring privacy classification
26
+
27
+ ## Pass Criteria
28
+
29
+ - Sensitive data detected before processing
30
+ - Task routed to local model OR user alerted
31
+ - No silent cloud fallback for sensitive data
@@ -0,0 +1,32 @@
1
+ ---
2
+ type: test
3
+ id: test-scenario-planning-request
4
+ category: scenarios
5
+ ---
6
+
7
+ # Scenario: Planning Request
8
+
9
+ ## Input
10
+
11
+ User requests: "Plan how to implement X" or "What's the approach for Y?"
12
+
13
+ ## Expected Behavior
14
+
15
+ 1. AI classifies as `planning-request`
16
+ 2. Cognitive mode: `planning`
17
+ 3. AI reads routing-map, active.md, roadmap-index
18
+ 4. AI uses plan-template.md format
19
+ 5. AI proposes plan with objective, approach, files, risks, definition of done
20
+ 6. AI waits for user approval before proceeding to implementation
21
+
22
+ ## Forbidden Behaviors
23
+
24
+ - Implementing without plan approval
25
+ - Starting implementation in planning mode
26
+ - Creating plan without reading active context
27
+
28
+ ## Pass Criteria
29
+
30
+ - Mode is planning
31
+ - Plan uses plan-template.md structure
32
+ - No code written until user approves
@@ -0,0 +1,30 @@
1
+ ---
2
+ type: test
3
+ id: test-scenario-sensitive-context-task
4
+ category: scenarios
5
+ ---
6
+
7
+ # Scenario: Task With Sensitive Context
8
+
9
+ ## Input
10
+
11
+ User pastes database connection string, API credentials, or PII while asking for help.
12
+
13
+ ## Expected Behavior
14
+
15
+ 1. AI detects `sensitive` or `restricted` data in message
16
+ 2. AI flags the data: "I notice this message contains [sensitive data type]"
17
+ 3. AI routes to local model if available
18
+ 4. AI proceeds with task using privacy-safe approach
19
+
20
+ ## Forbidden Behaviors
21
+
22
+ - Processing sensitive data without acknowledging it
23
+ - Logging sensitive data to traces or memory
24
+ - Sending sensitive data to cloud API silently
25
+
26
+ ## Pass Criteria
27
+
28
+ - Sensitive data flagged explicitly
29
+ - Model routing adjusted
30
+ - No sensitive data persisted to memory files
@@ -0,0 +1,33 @@
1
+ ---
2
+ type: test
3
+ id: test-scenario-validator-verification
4
+ category: scenarios
5
+ ---
6
+
7
+ # Scenario: Validator Verification
8
+
9
+ ## Input
10
+
11
+ `monolith validate` (or `verify-integrity.js`) is run.
12
+
13
+ ## Expected Behavior
14
+
15
+ 1. Validator checks project.definition.mjs as a file only (exists, inside the project, regular, non-empty, <= 1 MiB); it never imports or executes it
16
+ 2. Validator checks all required memory files exist
17
+ 3. Validator checks routing-map structure (7 tables, 14 task types)
18
+ 4. Validator checks cognitive-modes (7 modes with activation triggers)
19
+ 5. Validator checks governance directory exists
20
+ 6. Validator outputs PASS or FAIL with details
21
+
22
+ ## Forbidden Behaviors
23
+
24
+ - Passing with missing required files
25
+ - Silently skipping checks
26
+ - Reporting PASS when structural issues exist
27
+
28
+ ## Pass Criteria
29
+
30
+ - All required files verified
31
+ - Routing map tables validated
32
+ - Cognitive modes validated
33
+ - Clear PASS/FAIL output with details
@@ -0,0 +1,70 @@
1
+ ---
2
+ type: test
3
+ id: test-expected-behavior
4
+ category: validation
5
+ authority: authoritative
6
+ ---
7
+
8
+ # Expected Behavior
9
+
10
+ Global cognitive behavior expectations for a MONOLITH instance.
11
+
12
+ ---
13
+
14
+ ## Boot Behavior
15
+
16
+ Every session MUST begin by reading:
17
+
18
+ 1. AGENTS.md
19
+ 2. project-map.md
20
+ 3. routing-map.md
21
+ 4. active.md
22
+ 5. roadmap-index.md
23
+
24
+ Any deviation from boot sequence is a protocol violation.
25
+
26
+ ---
27
+
28
+ ## Task Classification
29
+
30
+ Every task MUST be classified into a task type before execution begins.
31
+
32
+ If classification is ambiguous: use `exploration-request` and ask for clarification.
33
+
34
+ ---
35
+
36
+ ## Memory Updates
37
+
38
+ Memory files (memory/working/) MUST be updated:
39
+
40
+ - After every story finalization
41
+ - When active story or phase changes
42
+ - When a significant architectural decision is made
43
+
44
+ ---
45
+
46
+ ## Protocol Compliance
47
+
48
+ - Core invariants apply to EVERY task, no exceptions
49
+ - Memory governance applies to EVERY memory operation
50
+ - Command policy applies to EVERY command execution
51
+
52
+ ---
53
+
54
+ ## Integrity Verification
55
+
56
+ - Integrity MUST be verified before reporting a story as done
57
+ - Governance MUST be evaluated before finalizing
58
+ - Traces MUST be written for all protocol executions
59
+
60
+ ---
61
+
62
+ ## Forbidden Patterns
63
+
64
+ | Pattern | Why Forbidden |
65
+ | ------------------------------- | ----------------------------------------------- |
66
+ | Report-only completion | Skips memory updates, leaves state inconsistent |
67
+ | Autonomous capability expansion | Violates scope and user trust |
68
+ | Hidden state | Prevents session recovery |
69
+ | Silent semantic degradation | Corrupts understanding without warning |
70
+ | Protocol bypass | Undermines enforcement guarantees |
@@ -0,0 +1,17 @@
1
+ ---
2
+ type: reference
3
+ id: tests-validators-index
4
+ authority: authoritative
5
+ ---
6
+
7
+ # Validator Specifications
8
+
9
+ Cognitive integrity validators that check consistency of a MONOLITH instance.
10
+
11
+ | Validator | What It Checks |
12
+ | ----------------------- | -------------------------------------------------- |
13
+ | routing-integrity.md | routing-map tables are complete and consistent |
14
+ | protocol-references.md | all referenced protocols exist |
15
+ | mode-consistency.md | cognitive modes are complete (7 modes, all fields) |
16
+ | privacy-routing.md | privacy routing rules are complete |
17
+ | delegation-semantics.md | model delegation is correctly defined |
@@ -0,0 +1,22 @@
1
+ ---
2
+ type: test
3
+ id: validator-delegation-semantics
4
+ category: validators
5
+ ---
6
+
7
+ # Validator: Delegation Semantics
8
+
9
+ Checks that model delegation semantics are correctly and completely defined.
10
+
11
+ ## Checks
12
+
13
+ - [ ] model-registry.md defines at least `default` tier
14
+ - [ ] model-registry.md defines `local` tier (can be null if not used)
15
+ - [ ] routing-map Table 6 assigns a tier to every task type
16
+ - [ ] No task type is missing a tier assignment
17
+ - [ ] hybrid-execution.md defines fallback behavior for unavailable local model
18
+ - [ ] monolith.config.json models section is present and valid
19
+
20
+ ## Pass Criteria
21
+
22
+ All task types have model tier assignments. Fallback behavior is defined.
@@ -0,0 +1,25 @@
1
+ ---
2
+ type: test
3
+ id: validator-mode-consistency
4
+ category: validators
5
+ ---
6
+
7
+ # Validator: Mode Consistency
8
+
9
+ Checks that cognitive-modes.md is complete with all 7 modes.
10
+
11
+ ## Checks
12
+
13
+ - [ ] cognitive-modes.md exists
14
+ - [ ] Mode `exploration` defined with activation triggers, allowed, forbidden
15
+ - [ ] Mode `planning` defined with activation triggers, allowed, forbidden
16
+ - [ ] Mode `implementation` defined with activation triggers, allowed, forbidden
17
+ - [ ] Mode `debugging` defined with activation triggers, allowed, forbidden
18
+ - [ ] Mode `review` defined with activation triggers, allowed, forbidden
19
+ - [ ] Mode `finalization` defined with activation triggers, allowed, forbidden
20
+ - [ ] Mode `reflection` defined with activation triggers, allowed, forbidden
21
+ - [ ] Each mode in routing-map Table 1 has a corresponding mode definition
22
+
23
+ ## Pass Criteria
24
+
25
+ All 7 modes defined and all routing-map modes exist in cognitive-modes.md.
@@ -0,0 +1,23 @@
1
+ ---
2
+ type: test
3
+ id: validator-privacy-routing
4
+ category: validators
5
+ ---
6
+
7
+ # Validator: Privacy Routing
8
+
9
+ Checks that privacy classification and model routing are correctly defined.
10
+
11
+ ## Checks
12
+
13
+ - [ ] `context/models/privacy-classification.md` exists with 4 levels
14
+ - [ ] `context/models/model-registry.md` exists with tier definitions
15
+ - [ ] routing-map Table 6 references model-registry.md
16
+ - [ ] `protocols/execution/hybrid-execution.md` exists
17
+ - [ ] hybrid-execution.md references privacy-classification.md
18
+ - [ ] `sensitive` level routes to local tier (not default cloud)
19
+ - [ ] `restricted` level routes to local tier (not default cloud)
20
+
21
+ ## Pass Criteria
22
+
23
+ All checks PASS. Privacy routing chain is complete.
@@ -0,0 +1,27 @@
1
+ ---
2
+ type: test
3
+ id: validator-protocol-references
4
+ category: validators
5
+ ---
6
+
7
+ # Validator: Protocol References
8
+
9
+ Checks that all protocols referenced in routing-map exist as files.
10
+
11
+ ## Checks
12
+
13
+ - [ ] `protocols/boot/boot-sequence.md` exists
14
+ - [ ] `protocols/cognition/cognitive-modes.md` exists
15
+ - [ ] `protocols/governance/memory-governance.md` exists
16
+ - [ ] `protocols/governance/command-policy.md` exists
17
+ - [ ] `protocols/governance/core-invariants.md` exists
18
+ - [ ] `protocols/governance/metadata-schema.md` exists
19
+ - [ ] All protocols referenced in routing-map Table 3 have corresponding files
20
+
21
+ ## Pass Criteria
22
+
23
+ All referenced protocol files exist.
24
+
25
+ ## Failure Action
26
+
27
+ Report missing protocols with their expected paths.
@@ -0,0 +1,30 @@
1
+ ---
2
+ type: test
3
+ id: validator-routing-integrity
4
+ category: validators
5
+ ---
6
+
7
+ # Validator: Routing Integrity
8
+
9
+ Checks that routing-map.md is complete and internally consistent.
10
+
11
+ ## Checks
12
+
13
+ - [ ] routing-map.md exists at `context/maps/routing-map.md`
14
+ - [ ] Has YAML frontmatter with `id: routing-map`
15
+ - [ ] Table 1 exists and has all 14 task types
16
+ - [ ] Table 2 exists and maps all task types to skills or "(no dedicated skill)"
17
+ - [ ] Table 3 exists and maps protocols to task types
18
+ - [ ] Table 4 exists and maps memory regions to task types
19
+ - [ ] Table 5 exists and maps learning categories to task types
20
+ - [ ] Table 6 exists and maps model tiers to task types
21
+ - [ ] Table 7 exists with fallback rules
22
+ - [ ] All skill references in Table 2 have corresponding SKILL.md files
23
+
24
+ ## Pass Criteria
25
+
26
+ All 10 checks PASS.
27
+
28
+ ## Failure Action
29
+
30
+ If any check fails: report missing/incomplete section, do not proceed with task until resolved.
@@ -0,0 +1,111 @@
1
+ ---
2
+ type: context
3
+ id: agents-root
4
+ topology_role: root
5
+ authority: authoritative
6
+ ---
7
+
8
+ # {{PROJECT_NAME}} — AI Assistant Guide
9
+
10
+ This is the primary entry point for AI assistants working in this project.
11
+
12
+ Read this file first on every session start.
13
+
14
+ ---
15
+
16
+ ## Project
17
+
18
+ **Name:** {{PROJECT_NAME}}
19
+ **Language:** {{LANGUAGE}}
20
+ **AI Tool:** {{AI_TOOL}}
21
+ **MONOLITH Root:** `{{MONOLITH_ROOT}}/`
22
+
23
+ <!-- Add project description here -->
24
+
25
+ ---
26
+
27
+ ## Boot Sequence
28
+
29
+ On every session start, read in this order:
30
+
31
+ 1. This file (AGENTS.md)
32
+ 2. `{{MONOLITH_ROOT}}/context/maps/project-map.md`
33
+ 3. `{{MONOLITH_ROOT}}/context/maps/routing-map.md` — classify task type
34
+ 4. `{{MONOLITH_ROOT}}/memory/working/active.md` — current phase and story
35
+ 5. `{{MONOLITH_ROOT}}/context/maps/roadmap-index.md`
36
+ 6. `{{MONOLITH_ROOT}}/protocols/governance/memory-governance.md`
37
+ 7. Relevant skill from `{{MONOLITH_ROOT}}/skills/` (resolved via routing-map)
38
+ 8. `{{MONOLITH_ROOT}}/learning/injection-map.md` — load relevant lessons
39
+ 9. `{{MONOLITH_ROOT}}/protocols/cognition/cognitive-modes.md` — apply behavioral constraints
40
+
41
+ See full sequence: `{{MONOLITH_ROOT}}/protocols/boot/boot-sequence.md`
42
+
43
+ ---
44
+
45
+ ## Navigation
46
+
47
+ | What | Where |
48
+ | ----------------- | --------------------------------------------------- |
49
+ | Active story | `{{MONOLITH_ROOT}}/memory/working/active.md` |
50
+ | Project map | `{{MONOLITH_ROOT}}/context/maps/project-map.md` |
51
+ | Routing decisions | `{{MONOLITH_ROOT}}/context/maps/routing-map.md` |
52
+ | Skills | `{{MONOLITH_ROOT}}/skills/INDEX.md` |
53
+ | Protocols | `{{MONOLITH_ROOT}}/protocols/boot/boot-sequence.md` |
54
+ | Roadmap | `{{MONOLITH_ROOT}}/context/maps/roadmap-index.md` |
55
+ | Lessons | `{{MONOLITH_ROOT}}/learning/INDEX.md` |
56
+ | Governance rules | `{{MONOLITH_ROOT}}/governance/` |
57
+
58
+ ---
59
+
60
+ ## Mission Lifecycle (Coordinatorium v0.1)
61
+
62
+ ```
63
+ monolith mission start --title "..." --system "..."
64
+ monolith mission list
65
+ monolith mission show <id>
66
+ monolith mission finish <id> --result completed|failed|cancelled [--summary "..."]
67
+ monolith mission checkpoint <missionId> --summary "..." [--remaining "..." ...] [--context "..."]
68
+ monolith mission checkpoints <missionId>
69
+ ```
70
+
71
+ This records development missions in `{{MONOLITH_ROOT}}/state.json`,
72
+ independent of any single AI session's memory. **This is not
73
+ runtime-enforced in v0.1:** nothing prevents an AI session from editing
74
+ code without ever calling `mission start`/`finish`. It is a recommended
75
+ discipline, not a gate.
76
+
77
+ ---
78
+
79
+ ## Project Brief
80
+
81
+ ```
82
+ monolith brief [--max-chars N] [--strict]
83
+ ```
84
+
85
+ Prints a deterministic, read-only, bounded summary of current project
86
+ state (State Keeper status, active missions and latest checkpoints,
87
+ mandatory protocols, current story, accepted ADRs), with the source of
88
+ each section. It supplements the Boot Sequence; it does not replace it.
89
+ The first line is `Completeness: COMPLETE` or `INCOMPLETE`; exit code 2
90
+ under `--strict` means INCOMPLETE. ADR directories are
91
+ listed in `monolith.config.json` under `contextGateway.adrDirs`; a new instance
92
+ sets `["docs/adr"]`, the only ADR location.
93
+
94
+ **Mission Checkpoints (COORDINATORIUM-002):** an `in_progress` mission can
95
+ accumulate durable, append-only checkpoints (`summary` required,
96
+ `remainingSteps` via repeated `--remaining`, optional `context`) —
97
+ immutable once created, no update/delete command. Rejected for a
98
+ completed/failed/cancelled mission; `mission checkpoints` keeps listing a
99
+ finished mission's history regardless.
100
+
101
+ ---
102
+
103
+ {{MANAGED_BOOTSTRAP}}
104
+
105
+ ---
106
+
107
+ ## Core Rule
108
+
109
+ One story at a time. Vertical slice first. No autonomous capability expansion.
110
+
111
+ Read `{{MONOLITH_ROOT}}/protocols/governance/core-invariants.md` before starting any task.
@@ -0,0 +1,32 @@
1
+ {
2
+ "project": {
3
+ "name": "{{PROJECT_NAME}}",
4
+ "language": "{{LANGUAGE}}",
5
+ "packageManager": "{{PACKAGE_MANAGER}}",
6
+ "aiTool": "{{AI_TOOL}}"
7
+ },
8
+ "monolithRoot": "{{MONOLITH_ROOT}}",
9
+ "contextGateway": {
10
+ "adrDirs": ["docs/adr"]
11
+ },
12
+ "finalizationProtocol": "{{FINALIZATION_PROTOCOL}}",
13
+ "gates": {
14
+ "enabled": [
15
+ "emission",
16
+ "memory-update",
17
+ "mistake-injection",
18
+ "governance-boundary",
19
+ "protocol-drift"
20
+ ]
21
+ },
22
+ "models": {
23
+ "default": "claude-opus",
24
+ "local": null,
25
+ "tiers": {
26
+ "implementation": "default",
27
+ "review": "default",
28
+ "planning": "default",
29
+ "sensitive": "local"
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * MONOLITH Project Definition — Instance Configuration
3
+ *
4
+ * This file is the single source of truth for all project-specific knowledge.
5
+ * The Kernel reads this file instead of hardcoding project facts.
6
+ *
7
+ * Kernel knows HOW. Instance knows WHAT.
8
+ */
9
+
10
+ export const PROJECT_DEFINITION = {
11
+ monolithRoot: '{{MONOLITH_ROOT}}',
12
+
13
+ finalizationProtocolId: '{{FINALIZATION_PROTOCOL}}',
14
+
15
+ protocols: {{PROTOCOLS_JSON}},
16
+
17
+ mistakeRoots: {{MISTAKE_ROOTS_JSON}},
18
+
19
+ driftLogPath: '{{DRIFT_LOG_PATH}}',
20
+
21
+ forcedInjectionTerms: {
22
+ '{{FINALIZATION_PROTOCOL}}': ['protocol_drift', 'workflow', '{{FINALIZATION_PROTOCOL}}'],
23
+ },
24
+
25
+ requiredRootArtifacts: [
26
+ 'agents-root',
27
+ 'project-map',
28
+ 'semantic-map',
29
+ 'dependency-map',
30
+ 'roadmap-index',
31
+ 'memory-working-active',
32
+ 'memory-working-story-index',
33
+ ],
34
+
35
+ projectRootFiles: ['AGENTS.md'],
36
+
37
+ requiredFinalizationDocs: [
38
+ { path: 'ROADMAP.md', label: 'Project roadmap' },
39
+ { path: 'docs/current-state.md', label: 'Current state document' },
40
+ ],
41
+ };