naive-framework 0.0.0-stage → 0.1.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 (338) hide show
  1. package/AGENTS.md +61 -0
  2. package/LICENSE +21 -0
  3. package/README.md +37 -2
  4. package/docs/decisions/decisions.json +861 -0
  5. package/docs/ontology.json +796 -0
  6. package/docs/ontology.md +163 -0
  7. package/docs/reference/ROUTES.md +125 -0
  8. package/evidence/benchmarks/2026-10-27-golden.jev.after-catalog-fix.json +558 -0
  9. package/evidence/benchmarks/2026-10-27-golden.jev.json +501 -0
  10. package/evidence/benchmarks/2026-10-27-golden.reasoning-answers.json +177 -0
  11. package/evidence/benchmarks/JEV_VS_REASONING_MODEL_2026-10-27.md +68 -0
  12. package/evidence/capabilities/agent-capabilities.json +86 -0
  13. package/evidence/design-documents.registry.json +2896 -0
  14. package/evidence/evals/evals.json +25 -0
  15. package/evidence/evals/harness-evals.json +140 -0
  16. package/evidence/layer.json +51 -0
  17. package/evidence/skills/agent-capabilities/SKILL.md +35 -0
  18. package/evidence/skills/design-coverage/SKILL.md +57 -0
  19. package/evidence/skills/design-coverage/check.mjs +192 -0
  20. package/evidence/skills/design-coverage/scan.mjs +45 -0
  21. package/evidence/skills/fidelity-ladder-audit/SKILL.md +121 -0
  22. package/evidence/skills/fidelity-ladder-audit/ladder-census.mjs +180 -0
  23. package/evidence/skills/findability/SKILL.md +32 -0
  24. package/evidence/skills/findability/inventory.rb +41 -0
  25. package/evidence/skills/foreshadowing-audit/SKILL.md +183 -0
  26. package/evidence/skills/metrics-review/SKILL.md +177 -0
  27. package/evidence/tooling/integrations.json +153 -0
  28. package/governance/layer.json +101 -0
  29. package/governance/references/references.json +26 -0
  30. package/governance/skills/board-design/SKILL.md +68 -0
  31. package/governance/skills/brand-pillar/SKILL.md +90 -0
  32. package/governance/skills/business-pillar/SKILL.md +96 -0
  33. package/governance/skills/chief-of-staff/SKILL.md +45 -0
  34. package/governance/skills/cofounder-structure/SKILL.md +64 -0
  35. package/governance/skills/cross-pillar-tradeoff/SKILL.md +168 -0
  36. package/governance/skills/equity-and-share-classes/SKILL.md +68 -0
  37. package/governance/skills/executive-roles/SKILL.md +95 -0
  38. package/governance/skills/exit-planning/SKILL.md +66 -0
  39. package/governance/skills/financing-and-investor-rights/SKILL.md +73 -0
  40. package/governance/skills/office-hours-mode/SKILL.md +113 -0
  41. package/governance/skills/product-pillar/SKILL.md +81 -0
  42. package/governance/skills/publication-policy/SKILL.md +63 -0
  43. package/governance/skills/role-and-candidate-authoring/SKILL.md +198 -0
  44. package/governance/skills/stakeholder-update/SKILL.md +177 -0
  45. package/governance/tooling/integrations.json +37 -0
  46. package/governance/venture-template/AGENT_ROLES_AND_DECISION_RIGHTS.md +58 -0
  47. package/governance/venture-template/COMPANY_VAULT_DEFINITION_2026-10-25.md +204 -0
  48. package/governance/venture-template/README.md +74 -0
  49. package/governance/venture-template/decision-rights.json +186 -0
  50. package/governance/venture-template/index.md +151 -0
  51. package/governance/venture-template/pillars/brand.md +209 -0
  52. package/governance/venture-template/pillars/business.md +255 -0
  53. package/governance/venture-template/pillars/product.md +254 -0
  54. package/governance/venture-template/render-roles.py +11 -0
  55. package/governance/venture-template/roles/README.md +85 -0
  56. package/governance/venture-template/roles/agent-roles.json +202 -0
  57. package/governance/venture-template/roles/ceo.md +163 -0
  58. package/governance/venture-template/roles/chief-of-staff.md +153 -0
  59. package/governance/venture-template/roles/cmo.md +165 -0
  60. package/governance/venture-template/roles/coo.md +189 -0
  61. package/governance/venture-template/roles/cto.md +158 -0
  62. package/governance/venture-template/roles/department-head.md +47 -0
  63. package/governance/venture-template/roles/forward-deployed-engineer.md +51 -0
  64. package/governance/venture-template/roles/founder.md +173 -0
  65. package/governance/venture-template/roles/hr-manager.md +49 -0
  66. package/governance/venture-template/roles/talent-acquisition-manager.md +50 -0
  67. package/interface/api/server.mjs +69 -0
  68. package/interface/cli/find-venture.mjs +15 -0
  69. package/interface/cli/mentura.mjs +271 -0
  70. package/interface/cli/naive.mjs +169 -0
  71. package/interface/demo/board.mjs +581 -0
  72. package/interface/demo/decision-harness.mjs +91 -0
  73. package/interface/demo/live-agent.mjs +47 -0
  74. package/interface/harness/evals.mjs +90 -0
  75. package/interface/harness/examples/pt-no-shows.dump.md +19 -0
  76. package/interface/harness/run.mjs +313 -0
  77. package/interface/harness/site.mjs +59 -0
  78. package/interface/layer.json +31 -0
  79. package/interface/mcp/server.mjs +122 -0
  80. package/interface/operator-console/README.md +58 -0
  81. package/interface/provenance.mjs +42 -0
  82. package/interface/references/references.json +28 -0
  83. package/interface/route-aliases.json +32 -0
  84. package/interface/router.mjs +580 -0
  85. package/interface/skills/install-mentura/SKILL.md +88 -0
  86. package/interface/tooling/integrations.json +112 -0
  87. package/knowledge/connectors/README.md +54 -0
  88. package/knowledge/connectors/catalog.mjs +118 -0
  89. package/knowledge/connectors/contract.mjs +56 -0
  90. package/knowledge/connectors/eval.mjs +176 -0
  91. package/knowledge/connectors/filesystem.mjs +79 -0
  92. package/knowledge/connectors/index.mjs +102 -0
  93. package/knowledge/connectors/resolve.mjs +44 -0
  94. package/knowledge/connectors/suite.mjs +80 -0
  95. package/knowledge/layer.json +42 -0
  96. package/knowledge/skills/find-reference/SKILL.md +38 -0
  97. package/knowledge/skills/industry-awareness/SKILL.md +277 -0
  98. package/knowledge/tooling/integrations.json +127 -0
  99. package/knowledge/tooling/questions.md +46 -0
  100. package/operations/FOUNDER_OPERATING_MODEL_CAMPAIGN_2026-10-14.md +16 -0
  101. package/operations/departments.json +162 -0
  102. package/operations/handoff-v2.md +93 -0
  103. package/operations/layer.json +60 -0
  104. package/operations/marketing/check-public.mjs +68 -0
  105. package/operations/marketing/site/README.md +86 -0
  106. package/operations/marketing/site/matrix.json +731 -0
  107. package/operations/marketing/site/plan.mjs +117 -0
  108. package/operations/marketing/site/presence.mjs +252 -0
  109. package/operations/references/references.json +45 -0
  110. package/operations/skills/recruiting/SKILL.md +32 -0
  111. package/operations/skills/team-design/SKILL.md +36 -0
  112. package/operations/skills/tool-selection/SKILL.md +46 -0
  113. package/operations/templates/recruiting-brief.md +35 -0
  114. package/operations/tooling/integrations.json +158 -0
  115. package/package.json +57 -4
  116. package/packages/catalog.json +272 -0
  117. package/packages/cofounder/package.json +42 -0
  118. package/packages/counsel/package.json +47 -0
  119. package/packages/customers/package.json +21 -0
  120. package/packages/decisions/package.json +17 -0
  121. package/packages/engineering/package.json +41 -0
  122. package/packages/evidence/package.json +17 -0
  123. package/packages/finance/package.json +48 -0
  124. package/packages/foundation/package.json +52 -0
  125. package/packages/investor/package.json +57 -0
  126. package/packages/investors/package.json +21 -0
  127. package/packages/legal/package.json +73 -0
  128. package/packages/marketing/package.json +57 -0
  129. package/packages/money/package.json +21 -0
  130. package/packages/operations/package.json +74 -0
  131. package/packages/partner/package.json +38 -0
  132. package/packages/people/package.json +64 -0
  133. package/packages/product/package.json +49 -0
  134. package/packages/raw/package.json +19 -0
  135. package/packages/relationships/package.json +52 -0
  136. package/packages/validation/package.json +99 -0
  137. package/platform/README.md +45 -0
  138. package/platform/connectors/eval.mjs +154 -0
  139. package/platform/connectors/fake-github.mjs +91 -0
  140. package/platform/connectors/github.mjs +105 -0
  141. package/platform/integrations/jev.mjs +30 -0
  142. package/platform/integrations/langsmith-docket.mjs +53 -0
  143. package/platform/integrations/langsmith-setup.mjs +115 -0
  144. package/platform/integrations/langsmith.mjs +47 -0
  145. package/platform/integrations/rho.mjs +145 -0
  146. package/platform/integrations/site.mjs +75 -0
  147. package/platform/kits/README.md +7 -0
  148. package/platform/mcp/research.mjs +64 -0
  149. package/purpose/checklists/vault-and-tooling-consultancy-setup.md +216 -0
  150. package/purpose/frameworks/business-discovery-framework-amendments-2026-05-20.md +181 -0
  151. package/purpose/frameworks/business-discovery-framework.html +938 -0
  152. package/purpose/frameworks/business-discovery-framework.md +326 -0
  153. package/purpose/frameworks/idea-map/README.md +74 -0
  154. package/purpose/frameworks/idea-map/conventions.json +146 -0
  155. package/purpose/frameworks/idea-map/graph.mjs +182 -0
  156. package/purpose/frameworks/idea-map/ideamap.mjs +179 -0
  157. package/purpose/frameworks/idea-map/route.mjs +140 -0
  158. package/purpose/frameworks/onboarding-handoff-framework.md +269 -0
  159. package/purpose/frameworks/post-discovery-deliverable-playbook.md +274 -0
  160. package/purpose/frameworks/product-anatomy/README.md +63 -0
  161. package/purpose/frameworks/product-anatomy/anatomy.mjs +195 -0
  162. package/purpose/frameworks/product-anatomy/examples/polity.answers.reasoned.json +11 -0
  163. package/purpose/frameworks/product-anatomy/examples/polity.json +89 -0
  164. package/purpose/frameworks/product-anatomy/phases.json +107 -0
  165. package/purpose/frameworks/product-anatomy/questions.json +74 -0
  166. package/purpose/kits/validation/README.md +14 -0
  167. package/purpose/kits/validation/references/references.json +122 -0
  168. package/purpose/kits/validation/skills/problem-validation/SKILL.md +43 -0
  169. package/purpose/kits/validation/skills/validation-score/SKILL.md +35 -0
  170. package/purpose/kits/validation/templates/go-to-market.md +19 -0
  171. package/purpose/kits/validation/templates/operations-readiness.md +20 -0
  172. package/purpose/kits/validation/templates/pricing.md +22 -0
  173. package/purpose/kits/validation/templates/problem-interview.md +36 -0
  174. package/purpose/kits/validation/templates/problem.md +45 -0
  175. package/purpose/kits/validation/templates/product-market-fit.md +23 -0
  176. package/purpose/kits/validation/templates/solution.md +18 -0
  177. package/purpose/kits/validation/templates/team.md +19 -0
  178. package/purpose/kits/validation/weights.json +22 -0
  179. package/purpose/layer.json +53 -0
  180. package/purpose/references/references.json +324 -0
  181. package/purpose/skills/ambition-tier/SKILL.md +205 -0
  182. package/purpose/skills/telos/SKILL.md +52 -0
  183. package/purpose/strategic-foundation.json +133 -0
  184. package/purpose/templates/telos-based-smart.md +39 -0
  185. package/purpose/tooling/integrations.json +48 -0
  186. package/schema/README.md +61 -0
  187. package/schema/VERSION +1 -0
  188. package/schema/account.schema.json +79 -0
  189. package/schema/add-department.mjs +41 -0
  190. package/schema/agent-capability.schema.json +94 -0
  191. package/schema/alignment.schema.json +61 -0
  192. package/schema/assess-problem.mjs +131 -0
  193. package/schema/bdd.mjs +56 -0
  194. package/schema/board.schema.json +101 -0
  195. package/schema/check-boundary.mjs +54 -0
  196. package/schema/check-data-model.mjs +170 -0
  197. package/schema/check-data-packages.mjs +83 -0
  198. package/schema/check-departments.mjs +45 -0
  199. package/schema/check-execution.mjs +85 -0
  200. package/schema/check-governance.mjs +98 -0
  201. package/schema/check-integrations.mjs +33 -0
  202. package/schema/check-nextjs-status.mjs +77 -0
  203. package/schema/check-nouns.mjs +49 -0
  204. package/schema/check-private.mjs +61 -0
  205. package/schema/check-provenance.mjs +55 -0
  206. package/schema/check-publication.mjs +96 -0
  207. package/schema/check-ready.mjs +89 -0
  208. package/schema/check-sources.mjs +66 -0
  209. package/schema/check-team.mjs +94 -0
  210. package/schema/check-telos.mjs +59 -0
  211. package/schema/check-validation.mjs +165 -0
  212. package/schema/check-ventures.mjs +81 -0
  213. package/schema/check-where-used.mjs +58 -0
  214. package/schema/data-master.schema.json +14 -0
  215. package/schema/data-model.json +1258 -0
  216. package/schema/data-model.schema.json +152 -0
  217. package/schema/decision-analytics.mjs +77 -0
  218. package/schema/decision-record.schema.json +290 -0
  219. package/schema/decision-rights.schema.json +34 -0
  220. package/schema/decision.schema.json +30 -0
  221. package/schema/decisions.mjs +321 -0
  222. package/schema/department-catalog.schema.json +55 -0
  223. package/schema/department.schema.json +15 -0
  224. package/schema/departments.mjs +32 -0
  225. package/schema/docket-eval.mjs +89 -0
  226. package/schema/docket.mjs +135 -0
  227. package/schema/eval-suite.schema.json +45 -0
  228. package/schema/evidence.schema.json +110 -0
  229. package/schema/examples/migrate/agent.mjs +12 -0
  230. package/schema/examples/workspace/ventures/studio/accounts/bakery/account.json +18 -0
  231. package/schema/examples/workspace/ventures/studio/evidence/.gitkeep +0 -0
  232. package/schema/examples/workspace/ventures/studio/governance/.gitkeep +0 -0
  233. package/schema/examples/workspace/ventures/studio/knowledge/.gitkeep +0 -0
  234. package/schema/examples/workspace/ventures/studio/operations/.gitkeep +0 -0
  235. package/schema/examples/workspace/ventures/studio/print/knowledge/.gitkeep +0 -0
  236. package/schema/examples/workspace/ventures/studio/print/purpose/.gitkeep +0 -0
  237. package/schema/examples/workspace/ventures/studio/print/venture.json +37 -0
  238. package/schema/examples/workspace/ventures/studio/products/brand-care.json +19 -0
  239. package/schema/examples/workspace/ventures/studio/products/brand-kit.json +23 -0
  240. package/schema/examples/workspace/ventures/studio/provenance.jsonl +3 -0
  241. package/schema/examples/workspace/ventures/studio/purpose/.gitkeep +0 -0
  242. package/schema/examples/workspace/ventures/studio/venture.json +43 -0
  243. package/schema/examples/workspace/ventures/tandem/accounts/.gitkeep +0 -0
  244. package/schema/examples/workspace/ventures/tandem/evidence/README.md +3 -0
  245. package/schema/examples/workspace/ventures/tandem/governance/README.md +3 -0
  246. package/schema/examples/workspace/ventures/tandem/governance/agreements/dee-fast.md +3 -0
  247. package/schema/examples/workspace/ventures/tandem/governance/board.json +51 -0
  248. package/schema/examples/workspace/ventures/tandem/governance/departments/finance/charter.md +5 -0
  249. package/schema/examples/workspace/ventures/tandem/governance/departments/finance/department.json +5 -0
  250. package/schema/examples/workspace/ventures/tandem/governance/departments/primary/marketing-and-sales/charter.md +5 -0
  251. package/schema/examples/workspace/ventures/tandem/governance/departments/primary/marketing-and-sales/department.json +5 -0
  252. package/schema/examples/workspace/ventures/tandem/governance/exit.json +33 -0
  253. package/schema/examples/workspace/ventures/tandem/governance/founder-agreement.json +24 -0
  254. package/schema/examples/workspace/ventures/tandem/governance/founder-agreement.md +3 -0
  255. package/schema/examples/workspace/ventures/tandem/governance/ownership.json +131 -0
  256. package/schema/examples/workspace/ventures/tandem/governance/publication-policy.json +171 -0
  257. package/schema/examples/workspace/ventures/tandem/knowledge/README.md +3 -0
  258. package/schema/examples/workspace/ventures/tandem/knowledge/research/friends-feedback-2026-08.md +3 -0
  259. package/schema/examples/workspace/ventures/tandem/knowledge/research/pilot-2026-10.md +3 -0
  260. package/schema/examples/workspace/ventures/tandem/knowledge/research/problem-interviews-2026-09.md +20 -0
  261. package/schema/examples/workspace/ventures/tandem/knowledge/sources.json +8 -0
  262. package/schema/examples/workspace/ventures/tandem/knowledge/where-used.json +13 -0
  263. package/schema/examples/workspace/ventures/tandem/operations/README.md +3 -0
  264. package/schema/examples/workspace/ventures/tandem/operations/departments/finance/README.md +5 -0
  265. package/schema/examples/workspace/ventures/tandem/operations/departments/finance/department.json +5 -0
  266. package/schema/examples/workspace/ventures/tandem/operations/departments/primary/marketing-and-sales/README.md +5 -0
  267. package/schema/examples/workspace/ventures/tandem/operations/departments/primary/marketing-and-sales/department.json +5 -0
  268. package/schema/examples/workspace/ventures/tandem/pillars/brand.md +5 -0
  269. package/schema/examples/workspace/ventures/tandem/pillars/business.md +5 -0
  270. package/schema/examples/workspace/ventures/tandem/pillars/product.md +5 -0
  271. package/schema/examples/workspace/ventures/tandem/products/.gitkeep +0 -0
  272. package/schema/examples/workspace/ventures/tandem/products/shop-app.json +22 -0
  273. package/schema/examples/workspace/ventures/tandem/profile.md +5 -0
  274. package/schema/examples/workspace/ventures/tandem/provenance.jsonl +13 -0
  275. package/schema/examples/workspace/ventures/tandem/purpose/README.md +3 -0
  276. package/schema/examples/workspace/ventures/tandem/purpose/telos.json +78 -0
  277. package/schema/examples/workspace/ventures/tandem/purpose/validation/go-to-market.json +35 -0
  278. package/schema/examples/workspace/ventures/tandem/purpose/validation/pricing.json +37 -0
  279. package/schema/examples/workspace/ventures/tandem/purpose/validation/problem.json +74 -0
  280. package/schema/examples/workspace/ventures/tandem/purpose/validation/product-market-fit.json +66 -0
  281. package/schema/examples/workspace/ventures/tandem/purpose/validation/solution.json +33 -0
  282. package/schema/examples/workspace/ventures/tandem/purpose/validation/team.json +52 -0
  283. package/schema/examples/workspace/ventures/tandem/venture.json +79 -0
  284. package/schema/examples/workspace/ventures/woodworking/knowledge/.gitkeep +0 -0
  285. package/schema/examples/workspace/ventures/woodworking/venture.json +21 -0
  286. package/schema/examples/workspace/workspace.json +8 -0
  287. package/schema/exit.schema.json +74 -0
  288. package/schema/foundation.mjs +118 -0
  289. package/schema/founder-agreement.schema.json +83 -0
  290. package/schema/gate.mjs +39 -0
  291. package/schema/handoff.schema.json +239 -0
  292. package/schema/icp.schema.json +136 -0
  293. package/schema/idea-graph.schema.json +61 -0
  294. package/schema/init-venture.mjs +98 -0
  295. package/schema/integration.schema.json +143 -0
  296. package/schema/knowledge-sources.schema.json +130 -0
  297. package/schema/layer.json +46 -0
  298. package/schema/layer.schema.json +119 -0
  299. package/schema/load-packages.mjs +26 -0
  300. package/schema/marketing-sitemap.schema.json +232 -0
  301. package/schema/migrate-venture.mjs +192 -0
  302. package/schema/need-now.json +601 -0
  303. package/schema/need-now.mjs +107 -0
  304. package/schema/nextjs-status.schema.json +29 -0
  305. package/schema/ownership.schema.json +282 -0
  306. package/schema/packages.json +4 -0
  307. package/schema/packages.mjs +247 -0
  308. package/schema/payouts.mjs +91 -0
  309. package/schema/port-venture.mjs +161 -0
  310. package/schema/product.schema.json +223 -0
  311. package/schema/provenance-entry.schema.json +154 -0
  312. package/schema/publication-policy.schema.json +293 -0
  313. package/schema/raw-source.schema.json +15 -0
  314. package/schema/reference.schema.json +115 -0
  315. package/schema/route-aliases.schema.json +25 -0
  316. package/schema/run-handoff.mjs +51 -0
  317. package/schema/scaffold/defaults.json +54 -0
  318. package/schema/site-presence.schema.json +337 -0
  319. package/schema/strategic-foundation.schema.json +74 -0
  320. package/schema/stream.schema.json +14 -0
  321. package/schema/team-plan.schema.json +157 -0
  322. package/schema/telos.schema.json +197 -0
  323. package/schema/time-to-ready.mjs +93 -0
  324. package/schema/upgrade-venture.mjs +129 -0
  325. package/schema/use-model.mjs +10 -0
  326. package/schema/validate.py +49 -0
  327. package/schema/validation-evidence.schema.json +123 -0
  328. package/schema/validation-go-to-market.schema.json +110 -0
  329. package/schema/validation-operations-readiness.schema.json +91 -0
  330. package/schema/validation-pricing.schema.json +114 -0
  331. package/schema/validation-problem.schema.json +118 -0
  332. package/schema/validation-product-market-fit.schema.json +135 -0
  333. package/schema/validation-solution.schema.json +79 -0
  334. package/schema/validation-team.schema.json +116 -0
  335. package/schema/venture.schema.json +407 -0
  336. package/schema/vocab/business-models.json +298 -0
  337. package/schema/where-used.schema.json +56 -0
  338. package/schema/workspace.schema.json +38 -0
@@ -0,0 +1,107 @@
1
+ // Says which records a venture needs now, which come soon, and which to hold back (EE-028), so a
2
+ // builder works only on what matters at this moment instead of overbuilding. Priors per record
3
+ // type and phase are in schema/need-now.json; facts about the venture raise or lower them:
4
+ // phase, ambition, funding, legal_form, offering (of any product), software (any product),
5
+ // path (go-to-market record), people, founders, agents, products (counts), publishes (a handoff
6
+ // under public-commitment), team (the answer to Naive's team question: solo, cofounders, looking).
7
+ // Departments (EE-047) are scored the same way, from their priors in operations/departments.json, and
8
+ // held once venture.json lists them. Records that already exist are listed as held; a record in a layer the venture has turned off is
9
+ // listed as layer off, not suggested. Jev re-scores the priors per venture once the
10
+ // scorer runs; until then the priors are the default.
11
+ //
12
+ // node schema/need-now.mjs <venture dir> [--json]
13
+
14
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
15
+ import { join } from "node:path";
16
+ import { catalog } from "./departments.mjs";
17
+
18
+ const root = new URL("..", import.meta.url).pathname;
19
+ const load = (p) => JSON.parse(readFileSync(p, "utf8"));
20
+ const PHASES = load(join(root, "purpose/frameworks/product-anatomy/phases.json")).phases.map((p) => p.id);
21
+
22
+ const files = (d, base = d) => existsSync(d) ? readdirSync(d, { withFileTypes: true }).flatMap((e) =>
23
+ e.isDirectory() ? files(join(d, e.name), base) : [join(d, e.name).slice(base.length + 1)]) : [];
24
+ const glob = (g) => new RegExp("^" + g.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*\//g, "\0").replace(/\*/g, "[^/]*").replace(/\0/g, "(?:[^/]+/)*") + "$");
25
+
26
+ /** Facts about a venture that the need-now conditions test. */
27
+ export function factsOf(dir) {
28
+ const v = load(join(dir, "venture.json"));
29
+ const json = (p) => existsSync(join(dir, p)) ? load(join(dir, p)) : null;
30
+ const products = existsSync(join(dir, "products")) ? readdirSync(join(dir, "products")).filter((f) => f.endsWith(".json")).map((f) => load(join(dir, "products", f))) : [];
31
+ const members = (v.members ?? []).map((m) => typeof m === "string" ? { kind: "person", role: m } : m);
32
+ const own = json("governance/ownership.json");
33
+ const hDir = join(dir, "operations/handoffs");
34
+ const handoffs = existsSync(hDir) ? readdirSync(hDir).filter((f) => f.endsWith(".json")).map((f) => load(join(hDir, f))) : [];
35
+ // The founding team, as the founder answered Naive's team question (EE-060): solo, cofounders or looking.
36
+ const teamFile = join(dir, "decisions/venture.team.decision.json");
37
+ const td = existsSync(teamFile) ? load(teamFile) : null;
38
+ const team = td?.status === "decided" ? ["solo", "cofounders", "looking"].find((t) => (td.answer ?? "").toLowerCase().startsWith(t)) ?? null : null;
39
+ return {
40
+ team, phase: v.phase, ambition: v.ambition, funding: v.form?.funding, legal_form: v.form?.legal_form,
41
+ offering: products.map((p) => p.offering), software: products.some((p) => p.software),
42
+ path: json("purpose/validation/go-to-market.json")?.path,
43
+ people: members.filter((m) => m.kind !== "agent").length + (v.owner === "self" && !members.some((m) => m.kind !== "agent") ? 1 : 0),
44
+ founders: own ? own.holders.filter((h) => h.kind === "founder").length : members.filter((m) => m.role === "founder").length,
45
+ agents: members.filter((m) => m.kind === "agent").length, products: products.length,
46
+ publishes: handoffs.some((h) => (h.decision_classes ?? []).includes("public-commitment") || (h.escalations ?? []).some((e) => e.class === "public-commitment")),
47
+ };
48
+ }
49
+
50
+ export function holds(cond, f) {
51
+ const m = cond.match(/^([a-z_]+)(>=|:)?(.*)$/);
52
+ const [, key, op, val] = m;
53
+ if (!op) return !!f[key];
54
+ if (op === ">=") return (f[key] ?? 0) >= Number(val);
55
+ return Array.isArray(f[key]) ? f[key].includes(val) : f[key] === val;
56
+ }
57
+
58
+ export function probability(spec, phase, f) {
59
+ let p = spec.base[phase] ?? 0;
60
+ for (const w of spec.when ?? []) {
61
+ if (w.phase && w.phase !== phase) continue;
62
+ if (!holds(w.if, f)) continue;
63
+ if (w.at_least !== undefined) p = Math.max(p, w.at_least);
64
+ if (w.at_most !== undefined) p = Math.min(p, w.at_most);
65
+ }
66
+ return p;
67
+ }
68
+
69
+ export function needNow(dir) {
70
+ const N = load(join(root, "schema/need-now.json"));
71
+ const model = load(join(root, "schema/data-model.json"));
72
+ const f = factsOf(dir);
73
+ const v = load(join(dir, "venture.json"));
74
+ const here = files(dir);
75
+ const phase = PHASES.includes(f.phase) ? f.phase : "discovery";
76
+ const next = PHASES[PHASES.indexOf(phase) + 1];
77
+ const rows = Object.entries(N.records).map(([type, spec]) => {
78
+ const rec = model.records.find((r) => r.id === type);
79
+ const rels = (rec?.paths ?? []).filter((p) => p.startsWith("instance/**/")).map((p) => p.slice("instance/**/".length));
80
+ const held = rels.some((g) => here.some((x) => glob(g).test(x)));
81
+ const now = probability(spec, phase, f), soon = next ? probability(spec, next, f) : now;
82
+ const off = rec?.layer && v.layers?.[rec.layer] === false;
83
+ const status = held ? "held" : off ? "layer off" : now >= N.suggest ? "suggest now" : soon >= N.suggest ? "coming soon" : "hold back";
84
+ return { type, layer: rec?.layer, now, next: soon, status, why: spec.why };
85
+ });
86
+ // Departments are imported one by one (EE-047, EE-048), each with its own priors in the catalog.
87
+ const departments = catalog().map((d) => {
88
+ const now = probability(d, phase, f), soon = next ? probability(d, next, f) : now;
89
+ const status = (v.departments ?? []).includes(d.id) ? "held" : now >= N.suggest ? "suggest now" : soon >= N.suggest ? "coming soon" : "hold back";
90
+ return { type: `department:${d.id}`, layer: "operations", now, next: soon, status, why: d.why };
91
+ });
92
+ return { phase, next: next ?? null, facts: f, rows, departments };
93
+ }
94
+
95
+ if (import.meta.url === `file://${process.argv[1]}`) {
96
+ const dir = process.argv[2];
97
+ if (!dir || !existsSync(join(dir, "venture.json"))) { console.error("usage: node schema/need-now.mjs <venture dir> [--json]"); process.exit(2); }
98
+ const r = needNow(dir);
99
+ if (process.argv.includes("--json")) { console.log(JSON.stringify(r, null, 2)); process.exit(0); }
100
+ console.log(`Phase ${r.phase}${r.next ? `, next ${r.next}` : ""}. Work on what is needed now; the rest waits until it is.`);
101
+ for (const status of ["suggest now", "coming soon", "held", "hold back", "layer off"]) {
102
+ const rows = [...r.rows, ...r.departments].filter((x) => x.status === status);
103
+ if (!rows.length) continue;
104
+ console.log(`\n${status} (${rows.length})`);
105
+ for (const x of rows.sort((a, b) => b.now - a.now)) console.log(` ${x.type.padEnd(32)} now ${x.now.toFixed(2)} next ${x.next.toFixed(2)} ${["hold back", "layer off"].includes(status) ? "" : x.why}`);
106
+ }
107
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "nextjs-status.schema.json",
4
+ "title": "Next.js translation status",
5
+ "description": "Whether each concept of the Next.js translation ledger is built, and the docs page that explains it. Checked by schema/check-nextjs-status.mjs.",
6
+ "type": "object",
7
+ "required": ["about", "checked", "rows"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "about": { "type": "string" },
11
+ "checked": { "type": "string", "format": "date" },
12
+ "rows": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "required": ["id", "chapter", "status"],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "id": { "type": "string", "pattern": "^[A-Z]-[0-9]+$" },
20
+ "chapter": { "type": "string" },
21
+ "status": { "enum": ["built", "partial", "not built", "n/a"] },
22
+ "evidence": { "type": "array", "items": { "type": "string" } },
23
+ "page": { "type": "string" },
24
+ "note": { "type": "string" }
25
+ }
26
+ }
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,282 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "ownership.schema.json",
4
+ "title": "Ownership (cap table)",
5
+ "description": "Who owns the venture and on what terms, at <venture>/governance/ownership.json (EE-022): share classes and the rights each carries, holders, grants with vesting, the option pool, and unpriced instruments such as SAFEs. It is a record of what was agreed, not the legal document: the signed documents are the truth, and decisions to change this file are founder decisions made with counsel (decision class ownership-or-control). schema/check-governance.mjs checks it; schema/payouts.mjs computes payouts from it.",
6
+ "type": "object",
7
+ "required": [
8
+ "updated",
9
+ "unit",
10
+ "classes",
11
+ "holders",
12
+ "grants"
13
+ ],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "updated": {
17
+ "type": "string",
18
+ "format": "date"
19
+ },
20
+ "unit": {
21
+ "enum": [
22
+ "shares",
23
+ "units",
24
+ "percent"
25
+ ],
26
+ "description": "shares for a corporation, units for an LLC, percent for a partnership or an informal split"
27
+ },
28
+ "currency": {
29
+ "type": "string",
30
+ "pattern": "^[A-Z]{3}$"
31
+ },
32
+ "classes": {
33
+ "type": "array",
34
+ "minItems": 1,
35
+ "items": {
36
+ "type": "object",
37
+ "required": [
38
+ "id",
39
+ "kind"
40
+ ],
41
+ "additionalProperties": false,
42
+ "properties": {
43
+ "id": {
44
+ "type": "string",
45
+ "pattern": "^[a-z0-9-]+$"
46
+ },
47
+ "name": {
48
+ "type": "string"
49
+ },
50
+ "kind": {
51
+ "enum": [
52
+ "common",
53
+ "preferred",
54
+ "units"
55
+ ],
56
+ "description": "common and units are paid last; preferred carries a liquidation preference"
57
+ },
58
+ "votes_per_share": {
59
+ "type": "number",
60
+ "minimum": 0,
61
+ "description": "1 by default; more than 1 for super-voting (dual-class) shares, 0 for non-voting"
62
+ },
63
+ "price_per_share": {
64
+ "type": "number",
65
+ "minimum": 0,
66
+ "description": "Original issue price; the basis of a liquidation preference"
67
+ },
68
+ "liquidation": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "multiple": {
73
+ "type": "number",
74
+ "minimum": 0,
75
+ "description": "1 is standard (1x)"
76
+ },
77
+ "participating": {
78
+ "type": "boolean",
79
+ "description": "true: takes its preference and then shares the rest; false (standard): takes the greater of its preference or what it would get as common"
80
+ },
81
+ "seniority": {
82
+ "type": "integer",
83
+ "minimum": 0,
84
+ "description": "Higher is paid first; equal ranks share pro rata (pari passu)"
85
+ }
86
+ }
87
+ },
88
+ "rights": {
89
+ "type": "array",
90
+ "items": {
91
+ "enum": [
92
+ "board-seat",
93
+ "board-observer",
94
+ "information",
95
+ "pro-rata",
96
+ "protective-provisions",
97
+ "anti-dilution-broad-based",
98
+ "anti-dilution-full-ratchet",
99
+ "drag-along",
100
+ "tag-along",
101
+ "right-of-first-refusal",
102
+ "co-sale",
103
+ "registration",
104
+ "redemption"
105
+ ]
106
+ },
107
+ "description": "Investor rights this class carries"
108
+ }
109
+ }
110
+ }
111
+ },
112
+ "holders": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "object",
116
+ "required": [
117
+ "id",
118
+ "name",
119
+ "kind"
120
+ ],
121
+ "additionalProperties": false,
122
+ "properties": {
123
+ "id": {
124
+ "type": "string",
125
+ "pattern": "^[a-z0-9-]+$"
126
+ },
127
+ "name": {
128
+ "type": "string"
129
+ },
130
+ "kind": {
131
+ "enum": [
132
+ "founder",
133
+ "employee",
134
+ "advisor",
135
+ "investor",
136
+ "pool",
137
+ "other"
138
+ ],
139
+ "description": "pool is the reserved option pool: its unissued amount is paid nothing"
140
+ },
141
+ "role": {
142
+ "type": "string",
143
+ "description": "The venture role they hold, if any"
144
+ },
145
+ "agreement": {
146
+ "type": "string",
147
+ "description": "Path to their signed agreement (advisor, employee, investment)"
148
+ }
149
+ }
150
+ }
151
+ },
152
+ "grants": {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "object",
156
+ "required": [
157
+ "holder",
158
+ "class",
159
+ "amount"
160
+ ],
161
+ "additionalProperties": false,
162
+ "properties": {
163
+ "holder": {
164
+ "type": "string"
165
+ },
166
+ "class": {
167
+ "type": "string"
168
+ },
169
+ "amount": {
170
+ "type": "number",
171
+ "exclusiveMinimum": 0
172
+ },
173
+ "granted": {
174
+ "type": "string",
175
+ "format": "date"
176
+ },
177
+ "vesting": {
178
+ "type": "object",
179
+ "required": [
180
+ "start",
181
+ "months"
182
+ ],
183
+ "additionalProperties": false,
184
+ "properties": {
185
+ "start": {
186
+ "type": "string",
187
+ "format": "date"
188
+ },
189
+ "months": {
190
+ "type": "integer",
191
+ "minimum": 0,
192
+ "description": "48 is common for founders and employees, 24 for advisors"
193
+ },
194
+ "cliff_months": {
195
+ "type": "integer",
196
+ "minimum": 0,
197
+ "description": "12 is common"
198
+ },
199
+ "acceleration": {
200
+ "enum": [
201
+ "none",
202
+ "single-trigger",
203
+ "double-trigger"
204
+ ]
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
210
+ },
211
+ "instruments": {
212
+ "type": "array",
213
+ "items": {
214
+ "type": "object",
215
+ "required": [
216
+ "id",
217
+ "holder",
218
+ "kind",
219
+ "amount"
220
+ ],
221
+ "additionalProperties": false,
222
+ "properties": {
223
+ "id": {
224
+ "type": "string",
225
+ "pattern": "^[a-z0-9-]+$"
226
+ },
227
+ "holder": {
228
+ "type": "string"
229
+ },
230
+ "kind": {
231
+ "enum": [
232
+ "safe-post-money",
233
+ "safe-pre-money",
234
+ "convertible-note"
235
+ ]
236
+ },
237
+ "amount": {
238
+ "type": "number",
239
+ "exclusiveMinimum": 0
240
+ },
241
+ "signed": {
242
+ "type": "string",
243
+ "format": "date"
244
+ },
245
+ "valuation_cap": {
246
+ "type": "number",
247
+ "exclusiveMinimum": 0
248
+ },
249
+ "discount": {
250
+ "type": "number",
251
+ "minimum": 0,
252
+ "maximum": 1
253
+ },
254
+ "converts_to": {
255
+ "type": "string",
256
+ "description": "The class it converts into at the next priced round"
257
+ },
258
+ "rights": {
259
+ "type": "array",
260
+ "items": {
261
+ "enum": [
262
+ "board-seat",
263
+ "board-observer",
264
+ "information",
265
+ "pro-rata",
266
+ "protective-provisions",
267
+ "anti-dilution-broad-based",
268
+ "anti-dilution-full-ratchet",
269
+ "drag-along",
270
+ "tag-along",
271
+ "right-of-first-refusal",
272
+ "co-sale",
273
+ "registration",
274
+ "redemption"
275
+ ]
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
281
+ }
282
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "alias_of": "packages/",
3
+ "note": "Split into packages/<name>/package.json and packages/catalog.json (EE-071). This file remains as the alias for one release. Loaders read the package files, not this stub."
4
+ }