naive-framework 0.1.0 → 0.2.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 (254) hide show
  1. package/AGENTS.md +2 -1
  2. package/docs/decisions/decisions.json +27 -0
  3. package/docs/reference/ROUTES.md +36 -37
  4. package/governance/layer.json +2 -1
  5. package/governance/venture-template/roles/venture-roles.json +62 -0
  6. package/interface/acting.mjs +83 -0
  7. package/interface/adapters/claude-code.json +16 -0
  8. package/interface/adapters/codex.json +14 -0
  9. package/interface/adapters/cursor.json +16 -0
  10. package/interface/adapters.mjs +182 -0
  11. package/interface/api/server.mjs +4 -2
  12. package/interface/boundaries.mjs +218 -0
  13. package/interface/brand.mjs +214 -0
  14. package/interface/cli/freshness.mjs +59 -0
  15. package/interface/cli/guard.mjs +6 -0
  16. package/interface/cli/mentura.mjs +78 -8
  17. package/interface/cli/naive.mjs +33 -8
  18. package/interface/context.mjs +524 -0
  19. package/interface/demo/board.mjs +1 -1
  20. package/interface/dev/setup.mjs +84 -0
  21. package/interface/gate-hooks.mjs +36 -0
  22. package/interface/harness/evals.mjs +3 -3
  23. package/interface/harness/run.mjs +4 -4
  24. package/interface/instrumentation.mjs +86 -0
  25. package/interface/kit-boundary.mjs +73 -0
  26. package/interface/layer.json +8 -2
  27. package/interface/mcp/server.mjs +47 -7
  28. package/interface/package-routes.mjs +196 -0
  29. package/interface/provenance.mjs +24 -1
  30. package/interface/reads.mjs +173 -0
  31. package/interface/release-card.mjs +42 -0
  32. package/interface/router.mjs +101 -28
  33. package/interface/skills/naive-setup/SKILL.md +71 -0
  34. package/interface/skills/naive-setup/artifact.html +83 -0
  35. package/interface/vitals.mjs +115 -0
  36. package/interface/writes.mjs +190 -0
  37. package/knowledge/freshness.json +85 -0
  38. package/knowledge/layer.json +11 -3
  39. package/knowledge/templates/glossary.md +23 -0
  40. package/operations/layer.json +10 -3
  41. package/operations/templates/marketing-brand.md +46 -0
  42. package/operations/templates/public-assets.md +39 -0
  43. package/package.json +3 -1
  44. package/packages/catalog.json +8 -0
  45. package/packages/customers/package.json +21 -1
  46. package/packages/deals/package.json +27 -0
  47. package/packages/decisions/package.json +12 -1
  48. package/packages/finance/frames/fund-without-ceding-control.frame.json +177 -0
  49. package/packages/foundation/package.json +8 -1
  50. package/packages/fund/package.json +48 -0
  51. package/packages/marketing/package.json +10 -4
  52. package/packages/money/package.json +24 -3
  53. package/packages/validation/package.json +13 -0
  54. package/platform/README.md +6 -0
  55. package/platform/adapter.json +15 -0
  56. package/platform/integrations/remote-image.mjs +79 -0
  57. package/platform/integrations/rho.mjs +7 -6
  58. package/platform/kits/README.md +8 -1
  59. package/platform/kits/agent-upgrade/kit.json +15 -0
  60. package/platform/kits/agent-upgrade/run.mjs +82 -0
  61. package/platform/kits/agent-upgrade/stand-in-agent.mjs +32 -0
  62. package/platform/kits/validation-kickoff/kit.json +29 -0
  63. package/platform/webhooks/server.mjs +70 -0
  64. package/purpose/frameworks/idea-map/ideamap.mjs +4 -2
  65. package/schema/README.md +1 -0
  66. package/schema/access.mjs +57 -0
  67. package/schema/adapter.schema.json +33 -0
  68. package/schema/assets.mjs +212 -0
  69. package/schema/brand.mjs +373 -0
  70. package/schema/build-release.mjs +61 -0
  71. package/schema/caching.mjs +505 -0
  72. package/schema/check-assets.mjs +24 -0
  73. package/schema/check-brand.mjs +24 -0
  74. package/schema/check-config.mjs +110 -0
  75. package/schema/check-nextjs-status.mjs +3 -1
  76. package/schema/check-people.mjs +70 -0
  77. package/schema/check-sources.mjs +9 -1
  78. package/schema/data-model.json +334 -8
  79. package/schema/deal.schema.json +80 -0
  80. package/schema/decisions.mjs +7 -1
  81. package/schema/examples/frames/judge.mjs +10 -0
  82. package/schema/examples/venture-type/jev.mjs +12 -0
  83. package/schema/examples/workspace/ventures/acme-labs/AGENTS.md +17 -0
  84. package/schema/examples/workspace/ventures/acme-labs/accounts/.gitkeep +0 -0
  85. package/schema/examples/workspace/ventures/acme-labs/decisions/discovery-goal.decision.json +23 -0
  86. package/schema/examples/workspace/ventures/acme-labs/decisions/statement-icp.decision.json +22 -0
  87. package/schema/examples/workspace/ventures/acme-labs/decisions/statement-problem.decision.json +22 -0
  88. package/schema/examples/workspace/ventures/acme-labs/decisions/venture.team.decision.json +37 -0
  89. package/schema/examples/workspace/ventures/acme-labs/knowledge/README.md +3 -0
  90. package/schema/examples/workspace/ventures/acme-labs/knowledge/sources.json +46 -0
  91. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000001.json +12 -0
  92. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000002.json +12 -0
  93. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000003.json +12 -0
  94. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000004.json +12 -0
  95. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000005.json +12 -0
  96. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000006.json +12 -0
  97. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000007.json +12 -0
  98. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000008.json +12 -0
  99. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000009.json +12 -0
  100. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000010.json +12 -0
  101. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000011.json +12 -0
  102. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000012.json +12 -0
  103. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000013.json +12 -0
  104. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000014.json +12 -0
  105. package/schema/examples/workspace/ventures/acme-labs/money/_streams/transactions/stream.json +5 -0
  106. package/schema/examples/workspace/ventures/acme-labs/money/_summary.json +30 -0
  107. package/schema/examples/workspace/ventures/acme-labs/operations/departments/customer-service/README.md +5 -0
  108. package/schema/examples/workspace/ventures/acme-labs/operations/departments/customer-service/department.json +5 -0
  109. package/schema/examples/workspace/ventures/acme-labs/operations/departments/finance/README.md +5 -0
  110. package/schema/examples/workspace/ventures/acme-labs/operations/departments/finance/department.json +5 -0
  111. package/schema/examples/workspace/ventures/acme-labs/operations/departments/human-capital/README.md +5 -0
  112. package/schema/examples/workspace/ventures/acme-labs/operations/departments/human-capital/department.json +5 -0
  113. package/schema/examples/workspace/ventures/acme-labs/operations/departments/it/README.md +5 -0
  114. package/schema/examples/workspace/ventures/acme-labs/operations/departments/it/department.json +5 -0
  115. package/schema/examples/workspace/ventures/acme-labs/operations/departments/marketing-and-sales/README.md +5 -0
  116. package/schema/examples/workspace/ventures/acme-labs/operations/departments/marketing-and-sales/department.json +5 -0
  117. package/schema/examples/workspace/ventures/acme-labs/operations/departments/products/README.md +5 -0
  118. package/schema/examples/workspace/ventures/acme-labs/operations/departments/products/department.json +5 -0
  119. package/schema/examples/workspace/ventures/acme-labs/operations/departments/strategy/README.md +5 -0
  120. package/schema/examples/workspace/ventures/acme-labs/operations/departments/strategy/department.json +5 -0
  121. package/schema/examples/workspace/ventures/acme-labs/people/founders/maya-chen.json +15 -0
  122. package/schema/examples/workspace/ventures/acme-labs/people/people.json +22 -0
  123. package/schema/examples/workspace/ventures/acme-labs/pillars/brand.md +5 -0
  124. package/schema/examples/workspace/ventures/acme-labs/pillars/business.md +5 -0
  125. package/schema/examples/workspace/ventures/acme-labs/pillars/product.md +5 -0
  126. package/schema/examples/workspace/ventures/acme-labs/products/.gitkeep +0 -0
  127. package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.core-product.decision.json +28 -0
  128. package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.exists.decision.json +38 -0
  129. package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.flagship.decision.json +27 -0
  130. package/schema/examples/workspace/ventures/acme-labs/profile.md +12 -0
  131. package/schema/examples/workspace/ventures/acme-labs/provenance.jsonl +12 -0
  132. package/schema/examples/workspace/ventures/acme-labs/raw/dump.md +6 -0
  133. package/schema/examples/workspace/ventures/acme-labs/venture.json +27 -0
  134. package/schema/examples/workspace/ventures/northstar/AGENTS.md +17 -0
  135. package/schema/examples/workspace/ventures/northstar/accounts/.gitkeep +0 -0
  136. package/schema/examples/workspace/ventures/northstar/deals/ductline.json +8 -0
  137. package/schema/examples/workspace/ventures/northstar/deals/kilnworks.json +14 -0
  138. package/schema/examples/workspace/ventures/northstar/decisions/venture.team.decision.json +31 -0
  139. package/schema/examples/workspace/ventures/northstar/evidence/README.md +3 -0
  140. package/schema/examples/workspace/ventures/northstar/fund/decisions/terms.decision.json +27 -0
  141. package/schema/examples/workspace/ventures/northstar/fund/decisions/terms.first-close.decision.json +27 -0
  142. package/schema/examples/workspace/ventures/northstar/fund/decisions/thesis.decision.json +26 -0
  143. package/schema/examples/workspace/ventures/northstar/fund/terms.json +22 -0
  144. package/schema/examples/workspace/ventures/northstar/fund/thesis.json +22 -0
  145. package/schema/examples/workspace/ventures/northstar/governance/README.md +3 -0
  146. package/schema/examples/workspace/ventures/northstar/governance/departments/external-relationships/charter.md +5 -0
  147. package/schema/examples/workspace/ventures/northstar/governance/departments/external-relationships/department.json +5 -0
  148. package/schema/examples/workspace/ventures/northstar/governance/departments/finance/charter.md +5 -0
  149. package/schema/examples/workspace/ventures/northstar/governance/departments/finance/department.json +5 -0
  150. package/schema/examples/workspace/ventures/northstar/governance/departments/human-capital/charter.md +5 -0
  151. package/schema/examples/workspace/ventures/northstar/governance/departments/human-capital/department.json +5 -0
  152. package/schema/examples/workspace/ventures/northstar/governance/departments/risk-and-compliance/charter.md +5 -0
  153. package/schema/examples/workspace/ventures/northstar/governance/departments/risk-and-compliance/department.json +5 -0
  154. package/schema/examples/workspace/ventures/northstar/governance/departments/strategy/charter.md +5 -0
  155. package/schema/examples/workspace/ventures/northstar/governance/departments/strategy/department.json +5 -0
  156. package/schema/examples/workspace/ventures/northstar/knowledge/README.md +3 -0
  157. package/schema/examples/workspace/ventures/northstar/operations/README.md +3 -0
  158. package/schema/examples/workspace/ventures/northstar/operations/departments/external-relationships/README.md +5 -0
  159. package/schema/examples/workspace/ventures/northstar/operations/departments/external-relationships/department.json +5 -0
  160. package/schema/examples/workspace/ventures/northstar/operations/departments/finance/README.md +5 -0
  161. package/schema/examples/workspace/ventures/northstar/operations/departments/finance/department.json +5 -0
  162. package/schema/examples/workspace/ventures/northstar/operations/departments/human-capital/README.md +5 -0
  163. package/schema/examples/workspace/ventures/northstar/operations/departments/human-capital/department.json +5 -0
  164. package/schema/examples/workspace/ventures/northstar/operations/departments/risk-and-compliance/README.md +5 -0
  165. package/schema/examples/workspace/ventures/northstar/operations/departments/risk-and-compliance/department.json +5 -0
  166. package/schema/examples/workspace/ventures/northstar/operations/departments/strategy/README.md +5 -0
  167. package/schema/examples/workspace/ventures/northstar/operations/departments/strategy/department.json +5 -0
  168. package/schema/examples/workspace/ventures/northstar/people/founders/ana-ruiz.json +13 -0
  169. package/schema/examples/workspace/ventures/northstar/people/founders/ben-okafor.json +7 -0
  170. package/schema/examples/workspace/ventures/northstar/people/people.json +27 -0
  171. package/schema/examples/workspace/ventures/northstar/pillars/brand.md +5 -0
  172. package/schema/examples/workspace/ventures/northstar/pillars/business.md +5 -0
  173. package/schema/examples/workspace/ventures/northstar/pillars/product.md +5 -0
  174. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/AGENTS.md +17 -0
  175. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/accounts/.gitkeep +0 -0
  176. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/decisions/venture.team.decision.json +31 -0
  177. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/knowledge/README.md +3 -0
  178. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/customer-service/README.md +5 -0
  179. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/customer-service/department.json +5 -0
  180. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/finance/README.md +5 -0
  181. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/finance/department.json +5 -0
  182. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/human-capital/README.md +5 -0
  183. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/human-capital/department.json +5 -0
  184. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/it/README.md +5 -0
  185. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/it/department.json +5 -0
  186. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/marketing-and-sales/README.md +5 -0
  187. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/marketing-and-sales/department.json +5 -0
  188. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/products/README.md +5 -0
  189. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/products/department.json +5 -0
  190. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/strategy/README.md +5 -0
  191. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/strategy/department.json +5 -0
  192. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/brand.md +5 -0
  193. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/business.md +5 -0
  194. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/product.md +5 -0
  195. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/.gitkeep +0 -0
  196. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.core-product.decision.json +28 -0
  197. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.exists.decision.json +32 -0
  198. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.flagship.decision.json +27 -0
  199. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/profile.md +5 -0
  200. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/venture.json +27 -0
  201. package/schema/examples/workspace/ventures/northstar/products/.gitkeep +0 -0
  202. package/schema/examples/workspace/ventures/northstar/profile.md +5 -0
  203. package/schema/examples/workspace/ventures/northstar/provenance.jsonl +3 -0
  204. package/schema/examples/workspace/ventures/northstar/purpose/README.md +3 -0
  205. package/schema/examples/workspace/ventures/northstar/venture.json +49 -0
  206. package/schema/founder.schema.json +72 -0
  207. package/schema/frame.schema.json +240 -0
  208. package/schema/frames.mjs +228 -0
  209. package/schema/freshness-log.schema.json +40 -0
  210. package/schema/freshness-profiles.schema.json +44 -0
  211. package/schema/freshness.mjs +473 -0
  212. package/schema/fund-terms.schema.json +107 -0
  213. package/schema/fund-thesis.schema.json +87 -0
  214. package/schema/gate-drafts.mjs +130 -0
  215. package/schema/gate.mjs +105 -11
  216. package/schema/glossary.schema.json +25 -0
  217. package/schema/init-venture.mjs +38 -8
  218. package/schema/judgment.schema.json +38 -0
  219. package/schema/kit.schema.json +47 -0
  220. package/schema/kits.mjs +24 -0
  221. package/schema/knowledge-sources.schema.json +145 -15
  222. package/schema/layer.json +16 -3
  223. package/schema/marketing-brand.schema.json +116 -0
  224. package/schema/migrations/kit-to-package.mjs +94 -0
  225. package/schema/migrations/package-layout.mjs +86 -0
  226. package/schema/model-steps.mjs +717 -0
  227. package/schema/money-summary.schema.json +138 -0
  228. package/schema/naive-config.mjs +165 -0
  229. package/schema/naive-config.schema.json +268 -0
  230. package/schema/need-now.json +171 -0
  231. package/schema/need-now.mjs +3 -2
  232. package/schema/packages.mjs +10 -5
  233. package/schema/people.schema.json +86 -0
  234. package/schema/public-assets.schema.json +76 -0
  235. package/schema/release-read.mjs +111 -0
  236. package/schema/releases.mjs +497 -0
  237. package/schema/setup.mjs +164 -0
  238. package/schema/stale.mjs +111 -0
  239. package/schema/start-release.mjs +41 -0
  240. package/schema/structure.mjs +186 -0
  241. package/schema/systems-catalog.json +126 -0
  242. package/schema/systems-catalog.schema.json +78 -0
  243. package/schema/trigger.schema.json +44 -0
  244. package/schema/triggers.mjs +237 -0
  245. package/schema/upgrade-registry.schema.json +60 -0
  246. package/schema/upgrade-venture.mjs +96 -118
  247. package/schema/upgrades.json +69 -0
  248. package/schema/upgrades.mjs +385 -0
  249. package/schema/validate.py +19 -10
  250. package/schema/venture-role.schema.json +64 -0
  251. package/schema/venture-type.mjs +62 -0
  252. package/schema/venture-types.json +346 -0
  253. package/schema/venture-types.schema.json +129 -0
  254. package/schema/venture.schema.json +53 -0
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "deal.schema.json",
4
+ "title": "Deal",
5
+ "description": "One company in the fund's pipeline (deals/<id>.json), from sourced to invested or passed. An investment it makes becomes a nested venture under portfolio/.",
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "company",
10
+ "round",
11
+ "status"
12
+ ],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "id": {
16
+ "type": "string",
17
+ "pattern": "^[a-z0-9-]+$"
18
+ },
19
+ "company": {
20
+ "type": "string"
21
+ },
22
+ "round": {
23
+ "enum": [
24
+ "pre-seed",
25
+ "seed",
26
+ "series-a",
27
+ "series-b",
28
+ "growth",
29
+ "late"
30
+ ],
31
+ "description": "The financing round the company is raising"
32
+ },
33
+ "status": {
34
+ "enum": [
35
+ "sourced",
36
+ "screening",
37
+ "diligence",
38
+ "term-sheet",
39
+ "invested",
40
+ "passed"
41
+ ]
42
+ },
43
+ "sector": {
44
+ "type": "string"
45
+ },
46
+ "source": {
47
+ "type": "string"
48
+ },
49
+ "check": {
50
+ "type": "object",
51
+ "required": [
52
+ "amount",
53
+ "currency"
54
+ ],
55
+ "additionalProperties": false,
56
+ "properties": {
57
+ "amount": {
58
+ "type": "number",
59
+ "minimum": 0
60
+ },
61
+ "currency": {
62
+ "type": "string",
63
+ "pattern": "^[A-Z]{3}$"
64
+ }
65
+ }
66
+ },
67
+ "thesis_fit": {
68
+ "type": "string",
69
+ "description": "How the company fits fund/thesis.json, in a sentence"
70
+ },
71
+ "portfolio": {
72
+ "type": "string",
73
+ "pattern": "^portfolio/[a-z0-9-]+$",
74
+ "description": "The nested venture, once invested"
75
+ },
76
+ "note": {
77
+ "type": "string"
78
+ }
79
+ }
80
+ }
@@ -30,6 +30,8 @@ import { dirname, join, relative } from "node:path";
30
30
  import { FRAME, foundation } from "./foundation.mjs";
31
31
  import { agentFromEnv, record as prov } from "../interface/provenance.mjs";
32
32
  import { glob as routeFileGlob, routes } from "../interface/router.mjs";
33
+ // Caching hook (F-12): the decision list is computed once per router action (schema/caching.mjs).
34
+ import { memo } from "./caching.mjs";
33
35
 
34
36
  const repo = new URL("..", import.meta.url).pathname;
35
37
  const load = (f) => JSON.parse(readFileSync(f, "utf8"));
@@ -53,7 +55,11 @@ function decisionFiles(dir, sub = "") {
53
55
  }
54
56
 
55
57
  /** Every decision of a venture, resolved: boundary, render state and what holds it. */
56
- export function decisions(dir, now = Date.parse(process.env.DECISIONS_NOW ?? "") || Date.now()) {
58
+ // Caching hook (F-12): without an explicit now, one action shares one decision list; now is the action's.
59
+ export function decisions(dir, now) {
60
+ return now === undefined ? memo("decisions", () => decisionsAt(dir), { dir }) : decisionsAt(dir, now);
61
+ }
62
+ function decisionsAt(dir, now = Date.parse(process.env.DECISIONS_NOW ?? "") || Date.now()) {
57
63
  const venture = load(join(dir, "venture.json"));
58
64
  const phase = PHASES.indexOf(venture.phase);
59
65
  const productOnly = venture.kind === "product";
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ // A stand-in judge for the frames test (the Jev protocol): reads one request on stdin and answers every
3
+ // noul question from the facts it was given, without a model. A premise is unknown (0.5) when a fact it
4
+ // could rest on says "not on record", else no (0.1); the trade reads as a sequence.
5
+ let input = "";
6
+ for await (const c of process.stdin) input += c;
7
+ const req = JSON.parse(input);
8
+ const unknown = Object.values(req.state.venture ?? {}).some((v) => v === "not on record");
9
+ const answers = Object.fromEntries(Object.keys(req.questions).map((k) => [k, { noul: k.startsWith("dichotomy:") ? (k === "dichotomy:sequence" ? 0.9 : 0.1) : k === "premise:needs-outside-money" && unknown ? 0.5 : 0.1 }]));
10
+ console.log(JSON.stringify({ model: "stand-in", answers }));
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ // A stand-in for Jev in tests (MENTURA_TYPE_CMD="node schema/examples/venture-type/jev.mjs"): reads the
3
+ // typed request on stdin and answers each type:<id> question yes when the description uses one of that
4
+ // type's examples, so the classifier's ranking and its uncertain path can be tested offline.
5
+ import { readFileSync } from "node:fs";
6
+ let input = "";
7
+ for await (const c of process.stdin) input += c;
8
+ const req = JSON.parse(input);
9
+ const words = req.state.venture.description.toLowerCase();
10
+ const types = JSON.parse(readFileSync(new URL("../../venture-types.json", import.meta.url), "utf8")).types;
11
+ const answers = Object.fromEntries(types.map((t) => [`type:${t.id}`, { noul: t.examples.some((e) => words.includes(e.toLowerCase())) ? 0.92 : 0.04 }]));
12
+ console.log(JSON.stringify({ model: "stand-in", answers }));
@@ -0,0 +1,17 @@
1
+ # AGENTS.md: acme-labs
2
+
3
+ The map of this venture for agents. Read it, then a route's layout, before writing anything here.
4
+
5
+ ## How to work here
6
+
7
+ - List the routes with `mentura routes`. Read a route's `layout` and `template` before you write to it.
8
+ - Write through the router (the CLI or the MCP server), not by editing files. Every write is checked against its schema and recorded in provenance.jsonl.
9
+ - A write that fails closed comes back as a draft in `_drafts/`. A person accepts it with `mentura accept`.
10
+ - Never read or send anything under `_private/` to a model.
11
+ - A deeper AGENTS.md (for example `marketing/AGENTS.md`) adds to this one for the routes under it; the nearer one wins.
12
+
13
+ ## Instructions
14
+
15
+ phase: discovery
16
+ voice: plain words, in the founder's own terms
17
+ private: _private/
@@ -0,0 +1,23 @@
1
+ {
2
+ "id": "discovery-goal",
3
+ "question": "What must be true for the venture to leave discovery? Name the goal this phase works toward.",
4
+ "decides": {
5
+ "record": "telos",
6
+ "path": "foundation/telos.json"
7
+ },
8
+ "layer": "purpose",
9
+ "needed_in": "discovery",
10
+ "boundary": "fail-open",
11
+ "status": "decided",
12
+ "provenance": {
13
+ "drafted_by": {
14
+ "kind": "agent"
15
+ },
16
+ "approved_by": "Maya Chen",
17
+ "approved_at": "2026-10-29T06:29:13Z",
18
+ "phase": "discovery",
19
+ "wording": "own",
20
+ "via": "api"
21
+ },
22
+ "answer": "Ten cafe owners confirm the reordering problem in interviews, and three agree to pilot the app, by the end of December."
23
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "id": "statement-icp",
3
+ "question": "Write the icp statement",
4
+ "statement": "icp",
5
+ "decides": {
6
+ "record": "icp"
7
+ },
8
+ "layer": "purpose",
9
+ "needed_in": "discovery",
10
+ "status": "decided",
11
+ "provenance": {
12
+ "drafted_by": {
13
+ "kind": "agent"
14
+ },
15
+ "approved_by": "Maya Chen",
16
+ "approved_at": "2026-10-29T06:29:12Z",
17
+ "phase": "discovery",
18
+ "wording": "own",
19
+ "via": "api"
20
+ },
21
+ "answer": "Owner-operators of one to three independent cafes in one city, who order from three or more suppliers."
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "id": "statement-problem",
3
+ "question": "Write the problem statement",
4
+ "statement": "problem",
5
+ "decides": {
6
+ "record": "validation-problem"
7
+ },
8
+ "layer": "purpose",
9
+ "needed_in": "discovery",
10
+ "status": "decided",
11
+ "provenance": {
12
+ "drafted_by": {
13
+ "kind": "agent"
14
+ },
15
+ "approved_by": "Maya Chen",
16
+ "approved_at": "2026-10-29T06:29:12Z",
17
+ "phase": "discovery",
18
+ "wording": "own",
19
+ "via": "api"
20
+ },
21
+ "answer": "Independent cafe owners lose three to five hours a week reordering supplies by hand, and still run out of best-sellers."
22
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "id": "founding-team",
3
+ "question": "Who is founding this venture: you alone, you with cofounders, or you looking for cofounders?",
4
+ "decides": {
5
+ "record": "founder-agreement",
6
+ "path": "governance/founder-agreement.json"
7
+ },
8
+ "layer": "governance",
9
+ "boundary": "fail-open",
10
+ "needed_in": "discovery",
11
+ "status": "decided",
12
+ "options": [
13
+ "Solo: I am founding it alone",
14
+ "Cofounders: we are founding it together",
15
+ "Looking: I want cofounders"
16
+ ],
17
+ "unlocks": [
18
+ {
19
+ "activity": "Draft the founder agreement with the founding-agreement kit",
20
+ "routes": [
21
+ "governance/founder-agreement"
22
+ ]
23
+ }
24
+ ],
25
+ "provenance": {
26
+ "drafted_by": {
27
+ "kind": "framework",
28
+ "id": "naive"
29
+ },
30
+ "approved_by": "Maya Chen",
31
+ "approved_at": "2026-10-29T06:29:12Z",
32
+ "phase": "discovery",
33
+ "wording": "own",
34
+ "via": "api"
35
+ },
36
+ "answer": "Solo: I am founding it alone"
37
+ }
@@ -0,0 +1,3 @@
1
+ # knowledge
2
+
3
+ Memory: every record the venture keeps, including notes, specs, decisions and references.
@@ -0,0 +1,46 @@
1
+ {
2
+ "sources": [],
3
+ "records": {},
4
+ "truth": "local",
5
+ "functions": {
6
+ "products": {
7
+ "systems": [
8
+ {
9
+ "system": "local-repo",
10
+ "address": "../acme-app",
11
+ "status": "pointed"
12
+ },
13
+ {
14
+ "system": "github",
15
+ "address": "acme-labs/app",
16
+ "status": "pointed"
17
+ },
18
+ {
19
+ "system": "vercel",
20
+ "address": "acme-labs/web",
21
+ "status": "pointed"
22
+ }
23
+ ]
24
+ },
25
+ "marketing-and-sales": {
26
+ "systems": [
27
+ {
28
+ "system": "vercel",
29
+ "address": "acme-labs/web",
30
+ "status": "pointed"
31
+ }
32
+ ]
33
+ },
34
+ "finance": {
35
+ "systems": [
36
+ {
37
+ "system": "rho",
38
+ "status": "connected",
39
+ "synced": "2026-10-29T06:28:55Z",
40
+ "fixture": true,
41
+ "address": "saved sandbox answer"
42
+ }
43
+ ]
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000001",
3
+ "name": "Reserve Checking",
4
+ "type": "checking",
5
+ "last_4": "0106",
6
+ "balance": {
7
+ "amount": 1046,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000001",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000002",
3
+ "name": "Cash (Checking)",
4
+ "type": "checking",
5
+ "last_4": "9508",
6
+ "balance": {
7
+ "amount": 876138,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000002",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000003",
3
+ "name": "Cash (Checking)",
4
+ "type": "checking",
5
+ "last_4": "4609",
6
+ "balance": {
7
+ "amount": 8711697,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000003",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000004",
3
+ "name": "Treasury Checking",
4
+ "type": "checking",
5
+ "last_4": "7301",
6
+ "balance": {
7
+ "amount": 15460929,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000004",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000005",
3
+ "name": "Inventory Checking",
4
+ "type": "checking",
5
+ "last_4": "3608",
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000005",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000006",
3
+ "name": "Primary Checking",
4
+ "type": "checking",
5
+ "last_4": "5702",
6
+ "balance": {
7
+ "amount": 811970,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000006",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000007",
3
+ "name": "Credit Account",
4
+ "type": "credit",
5
+ "last_4": null,
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000007",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000008",
3
+ "name": "Credit Account",
4
+ "type": "credit",
5
+ "last_4": null,
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000008",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000009",
3
+ "name": "Credit Account",
4
+ "type": "credit",
5
+ "last_4": null,
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000009",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000010",
3
+ "name": "Credit Account",
4
+ "type": "credit",
5
+ "last_4": null,
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000010",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000011",
3
+ "name": "Rewards",
4
+ "type": "rewards",
5
+ "last_4": null,
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000011",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000012",
3
+ "name": "Rewards",
4
+ "type": "rewards",
5
+ "last_4": null,
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000012",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000013",
3
+ "name": "Savings",
4
+ "type": "savings",
5
+ "last_4": "3214",
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000013",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "30000000-0000-4000-8000-000000000014",
3
+ "name": "Savings",
4
+ "type": "savings",
5
+ "last_4": "2513",
6
+ "balance": {
7
+ "amount": 0,
8
+ "currency": "USD"
9
+ },
10
+ "source": "rho-sandbox:account:30000000-0000-4000-8000-000000000014",
11
+ "synced_at": "2026-10-29T06:34:34.210Z"
12
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "id": "transactions",
3
+ "sensitive": true,
4
+ "summary": "Every transaction rho-sandbox posted, one file each, as Rho returned it; Rho is the system of record. The versioned view is money/_summary.json."
5
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "source": "rho-sandbox",
3
+ "business": "Acme Corporation",
4
+ "synced_at": "2026-10-29T06:34:34.210Z",
5
+ "as_of": "2026-06-27T19:13:15Z",
6
+ "window": {
7
+ "from": "2026-03-29T19:13:15.000Z",
8
+ "to": "2026-06-27T19:13:15Z"
9
+ },
10
+ "cash": {
11
+ "amount": 25861780,
12
+ "currency": "USD"
13
+ },
14
+ "monthly_inflow": {
15
+ "amount": 3423939,
16
+ "currency": "USD"
17
+ },
18
+ "monthly_outflow": {
19
+ "amount": 716423,
20
+ "currency": "USD"
21
+ },
22
+ "monthly_net": {
23
+ "amount": 2707516,
24
+ "currency": "USD"
25
+ },
26
+ "runway_months": null,
27
+ "accounts": 14,
28
+ "transactions": 72,
29
+ "note": "Net cash flow is not negative in the window, so runway is not limited by burn."
30
+ }
@@ -0,0 +1,5 @@
1
+ # Customer service: operations
2
+
3
+ Holds: Support channels, help content, customer feedback.
4
+
5
+ APQC 6.0 Manage Customer Service; value chain: primary (service).
@@ -0,0 +1,5 @@
1
+ {
2
+ "department": "customer-service",
3
+ "value_chain": "primary",
4
+ "apqc": "6.0"
5
+ }
@@ -0,0 +1,5 @@
1
+ # Finance and accounting: operations
2
+
3
+ Holds: Books, invoices, budgets and tax.
4
+
5
+ APQC 9.0 Manage Financial Resources; value chain: support (firm infrastructure).
@@ -0,0 +1,5 @@
1
+ {
2
+ "department": "finance",
3
+ "value_chain": "support",
4
+ "apqc": "9.0"
5
+ }
@@ -0,0 +1,5 @@
1
+ # Human capital (HR): operations
2
+
3
+ Holds: Recruiting, onboarding, payroll runs.
4
+
5
+ APQC 7.0 Develop and Manage Human Capital; value chain: support (human resource management).
@@ -0,0 +1,5 @@
1
+ {
2
+ "department": "human-capital",
3
+ "value_chain": "support",
4
+ "apqc": "7.0"
5
+ }
@@ -0,0 +1,5 @@
1
+ # Information technology: operations
2
+
3
+ Holds: Accounts, integrations, devices and access.
4
+
5
+ APQC 8.0 Manage Information Technology (IT); value chain: support (technology development).
@@ -0,0 +1,5 @@
1
+ {
2
+ "department": "it",
3
+ "value_chain": "support",
4
+ "apqc": "8.0"
5
+ }
@@ -0,0 +1,5 @@
1
+ # Marketing and sales: operations
2
+
3
+ Holds: The marketing website (EE-044), campaigns, marketing assets, the sales pipeline.
4
+
5
+ APQC 3.0 Market and Sell Products and Services; value chain: primary (marketing and sales).
@@ -0,0 +1,5 @@
1
+ {
2
+ "department": "marketing-and-sales",
3
+ "value_chain": "primary",
4
+ "apqc": "3.0"
5
+ }
@@ -0,0 +1,5 @@
1
+ # Products and services: operations
2
+
3
+ Holds: Specs, roadmaps and the work of building (MAD, for software).
4
+
5
+ APQC 2.0 Develop and Manage Products and Services; value chain: primary (technology development).
@@ -0,0 +1,5 @@
1
+ {
2
+ "department": "products",
3
+ "value_chain": "primary",
4
+ "apqc": "2.0"
5
+ }
@@ -0,0 +1,5 @@
1
+ # Strategy: operations
2
+
3
+ Holds: Planning cadence, market research.
4
+
5
+ APQC 1.0 Develop Vision and Strategy; value chain: support (firm infrastructure).
@@ -0,0 +1,5 @@
1
+ {
2
+ "department": "strategy",
3
+ "value_chain": "support",
4
+ "apqc": "1.0"
5
+ }