naive-framework 0.0.0-stage → 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 (549) hide show
  1. package/AGENTS.md +62 -0
  2. package/LICENSE +21 -0
  3. package/README.md +37 -2
  4. package/docs/decisions/decisions.json +888 -0
  5. package/docs/ontology.json +796 -0
  6. package/docs/ontology.md +163 -0
  7. package/docs/reference/ROUTES.md +124 -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 +102 -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/governance/venture-template/roles/venture-roles.json +62 -0
  68. package/interface/acting.mjs +83 -0
  69. package/interface/adapters/claude-code.json +16 -0
  70. package/interface/adapters/codex.json +14 -0
  71. package/interface/adapters/cursor.json +16 -0
  72. package/interface/adapters.mjs +182 -0
  73. package/interface/api/server.mjs +71 -0
  74. package/interface/boundaries.mjs +218 -0
  75. package/interface/brand.mjs +214 -0
  76. package/interface/cli/find-venture.mjs +15 -0
  77. package/interface/cli/freshness.mjs +59 -0
  78. package/interface/cli/guard.mjs +6 -0
  79. package/interface/cli/mentura.mjs +341 -0
  80. package/interface/cli/naive.mjs +194 -0
  81. package/interface/context.mjs +524 -0
  82. package/interface/demo/board.mjs +581 -0
  83. package/interface/demo/decision-harness.mjs +91 -0
  84. package/interface/demo/live-agent.mjs +47 -0
  85. package/interface/dev/setup.mjs +84 -0
  86. package/interface/gate-hooks.mjs +36 -0
  87. package/interface/harness/evals.mjs +90 -0
  88. package/interface/harness/examples/pt-no-shows.dump.md +19 -0
  89. package/interface/harness/run.mjs +313 -0
  90. package/interface/harness/site.mjs +59 -0
  91. package/interface/instrumentation.mjs +86 -0
  92. package/interface/kit-boundary.mjs +73 -0
  93. package/interface/layer.json +37 -0
  94. package/interface/mcp/server.mjs +162 -0
  95. package/interface/operator-console/README.md +58 -0
  96. package/interface/package-routes.mjs +196 -0
  97. package/interface/provenance.mjs +65 -0
  98. package/interface/reads.mjs +173 -0
  99. package/interface/references/references.json +28 -0
  100. package/interface/release-card.mjs +42 -0
  101. package/interface/route-aliases.json +32 -0
  102. package/interface/router.mjs +653 -0
  103. package/interface/skills/install-mentura/SKILL.md +88 -0
  104. package/interface/skills/naive-setup/SKILL.md +71 -0
  105. package/interface/skills/naive-setup/artifact.html +83 -0
  106. package/interface/tooling/integrations.json +112 -0
  107. package/interface/vitals.mjs +115 -0
  108. package/interface/writes.mjs +190 -0
  109. package/knowledge/connectors/README.md +54 -0
  110. package/knowledge/connectors/catalog.mjs +118 -0
  111. package/knowledge/connectors/contract.mjs +56 -0
  112. package/knowledge/connectors/eval.mjs +176 -0
  113. package/knowledge/connectors/filesystem.mjs +79 -0
  114. package/knowledge/connectors/index.mjs +102 -0
  115. package/knowledge/connectors/resolve.mjs +44 -0
  116. package/knowledge/connectors/suite.mjs +80 -0
  117. package/knowledge/freshness.json +85 -0
  118. package/knowledge/layer.json +50 -0
  119. package/knowledge/skills/find-reference/SKILL.md +38 -0
  120. package/knowledge/skills/industry-awareness/SKILL.md +277 -0
  121. package/knowledge/templates/glossary.md +23 -0
  122. package/knowledge/tooling/integrations.json +127 -0
  123. package/knowledge/tooling/questions.md +46 -0
  124. package/operations/FOUNDER_OPERATING_MODEL_CAMPAIGN_2026-10-14.md +16 -0
  125. package/operations/departments.json +162 -0
  126. package/operations/handoff-v2.md +93 -0
  127. package/operations/layer.json +67 -0
  128. package/operations/marketing/check-public.mjs +68 -0
  129. package/operations/marketing/site/README.md +86 -0
  130. package/operations/marketing/site/matrix.json +731 -0
  131. package/operations/marketing/site/plan.mjs +117 -0
  132. package/operations/marketing/site/presence.mjs +252 -0
  133. package/operations/references/references.json +45 -0
  134. package/operations/skills/recruiting/SKILL.md +32 -0
  135. package/operations/skills/team-design/SKILL.md +36 -0
  136. package/operations/skills/tool-selection/SKILL.md +46 -0
  137. package/operations/templates/marketing-brand.md +46 -0
  138. package/operations/templates/public-assets.md +39 -0
  139. package/operations/templates/recruiting-brief.md +35 -0
  140. package/operations/tooling/integrations.json +158 -0
  141. package/package.json +59 -4
  142. package/packages/catalog.json +280 -0
  143. package/packages/cofounder/package.json +42 -0
  144. package/packages/counsel/package.json +47 -0
  145. package/packages/customers/package.json +41 -0
  146. package/packages/deals/package.json +27 -0
  147. package/packages/decisions/package.json +28 -0
  148. package/packages/engineering/package.json +41 -0
  149. package/packages/evidence/package.json +17 -0
  150. package/packages/finance/frames/fund-without-ceding-control.frame.json +177 -0
  151. package/packages/finance/package.json +48 -0
  152. package/packages/foundation/package.json +59 -0
  153. package/packages/fund/package.json +48 -0
  154. package/packages/investor/package.json +57 -0
  155. package/packages/investors/package.json +21 -0
  156. package/packages/legal/package.json +73 -0
  157. package/packages/marketing/package.json +63 -0
  158. package/packages/money/package.json +42 -0
  159. package/packages/operations/package.json +74 -0
  160. package/packages/partner/package.json +38 -0
  161. package/packages/people/package.json +64 -0
  162. package/packages/product/package.json +49 -0
  163. package/packages/raw/package.json +19 -0
  164. package/packages/relationships/package.json +52 -0
  165. package/packages/validation/package.json +112 -0
  166. package/platform/README.md +51 -0
  167. package/platform/adapter.json +15 -0
  168. package/platform/connectors/eval.mjs +154 -0
  169. package/platform/connectors/fake-github.mjs +91 -0
  170. package/platform/connectors/github.mjs +105 -0
  171. package/platform/integrations/jev.mjs +30 -0
  172. package/platform/integrations/langsmith-docket.mjs +53 -0
  173. package/platform/integrations/langsmith-setup.mjs +115 -0
  174. package/platform/integrations/langsmith.mjs +47 -0
  175. package/platform/integrations/remote-image.mjs +79 -0
  176. package/platform/integrations/rho.mjs +146 -0
  177. package/platform/integrations/site.mjs +75 -0
  178. package/platform/kits/README.md +14 -0
  179. package/platform/kits/agent-upgrade/kit.json +15 -0
  180. package/platform/kits/agent-upgrade/run.mjs +82 -0
  181. package/platform/kits/agent-upgrade/stand-in-agent.mjs +32 -0
  182. package/platform/kits/validation-kickoff/kit.json +29 -0
  183. package/platform/mcp/research.mjs +64 -0
  184. package/platform/webhooks/server.mjs +70 -0
  185. package/purpose/checklists/vault-and-tooling-consultancy-setup.md +216 -0
  186. package/purpose/frameworks/business-discovery-framework-amendments-2026-05-20.md +181 -0
  187. package/purpose/frameworks/business-discovery-framework.html +938 -0
  188. package/purpose/frameworks/business-discovery-framework.md +326 -0
  189. package/purpose/frameworks/idea-map/README.md +74 -0
  190. package/purpose/frameworks/idea-map/conventions.json +146 -0
  191. package/purpose/frameworks/idea-map/graph.mjs +182 -0
  192. package/purpose/frameworks/idea-map/ideamap.mjs +181 -0
  193. package/purpose/frameworks/idea-map/route.mjs +140 -0
  194. package/purpose/frameworks/onboarding-handoff-framework.md +269 -0
  195. package/purpose/frameworks/post-discovery-deliverable-playbook.md +274 -0
  196. package/purpose/frameworks/product-anatomy/README.md +63 -0
  197. package/purpose/frameworks/product-anatomy/anatomy.mjs +195 -0
  198. package/purpose/frameworks/product-anatomy/examples/polity.answers.reasoned.json +11 -0
  199. package/purpose/frameworks/product-anatomy/examples/polity.json +89 -0
  200. package/purpose/frameworks/product-anatomy/phases.json +107 -0
  201. package/purpose/frameworks/product-anatomy/questions.json +74 -0
  202. package/purpose/kits/validation/README.md +14 -0
  203. package/purpose/kits/validation/references/references.json +122 -0
  204. package/purpose/kits/validation/skills/problem-validation/SKILL.md +43 -0
  205. package/purpose/kits/validation/skills/validation-score/SKILL.md +35 -0
  206. package/purpose/kits/validation/templates/go-to-market.md +19 -0
  207. package/purpose/kits/validation/templates/operations-readiness.md +20 -0
  208. package/purpose/kits/validation/templates/pricing.md +22 -0
  209. package/purpose/kits/validation/templates/problem-interview.md +36 -0
  210. package/purpose/kits/validation/templates/problem.md +45 -0
  211. package/purpose/kits/validation/templates/product-market-fit.md +23 -0
  212. package/purpose/kits/validation/templates/solution.md +18 -0
  213. package/purpose/kits/validation/templates/team.md +19 -0
  214. package/purpose/kits/validation/weights.json +22 -0
  215. package/purpose/layer.json +53 -0
  216. package/purpose/references/references.json +324 -0
  217. package/purpose/skills/ambition-tier/SKILL.md +205 -0
  218. package/purpose/skills/telos/SKILL.md +52 -0
  219. package/purpose/strategic-foundation.json +133 -0
  220. package/purpose/templates/telos-based-smart.md +39 -0
  221. package/purpose/tooling/integrations.json +48 -0
  222. package/schema/README.md +62 -0
  223. package/schema/VERSION +1 -0
  224. package/schema/access.mjs +57 -0
  225. package/schema/account.schema.json +79 -0
  226. package/schema/adapter.schema.json +33 -0
  227. package/schema/add-department.mjs +41 -0
  228. package/schema/agent-capability.schema.json +94 -0
  229. package/schema/alignment.schema.json +61 -0
  230. package/schema/assess-problem.mjs +131 -0
  231. package/schema/assets.mjs +212 -0
  232. package/schema/bdd.mjs +56 -0
  233. package/schema/board.schema.json +101 -0
  234. package/schema/brand.mjs +373 -0
  235. package/schema/build-release.mjs +61 -0
  236. package/schema/caching.mjs +505 -0
  237. package/schema/check-assets.mjs +24 -0
  238. package/schema/check-boundary.mjs +54 -0
  239. package/schema/check-brand.mjs +24 -0
  240. package/schema/check-config.mjs +110 -0
  241. package/schema/check-data-model.mjs +170 -0
  242. package/schema/check-data-packages.mjs +83 -0
  243. package/schema/check-departments.mjs +45 -0
  244. package/schema/check-execution.mjs +85 -0
  245. package/schema/check-governance.mjs +98 -0
  246. package/schema/check-integrations.mjs +33 -0
  247. package/schema/check-nextjs-status.mjs +79 -0
  248. package/schema/check-nouns.mjs +49 -0
  249. package/schema/check-people.mjs +70 -0
  250. package/schema/check-private.mjs +61 -0
  251. package/schema/check-provenance.mjs +55 -0
  252. package/schema/check-publication.mjs +96 -0
  253. package/schema/check-ready.mjs +89 -0
  254. package/schema/check-sources.mjs +74 -0
  255. package/schema/check-team.mjs +94 -0
  256. package/schema/check-telos.mjs +59 -0
  257. package/schema/check-validation.mjs +165 -0
  258. package/schema/check-ventures.mjs +81 -0
  259. package/schema/check-where-used.mjs +58 -0
  260. package/schema/data-master.schema.json +14 -0
  261. package/schema/data-model.json +1584 -0
  262. package/schema/data-model.schema.json +152 -0
  263. package/schema/deal.schema.json +80 -0
  264. package/schema/decision-analytics.mjs +77 -0
  265. package/schema/decision-record.schema.json +290 -0
  266. package/schema/decision-rights.schema.json +34 -0
  267. package/schema/decision.schema.json +30 -0
  268. package/schema/decisions.mjs +327 -0
  269. package/schema/department-catalog.schema.json +55 -0
  270. package/schema/department.schema.json +15 -0
  271. package/schema/departments.mjs +32 -0
  272. package/schema/docket-eval.mjs +89 -0
  273. package/schema/docket.mjs +135 -0
  274. package/schema/eval-suite.schema.json +45 -0
  275. package/schema/evidence.schema.json +110 -0
  276. package/schema/examples/frames/judge.mjs +10 -0
  277. package/schema/examples/migrate/agent.mjs +12 -0
  278. package/schema/examples/venture-type/jev.mjs +12 -0
  279. package/schema/examples/workspace/ventures/acme-labs/AGENTS.md +17 -0
  280. package/schema/examples/workspace/ventures/acme-labs/accounts/.gitkeep +0 -0
  281. package/schema/examples/workspace/ventures/acme-labs/decisions/discovery-goal.decision.json +23 -0
  282. package/schema/examples/workspace/ventures/acme-labs/decisions/statement-icp.decision.json +22 -0
  283. package/schema/examples/workspace/ventures/acme-labs/decisions/statement-problem.decision.json +22 -0
  284. package/schema/examples/workspace/ventures/acme-labs/decisions/venture.team.decision.json +37 -0
  285. package/schema/examples/workspace/ventures/acme-labs/knowledge/README.md +3 -0
  286. package/schema/examples/workspace/ventures/acme-labs/knowledge/sources.json +46 -0
  287. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000001.json +12 -0
  288. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000002.json +12 -0
  289. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000003.json +12 -0
  290. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000004.json +12 -0
  291. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000005.json +12 -0
  292. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000006.json +12 -0
  293. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000007.json +12 -0
  294. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000008.json +12 -0
  295. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000009.json +12 -0
  296. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000010.json +12 -0
  297. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000011.json +12 -0
  298. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000012.json +12 -0
  299. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000013.json +12 -0
  300. package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000014.json +12 -0
  301. package/schema/examples/workspace/ventures/acme-labs/money/_streams/transactions/stream.json +5 -0
  302. package/schema/examples/workspace/ventures/acme-labs/money/_summary.json +30 -0
  303. package/schema/examples/workspace/ventures/acme-labs/operations/departments/customer-service/README.md +5 -0
  304. package/schema/examples/workspace/ventures/acme-labs/operations/departments/customer-service/department.json +5 -0
  305. package/schema/examples/workspace/ventures/acme-labs/operations/departments/finance/README.md +5 -0
  306. package/schema/examples/workspace/ventures/acme-labs/operations/departments/finance/department.json +5 -0
  307. package/schema/examples/workspace/ventures/acme-labs/operations/departments/human-capital/README.md +5 -0
  308. package/schema/examples/workspace/ventures/acme-labs/operations/departments/human-capital/department.json +5 -0
  309. package/schema/examples/workspace/ventures/acme-labs/operations/departments/it/README.md +5 -0
  310. package/schema/examples/workspace/ventures/acme-labs/operations/departments/it/department.json +5 -0
  311. package/schema/examples/workspace/ventures/acme-labs/operations/departments/marketing-and-sales/README.md +5 -0
  312. package/schema/examples/workspace/ventures/acme-labs/operations/departments/marketing-and-sales/department.json +5 -0
  313. package/schema/examples/workspace/ventures/acme-labs/operations/departments/products/README.md +5 -0
  314. package/schema/examples/workspace/ventures/acme-labs/operations/departments/products/department.json +5 -0
  315. package/schema/examples/workspace/ventures/acme-labs/operations/departments/strategy/README.md +5 -0
  316. package/schema/examples/workspace/ventures/acme-labs/operations/departments/strategy/department.json +5 -0
  317. package/schema/examples/workspace/ventures/acme-labs/people/founders/maya-chen.json +15 -0
  318. package/schema/examples/workspace/ventures/acme-labs/people/people.json +22 -0
  319. package/schema/examples/workspace/ventures/acme-labs/pillars/brand.md +5 -0
  320. package/schema/examples/workspace/ventures/acme-labs/pillars/business.md +5 -0
  321. package/schema/examples/workspace/ventures/acme-labs/pillars/product.md +5 -0
  322. package/schema/examples/workspace/ventures/acme-labs/products/.gitkeep +0 -0
  323. package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.core-product.decision.json +28 -0
  324. package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.exists.decision.json +38 -0
  325. package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.flagship.decision.json +27 -0
  326. package/schema/examples/workspace/ventures/acme-labs/profile.md +12 -0
  327. package/schema/examples/workspace/ventures/acme-labs/provenance.jsonl +12 -0
  328. package/schema/examples/workspace/ventures/acme-labs/raw/dump.md +6 -0
  329. package/schema/examples/workspace/ventures/acme-labs/venture.json +27 -0
  330. package/schema/examples/workspace/ventures/northstar/AGENTS.md +17 -0
  331. package/schema/examples/workspace/ventures/northstar/accounts/.gitkeep +0 -0
  332. package/schema/examples/workspace/ventures/northstar/deals/ductline.json +8 -0
  333. package/schema/examples/workspace/ventures/northstar/deals/kilnworks.json +14 -0
  334. package/schema/examples/workspace/ventures/northstar/decisions/venture.team.decision.json +31 -0
  335. package/schema/examples/workspace/ventures/northstar/evidence/README.md +3 -0
  336. package/schema/examples/workspace/ventures/northstar/fund/decisions/terms.decision.json +27 -0
  337. package/schema/examples/workspace/ventures/northstar/fund/decisions/terms.first-close.decision.json +27 -0
  338. package/schema/examples/workspace/ventures/northstar/fund/decisions/thesis.decision.json +26 -0
  339. package/schema/examples/workspace/ventures/northstar/fund/terms.json +22 -0
  340. package/schema/examples/workspace/ventures/northstar/fund/thesis.json +22 -0
  341. package/schema/examples/workspace/ventures/northstar/governance/README.md +3 -0
  342. package/schema/examples/workspace/ventures/northstar/governance/departments/external-relationships/charter.md +5 -0
  343. package/schema/examples/workspace/ventures/northstar/governance/departments/external-relationships/department.json +5 -0
  344. package/schema/examples/workspace/ventures/northstar/governance/departments/finance/charter.md +5 -0
  345. package/schema/examples/workspace/ventures/northstar/governance/departments/finance/department.json +5 -0
  346. package/schema/examples/workspace/ventures/northstar/governance/departments/human-capital/charter.md +5 -0
  347. package/schema/examples/workspace/ventures/northstar/governance/departments/human-capital/department.json +5 -0
  348. package/schema/examples/workspace/ventures/northstar/governance/departments/risk-and-compliance/charter.md +5 -0
  349. package/schema/examples/workspace/ventures/northstar/governance/departments/risk-and-compliance/department.json +5 -0
  350. package/schema/examples/workspace/ventures/northstar/governance/departments/strategy/charter.md +5 -0
  351. package/schema/examples/workspace/ventures/northstar/governance/departments/strategy/department.json +5 -0
  352. package/schema/examples/workspace/ventures/northstar/knowledge/README.md +3 -0
  353. package/schema/examples/workspace/ventures/northstar/operations/README.md +3 -0
  354. package/schema/examples/workspace/ventures/northstar/operations/departments/external-relationships/README.md +5 -0
  355. package/schema/examples/workspace/ventures/northstar/operations/departments/external-relationships/department.json +5 -0
  356. package/schema/examples/workspace/ventures/northstar/operations/departments/finance/README.md +5 -0
  357. package/schema/examples/workspace/ventures/northstar/operations/departments/finance/department.json +5 -0
  358. package/schema/examples/workspace/ventures/northstar/operations/departments/human-capital/README.md +5 -0
  359. package/schema/examples/workspace/ventures/northstar/operations/departments/human-capital/department.json +5 -0
  360. package/schema/examples/workspace/ventures/northstar/operations/departments/risk-and-compliance/README.md +5 -0
  361. package/schema/examples/workspace/ventures/northstar/operations/departments/risk-and-compliance/department.json +5 -0
  362. package/schema/examples/workspace/ventures/northstar/operations/departments/strategy/README.md +5 -0
  363. package/schema/examples/workspace/ventures/northstar/operations/departments/strategy/department.json +5 -0
  364. package/schema/examples/workspace/ventures/northstar/people/founders/ana-ruiz.json +13 -0
  365. package/schema/examples/workspace/ventures/northstar/people/founders/ben-okafor.json +7 -0
  366. package/schema/examples/workspace/ventures/northstar/people/people.json +27 -0
  367. package/schema/examples/workspace/ventures/northstar/pillars/brand.md +5 -0
  368. package/schema/examples/workspace/ventures/northstar/pillars/business.md +5 -0
  369. package/schema/examples/workspace/ventures/northstar/pillars/product.md +5 -0
  370. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/AGENTS.md +17 -0
  371. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/accounts/.gitkeep +0 -0
  372. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/decisions/venture.team.decision.json +31 -0
  373. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/knowledge/README.md +3 -0
  374. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/customer-service/README.md +5 -0
  375. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/customer-service/department.json +5 -0
  376. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/finance/README.md +5 -0
  377. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/finance/department.json +5 -0
  378. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/human-capital/README.md +5 -0
  379. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/human-capital/department.json +5 -0
  380. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/it/README.md +5 -0
  381. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/it/department.json +5 -0
  382. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/marketing-and-sales/README.md +5 -0
  383. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/marketing-and-sales/department.json +5 -0
  384. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/products/README.md +5 -0
  385. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/products/department.json +5 -0
  386. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/strategy/README.md +5 -0
  387. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/strategy/department.json +5 -0
  388. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/brand.md +5 -0
  389. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/business.md +5 -0
  390. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/product.md +5 -0
  391. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/.gitkeep +0 -0
  392. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.core-product.decision.json +28 -0
  393. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.exists.decision.json +32 -0
  394. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.flagship.decision.json +27 -0
  395. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/profile.md +5 -0
  396. package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/venture.json +27 -0
  397. package/schema/examples/workspace/ventures/northstar/products/.gitkeep +0 -0
  398. package/schema/examples/workspace/ventures/northstar/profile.md +5 -0
  399. package/schema/examples/workspace/ventures/northstar/provenance.jsonl +3 -0
  400. package/schema/examples/workspace/ventures/northstar/purpose/README.md +3 -0
  401. package/schema/examples/workspace/ventures/northstar/venture.json +49 -0
  402. package/schema/examples/workspace/ventures/studio/accounts/bakery/account.json +18 -0
  403. package/schema/examples/workspace/ventures/studio/evidence/.gitkeep +0 -0
  404. package/schema/examples/workspace/ventures/studio/governance/.gitkeep +0 -0
  405. package/schema/examples/workspace/ventures/studio/knowledge/.gitkeep +0 -0
  406. package/schema/examples/workspace/ventures/studio/operations/.gitkeep +0 -0
  407. package/schema/examples/workspace/ventures/studio/print/knowledge/.gitkeep +0 -0
  408. package/schema/examples/workspace/ventures/studio/print/purpose/.gitkeep +0 -0
  409. package/schema/examples/workspace/ventures/studio/print/venture.json +37 -0
  410. package/schema/examples/workspace/ventures/studio/products/brand-care.json +19 -0
  411. package/schema/examples/workspace/ventures/studio/products/brand-kit.json +23 -0
  412. package/schema/examples/workspace/ventures/studio/provenance.jsonl +3 -0
  413. package/schema/examples/workspace/ventures/studio/purpose/.gitkeep +0 -0
  414. package/schema/examples/workspace/ventures/studio/venture.json +43 -0
  415. package/schema/examples/workspace/ventures/tandem/accounts/.gitkeep +0 -0
  416. package/schema/examples/workspace/ventures/tandem/evidence/README.md +3 -0
  417. package/schema/examples/workspace/ventures/tandem/governance/README.md +3 -0
  418. package/schema/examples/workspace/ventures/tandem/governance/agreements/dee-fast.md +3 -0
  419. package/schema/examples/workspace/ventures/tandem/governance/board.json +51 -0
  420. package/schema/examples/workspace/ventures/tandem/governance/departments/finance/charter.md +5 -0
  421. package/schema/examples/workspace/ventures/tandem/governance/departments/finance/department.json +5 -0
  422. package/schema/examples/workspace/ventures/tandem/governance/departments/primary/marketing-and-sales/charter.md +5 -0
  423. package/schema/examples/workspace/ventures/tandem/governance/departments/primary/marketing-and-sales/department.json +5 -0
  424. package/schema/examples/workspace/ventures/tandem/governance/exit.json +33 -0
  425. package/schema/examples/workspace/ventures/tandem/governance/founder-agreement.json +24 -0
  426. package/schema/examples/workspace/ventures/tandem/governance/founder-agreement.md +3 -0
  427. package/schema/examples/workspace/ventures/tandem/governance/ownership.json +131 -0
  428. package/schema/examples/workspace/ventures/tandem/governance/publication-policy.json +171 -0
  429. package/schema/examples/workspace/ventures/tandem/knowledge/README.md +3 -0
  430. package/schema/examples/workspace/ventures/tandem/knowledge/research/friends-feedback-2026-08.md +3 -0
  431. package/schema/examples/workspace/ventures/tandem/knowledge/research/pilot-2026-10.md +3 -0
  432. package/schema/examples/workspace/ventures/tandem/knowledge/research/problem-interviews-2026-09.md +20 -0
  433. package/schema/examples/workspace/ventures/tandem/knowledge/sources.json +8 -0
  434. package/schema/examples/workspace/ventures/tandem/knowledge/where-used.json +13 -0
  435. package/schema/examples/workspace/ventures/tandem/operations/README.md +3 -0
  436. package/schema/examples/workspace/ventures/tandem/operations/departments/finance/README.md +5 -0
  437. package/schema/examples/workspace/ventures/tandem/operations/departments/finance/department.json +5 -0
  438. package/schema/examples/workspace/ventures/tandem/operations/departments/primary/marketing-and-sales/README.md +5 -0
  439. package/schema/examples/workspace/ventures/tandem/operations/departments/primary/marketing-and-sales/department.json +5 -0
  440. package/schema/examples/workspace/ventures/tandem/pillars/brand.md +5 -0
  441. package/schema/examples/workspace/ventures/tandem/pillars/business.md +5 -0
  442. package/schema/examples/workspace/ventures/tandem/pillars/product.md +5 -0
  443. package/schema/examples/workspace/ventures/tandem/products/.gitkeep +0 -0
  444. package/schema/examples/workspace/ventures/tandem/products/shop-app.json +22 -0
  445. package/schema/examples/workspace/ventures/tandem/profile.md +5 -0
  446. package/schema/examples/workspace/ventures/tandem/provenance.jsonl +13 -0
  447. package/schema/examples/workspace/ventures/tandem/purpose/README.md +3 -0
  448. package/schema/examples/workspace/ventures/tandem/purpose/telos.json +78 -0
  449. package/schema/examples/workspace/ventures/tandem/purpose/validation/go-to-market.json +35 -0
  450. package/schema/examples/workspace/ventures/tandem/purpose/validation/pricing.json +37 -0
  451. package/schema/examples/workspace/ventures/tandem/purpose/validation/problem.json +74 -0
  452. package/schema/examples/workspace/ventures/tandem/purpose/validation/product-market-fit.json +66 -0
  453. package/schema/examples/workspace/ventures/tandem/purpose/validation/solution.json +33 -0
  454. package/schema/examples/workspace/ventures/tandem/purpose/validation/team.json +52 -0
  455. package/schema/examples/workspace/ventures/tandem/venture.json +79 -0
  456. package/schema/examples/workspace/ventures/woodworking/knowledge/.gitkeep +0 -0
  457. package/schema/examples/workspace/ventures/woodworking/venture.json +21 -0
  458. package/schema/examples/workspace/workspace.json +8 -0
  459. package/schema/exit.schema.json +74 -0
  460. package/schema/foundation.mjs +118 -0
  461. package/schema/founder-agreement.schema.json +83 -0
  462. package/schema/founder.schema.json +72 -0
  463. package/schema/frame.schema.json +240 -0
  464. package/schema/frames.mjs +228 -0
  465. package/schema/freshness-log.schema.json +40 -0
  466. package/schema/freshness-profiles.schema.json +44 -0
  467. package/schema/freshness.mjs +473 -0
  468. package/schema/fund-terms.schema.json +107 -0
  469. package/schema/fund-thesis.schema.json +87 -0
  470. package/schema/gate-drafts.mjs +130 -0
  471. package/schema/gate.mjs +133 -0
  472. package/schema/glossary.schema.json +25 -0
  473. package/schema/handoff.schema.json +239 -0
  474. package/schema/icp.schema.json +136 -0
  475. package/schema/idea-graph.schema.json +61 -0
  476. package/schema/init-venture.mjs +128 -0
  477. package/schema/integration.schema.json +143 -0
  478. package/schema/judgment.schema.json +38 -0
  479. package/schema/kit.schema.json +47 -0
  480. package/schema/kits.mjs +24 -0
  481. package/schema/knowledge-sources.schema.json +260 -0
  482. package/schema/layer.json +59 -0
  483. package/schema/layer.schema.json +119 -0
  484. package/schema/load-packages.mjs +26 -0
  485. package/schema/marketing-brand.schema.json +116 -0
  486. package/schema/marketing-sitemap.schema.json +232 -0
  487. package/schema/migrate-venture.mjs +192 -0
  488. package/schema/migrations/kit-to-package.mjs +94 -0
  489. package/schema/migrations/package-layout.mjs +86 -0
  490. package/schema/model-steps.mjs +717 -0
  491. package/schema/money-summary.schema.json +138 -0
  492. package/schema/naive-config.mjs +165 -0
  493. package/schema/naive-config.schema.json +268 -0
  494. package/schema/need-now.json +772 -0
  495. package/schema/need-now.mjs +108 -0
  496. package/schema/nextjs-status.schema.json +29 -0
  497. package/schema/ownership.schema.json +282 -0
  498. package/schema/packages.json +4 -0
  499. package/schema/packages.mjs +252 -0
  500. package/schema/payouts.mjs +91 -0
  501. package/schema/people.schema.json +86 -0
  502. package/schema/port-venture.mjs +161 -0
  503. package/schema/product.schema.json +223 -0
  504. package/schema/provenance-entry.schema.json +154 -0
  505. package/schema/public-assets.schema.json +76 -0
  506. package/schema/publication-policy.schema.json +293 -0
  507. package/schema/raw-source.schema.json +15 -0
  508. package/schema/reference.schema.json +115 -0
  509. package/schema/release-read.mjs +111 -0
  510. package/schema/releases.mjs +497 -0
  511. package/schema/route-aliases.schema.json +25 -0
  512. package/schema/run-handoff.mjs +51 -0
  513. package/schema/scaffold/defaults.json +54 -0
  514. package/schema/setup.mjs +164 -0
  515. package/schema/site-presence.schema.json +337 -0
  516. package/schema/stale.mjs +111 -0
  517. package/schema/start-release.mjs +41 -0
  518. package/schema/strategic-foundation.schema.json +74 -0
  519. package/schema/stream.schema.json +14 -0
  520. package/schema/structure.mjs +186 -0
  521. package/schema/systems-catalog.json +126 -0
  522. package/schema/systems-catalog.schema.json +78 -0
  523. package/schema/team-plan.schema.json +157 -0
  524. package/schema/telos.schema.json +197 -0
  525. package/schema/time-to-ready.mjs +93 -0
  526. package/schema/trigger.schema.json +44 -0
  527. package/schema/triggers.mjs +237 -0
  528. package/schema/upgrade-registry.schema.json +60 -0
  529. package/schema/upgrade-venture.mjs +107 -0
  530. package/schema/upgrades.json +69 -0
  531. package/schema/upgrades.mjs +385 -0
  532. package/schema/use-model.mjs +10 -0
  533. package/schema/validate.py +58 -0
  534. package/schema/validation-evidence.schema.json +123 -0
  535. package/schema/validation-go-to-market.schema.json +110 -0
  536. package/schema/validation-operations-readiness.schema.json +91 -0
  537. package/schema/validation-pricing.schema.json +114 -0
  538. package/schema/validation-problem.schema.json +118 -0
  539. package/schema/validation-product-market-fit.schema.json +135 -0
  540. package/schema/validation-solution.schema.json +79 -0
  541. package/schema/validation-team.schema.json +116 -0
  542. package/schema/venture-role.schema.json +64 -0
  543. package/schema/venture-type.mjs +62 -0
  544. package/schema/venture-types.json +346 -0
  545. package/schema/venture-types.schema.json +129 -0
  546. package/schema/venture.schema.json +460 -0
  547. package/schema/vocab/business-models.json +298 -0
  548. package/schema/where-used.schema.json +56 -0
  549. package/schema/workspace.schema.json +38 -0
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env node
2
+ // The decision harness demo (EE-054, EE-058): an agent works on a venture through Naive's MCP
3
+ // server, is stopped by a decision only a person can make, and goes on once the founder decides.
4
+ // Runs on a copy of the example workspace, so nothing real changes. No model is called: the agent's
5
+ // moves are scripted, so any harness (Claude Code, LangGraph, the Claude Agent SDK) can replay them.
6
+ //
7
+ // node interface/demo/decision-harness.mjs the founder types the decision at the prompt
8
+ // node interface/demo/decision-harness.mjs --auto the founder's step is taken for them (tests)
9
+ // node interface/demo/decision-harness.mjs --board also serves the live decision board for the run
10
+ // at http://127.0.0.1:4331/ and paces the steps
11
+
12
+ import { spawn, spawnSync } from "node:child_process";
13
+ import { cpSync, mkdtempSync, readFileSync, rmSync } from "node:fs";
14
+ import { tmpdir } from "node:os";
15
+ import { join } from "node:path";
16
+ import { createInterface } from "node:readline";
17
+
18
+ const repo = new URL("../../", import.meta.url).pathname;
19
+ const auto = process.argv.includes("--auto");
20
+ const tmp = mkdtempSync(join(tmpdir(), "naive-demo-"));
21
+ const ws = join(tmp, "workspace");
22
+ cpSync(join(repo, "schema/examples/workspace"), ws, { recursive: true });
23
+ const venture = "tandem", dir = join(ws, "ventures", venture);
24
+ const env = { ...process.env, MENTURA_WORKSPACE: ws };
25
+ const board = process.argv.includes("--board");
26
+ let boardServer = null;
27
+ if (board) { process.env.MENTURA_WORKSPACE = ws; boardServer = (await import("./board.mjs")).serve(4331, venture); console.log("Decision board: http://127.0.0.1:4331/"); }
28
+ const say = async (who, text) => {
29
+ if (board) await new Promise((r) => setTimeout(r, 2500));
30
+ console.log(`\n${who === "agent" ? "AGENT " : who === "naive" ? "NAIVE " : "FOUNDER"} ${text}`);
31
+ };
32
+
33
+ // The agent's side: an MCP client over stdio.
34
+ const server = spawn("node", [join(repo, "interface/mcp/server.mjs")], { env, stdio: ["pipe", "pipe", "inherit"] });
35
+ const pending = new Map();
36
+ let next = 1;
37
+ createInterface({ input: server.stdout }).on("line", (l) => { const m = JSON.parse(l); pending.get(m.id)?.(m); pending.delete(m.id); });
38
+ const rpc = (method, params) => new Promise((res) => { const id = next++; pending.set(id, res); server.stdin.write(JSON.stringify({ jsonrpc: "2.0", id, method, params }) + "\n"); });
39
+ const tool = async (name, args) => { const r = (await rpc("tools/call", { name, arguments: args })).result; return { error: r.isError, body: (() => { try { return JSON.parse(r.content[0].text); } catch { return r.content[0].text; } })() }; };
40
+
41
+ let failed = false;
42
+ const expect = (cond, what) => { if (!cond) { failed = true; console.error(`\nDEMO FAILED: ${what}`); } };
43
+ try {
44
+ await rpc("initialize", { protocolVersion: "2025-06-18", clientInfo: { name: "demo-agent", version: "0.1" } });
45
+ const tools = (await rpc("tools/list", {})).result.tools.map((t) => t.name);
46
+ await say("agent", `Connected to Naive over MCP: ${tools.length} tools.`);
47
+
48
+ const before = await tool("mentura_decisions", { venture, render: ["overdue", "now"] });
49
+ await say("naive", `${before.body.decisions.length} decisions render now for ${venture} (${before.body.phase}). The agent works only on those.`);
50
+
51
+ await say("agent", "I want to change the product card. First I propose the decision that change needs.");
52
+ const p = await tool("mentura_propose_decision", { venture, agent_id: "builder", model: "scripted", decision: {
53
+ id: "reposition-shop-app", question: "Do we reposition the shop app around payroll first?", at: "products", name: "shop-app.reposition",
54
+ answer: "Yes: lead with payroll, which owners named as the worst admin job.", due: new Date(Date.now() + 864e5).toISOString().replace(/\.\d+Z$/, "Z"),
55
+ outcomes: [{ id: "trial-signups", projected: "Ten shops start a trial within two weeks of the change", measure: "Trial sign-ups" }],
56
+ unlocks: [{ activity: "Rewrite the product card", routes: ["purpose/product/*"], for: ["builder"] }] } });
57
+ expect(!p.error && p.body.awaiting === "approval", `propose: ${JSON.stringify(p.body)}`);
58
+ await say("naive", `Proposed ${p.body.proposed}. It waits for a person: an agent cannot decide it.`);
59
+
60
+ const card = JSON.parse(readFileSync(join(dir, "products/shop-app.json"), "utf8"));
61
+ const changed = { ...card, description: "Payroll first, then bookings and stock, for small service shops" };
62
+ const w1 = await tool("mentura_write", { venture, route: "purpose/product/shop-app", record: changed, agent_id: "builder", note: "reposition around payroll" });
63
+ expect(w1.error && /locked until decision reposition-shop-app/.test(w1.body.error), `first write: ${JSON.stringify(w1.body)}`);
64
+ await say("naive", `Refused: ${w1.body.error}`);
65
+ await say("agent", "Paused. I'll go on when the founder decides.");
66
+
67
+ // The founder's step, outside the agent's reach: the CLI, with a typed confirm.
68
+ let typed = "reposition-shop-app";
69
+ if (!auto && process.stdin.isTTY) {
70
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
71
+ typed = await new Promise((res) => rl.question(`\nFOUNDER Type reposition-shop-app to approve the agent's wording (anything else declines): `, (a) => { rl.close(); res(a.trim()); }));
72
+ } else await say("founder", "(--auto) types reposition-shop-app");
73
+ const d = spawnSync("node", [join(repo, "interface/cli/mentura.mjs"), "decide", "reposition-shop-app", "--venture", venture, "--by", "Founder", "--confirm", typed], { env, encoding: "utf8" });
74
+ if (d.status !== 0) { await say("naive", `Not decided: ${(d.stderr || d.stdout).trim()}. The agent stays paused.`); process.exitCode = 0; }
75
+ else {
76
+ const r = JSON.parse(d.stdout);
77
+ await say("naive", `Decided by Founder in ${r.phase} (${r.wording} the agent's wording). Unlocked: ${r.unlocks.join(", ")}.`);
78
+ const w2 = await tool("mentura_write", { venture, route: "purpose/product/shop-app", record: changed, agent_id: "builder", decision: "reposition-shop-app", note: "reposition around payroll" });
79
+ expect(!w2.error, `second write: ${JSON.stringify(w2.body)}`);
80
+ await say("agent", `Resumed: wrote ${w2.body.written}.`);
81
+ const log = readFileSync(join(dir, "provenance.jsonl"), "utf8").trim().split("\n").slice(-3).map((l) => JSON.parse(l));
82
+ await say("naive", `Provenance, last three entries:\n${log.map((e) => ` ${e.activity.padEnd(7)} ${e.entity.padEnd(48)} by ${e.agent.kind}${e.agent.id ? ` ${e.agent.id}` : ""} via ${e.agent.via}`).join("\n")}`);
83
+ const dec = JSON.parse(readFileSync(join(dir, "products/decisions/shop-app.reposition.decision.json"), "utf8"));
84
+ await say("naive", `The decision carries its outcome to test later: "${dec.outcomes[0].projected}" (${dec.outcomes[0].result ?? "pending"}).`);
85
+ }
86
+ } finally {
87
+ server.kill();
88
+ boardServer?.close();
89
+ rmSync(tmp, { recursive: true, force: true });
90
+ }
91
+ if (failed) process.exit(1);
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ // The decision harness with a real agent (EE-054, EE-058): Claude Code, headless, works on a copy of
3
+ // the example venture through Naive's MCP server and nothing else. It proposes the decision its
4
+ // change needs, is refused, and stops; this script waits until a person decides in another
5
+ // terminal, then sends the agent back to finish. Needs the claude CLI, signed in.
6
+ //
7
+ // node interface/demo/live-agent.mjs [--board]
8
+ // --board serves the live decision board at http://127.0.0.1:4331/
9
+
10
+ import { spawnSync } from "node:child_process";
11
+ import { cpSync, existsSync, mkdtempSync, readFileSync, writeFileSync } from "node:fs";
12
+ import { tmpdir } from "node:os";
13
+ import { join } from "node:path";
14
+
15
+ const repo = new URL("../../", import.meta.url).pathname;
16
+ const tmp = mkdtempSync(join(tmpdir(), "naive-live-"));
17
+ const ws = join(tmp, "workspace");
18
+ cpSync(join(repo, "schema/examples/workspace"), ws, { recursive: true });
19
+ const venture = "tandem", id = "reposition-shop-app";
20
+ const decisionFile = join(ws, "ventures", venture, "products/decisions/shop-app.reposition.decision.json");
21
+ const mcp = join(tmp, "mcp.json");
22
+ writeFileSync(mcp, JSON.stringify({ mcpServers: { naive: { command: "node", args: [join(repo, "interface/mcp/server.mjs")], env: { MENTURA_WORKSPACE: ws } } } }));
23
+
24
+ let board = null;
25
+ if (process.argv.includes("--board")) { process.env.MENTURA_WORKSPACE = ws; board = (await import("./board.mjs")).serve(4331, venture); console.log("Decision board: http://127.0.0.1:4331/"); }
26
+
27
+ const agent = (prompt) => {
28
+ console.log("\nAGENT working through Naive's MCP server...");
29
+ const p = spawnSync("claude", ["-p", prompt, "--tools", "", "--mcp-config", mcp, "--strict-mcp-config", "--allowedTools", "mcp__naive__*", "--output-format", "text"], { encoding: "utf8", stdio: ["ignore", "pipe", "inherit"] });
30
+ if (p.error) { console.error(`could not run claude: ${p.error.message}`); process.exit(1); }
31
+ console.log(p.stdout.trim().split("\n").map((l) => ` ${l}`).join("\n"));
32
+ };
33
+
34
+ const role = `You are the builder agent (agent_id builder) for the venture ${venture}. Work only through the naive MCP tools.`;
35
+ agent(`${role} Task: reposition the shop-app product card (route purpose/product/shop-app) to lead with payroll. Call mentura_decisions first. Before changing the card, propose the decision the change needs with mentura_propose_decision: id ${id}, at "products", name "shop-app.reposition", parent "venture", with your proposed answer, one projected outcome, and unlocks [{"activity": "Reposition the shop-app product card", "routes": ["purpose/product/*"], "for": ["builder"]}]. Then try the write. If it is refused, stop and tell the founder, in two lines, what to approve and the exact command.`);
36
+
37
+ console.log(`\nFOUNDER In another terminal, review and decide:\n MENTURA_WORKSPACE=${ws} node ${join(repo, "interface/cli/mentura.mjs")} decide ${id} --venture ${venture} --by <your name>\nNAIVE Waiting for the decision...`);
38
+ const decided = () => existsSync(decisionFile) && JSON.parse(readFileSync(decisionFile, "utf8")).status === "decided";
39
+ while (!decided()) await new Promise((r) => setTimeout(r, 1000));
40
+ const d = JSON.parse(readFileSync(decisionFile, "utf8"));
41
+ console.log(`\nNAIVE ${id} decided by ${d.provenance.approved_by} in ${d.provenance.phase} (${d.provenance.wording} the agent's wording).`);
42
+
43
+ agent(`${role} You proposed decision ${id} and your write to purpose/product/shop-app was refused as locked. Check mentura_decisions; it is now decided. Read the card and write it to match the decided answer, citing decision ${id}. Report in two lines.`);
44
+
45
+ const log = readFileSync(join(ws, "ventures", venture, "provenance.jsonl"), "utf8").trim().split("\n").slice(-3).map((l) => JSON.parse(l));
46
+ console.log(`\nNAIVE Provenance, last three entries:\n${log.map((e) => ` ${e.activity.padEnd(7)} ${e.entity.padEnd(52)} by ${e.agent.kind}${e.agent.id ? ` ${e.agent.id}` : ""} via ${e.agent.via}`).join("\n")}`);
47
+ console.log(`\nThe run's workspace stays at ${ws} for questions.${board ? " The board keeps serving it; Ctrl-C to stop." : ""}`);
@@ -0,0 +1,84 @@
1
+ // The setup page (EE-083): what `naive dev` serves at /setup, the way next dev serves a first page. It
2
+ // walks a founder through establishing the venture's structure, in order: the venture and its people,
3
+ // where each function keeps its truth, the strategic foundation and the first decisions (the decision
4
+ // docket), and a goal for the discovery phase. Every answer is written as the code would write it:
5
+ // a decision a person approves (schema/decisions.mjs), or knowledge/sources.json through the router, with
6
+ // provenance. When the docket's first decisions are settled, the page says the structure is established
7
+ // and what comes next.
8
+ //
9
+ // handle(req, res, dir) -> true when it answered a /setup request
10
+
11
+ import { decide, point, state } from "../../schema/setup.mjs";
12
+
13
+ const json = (res, code, body) => { res.writeHead(code, { "content-type": "application/json" }); res.end(JSON.stringify(body)); };
14
+ const body = (req) => new Promise((ok) => { let b = ""; req.on("data", (c) => (b += c)); req.on("end", () => { try { ok(JSON.parse(b || "{}")); } catch { ok({}); } }); });
15
+ const GOAL = "discovery-goal";
16
+
17
+ export async function handle(req, res, dir) {
18
+ const u = new URL(req.url, "http://x");
19
+ if (!u.pathname.startsWith("/setup")) return false;
20
+ if (u.pathname === "/setup" || u.pathname === "/setup/") { res.writeHead(200, { "content-type": "text/html; charset=utf-8" }); res.end(PAGE); return true; }
21
+ if (u.pathname === "/setup/state") { json(res, 200, await state(dir)); return true; }
22
+ if (req.method === "POST" && u.pathname === "/setup/decide") { const r = await decide(dir, await body(req)); json(res, r.ok ? 200 : 400, r); return true; }
23
+ if (req.method === "POST" && u.pathname === "/setup/point") { const r = await point(dir, await body(req)); json(res, r.ok ? 200 : 400, r); return true; }
24
+ json(res, 404, { error: "no such setup route" });
25
+ return true;
26
+ }
27
+
28
+ const PAGE = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
29
+ <title>Set up your venture</title>
30
+ <style>
31
+ :root { --bg:#f6f7f4; --panel:#fff; --fg:#1d2320; --muted:#5d675f; --line:#d9ded8; --accent:#2f6b4f; --accent-soft:#e3efe8; --warn:#8a5a00; --warn-soft:#f6ecd8;
32
+ --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: ui-monospace, "SF Mono", Menlo, monospace; color-scheme: light; }
33
+ @media (prefers-color-scheme: dark) { :root { --bg:#121614; --panel:#1a201d; --fg:#e4e9e5; --muted:#9aa59d; --line:#2b332e; --accent:#86c4a3; --accent-soft:#1d2b24; --warn:#e3b25c; --warn-soft:#2c2414; color-scheme: dark; } }
34
+ * { box-sizing: border-box } body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.55 var(--body); }
35
+ .wrap { max-width: 860px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-left)) 80px; display: grid; gap: 28px; }
36
+ header { display:grid; gap:6px } h1 { margin:0; font-size:1.9rem; letter-spacing:-.01em } h2 { margin:0 0 4px; font-size:1.2rem }
37
+ .muted { color: var(--muted) } .mono { font-family: var(--mono); font-size: .88em }
38
+ .progress { display:flex; gap:6px; flex-wrap:wrap } .step { font:600 .78rem/1 var(--mono); padding:7px 10px; border-radius:999px; border:1px solid var(--line); color:var(--muted) }
39
+ .step.ok { background: var(--accent-soft); color: var(--accent); border-color: transparent }
40
+ section { background: var(--panel); border:1px solid var(--line); border-radius:10px; padding:20px; display:grid; gap:14px }
41
+ table { width:100%; border-collapse: collapse; font-size:.95rem } td, th { text-align:left; padding:8px 6px; border-bottom:1px solid var(--line); vertical-align: top } th { font: 600 .74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing:.05em; color: var(--muted) }
42
+ .pill { display:inline-block; font:600 .72rem/1 var(--mono); padding:4px 7px; border-radius:999px; background: var(--accent-soft); color: var(--accent); margin: 0 4px 4px 0 } .pill.pointed { background: var(--line); color: var(--fg) } .pill.none { background: var(--warn-soft); color: var(--warn) }
43
+ .card { border:1px solid var(--line); border-radius:8px; padding:14px; display:grid; gap:10px } .card.done { opacity:.75 }
44
+ .card .q { font-weight:600 } textarea, input, select { font: inherit; color: inherit; background: var(--bg); border:1px solid var(--line); border-radius:6px; padding:8px; width:100% }
45
+ .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center } .row > * { flex: 1 1 140px }
46
+ button { font: 600 .92rem var(--body); background: var(--accent); color: var(--bg); border: 0; border-radius: 6px; padding: 9px 14px; cursor: pointer; flex: 0 0 auto }
47
+ button.ghost { background: transparent; color: var(--accent); border:1px solid var(--accent) } button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
48
+ .err { color: var(--warn); font-size: .9rem } .celebrate { text-align:center; padding: 32px 20px; display:grid; gap:10px; background: var(--accent-soft); border-color: transparent }
49
+ .celebrate .big { font-size: 2.2rem; font-weight: 700; color: var(--accent) } ol { margin:0; padding-left: 1.2em; display:grid; gap:6px; text-align:left }
50
+ @media (prefers-reduced-motion: no-preference) { .celebrate { animation: pop .5s ease-out } @keyframes pop { from { transform: scale(.97); opacity:.4 } to { transform: none; opacity:1 } } }
51
+ </style></head><body><div class="wrap" id="app"><p class="muted">Loading your venture…</p></div>
52
+ <script>
53
+ const $ = (s) => document.querySelector(s);
54
+ const esc = (s) => String(s ?? "").replace(/[&<>"]/g, (c) => ({ "&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;" })[c]);
55
+ const post = (u, b) => fetch(u, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(b) }).then((r) => r.json());
56
+ let S = null;
57
+ async function load() { S = await fetch("/setup/state").then((r) => r.json()); render(); }
58
+ function render() {
59
+ const v = S.venture, st = S.steps;
60
+ const label = (k, t) => '<span class="step ' + (st[k] ? "ok" : "") + '">' + (st[k] ? "✓ " : "") + t + "</span>";
61
+ const people = S.people ? '<table><tr><th>Person</th><th>Role</th><th>Hats</th></tr>' + S.people.people.map((p) => "<tr><td>" + esc(p.name) + "</td><td class=mono>" + esc(p.role) + "</td><td>" + (p.hats.map((h) => '<span class="pill pointed">' + esc(h) + "</span>").join("") || '<span class="muted">none</span>') + "</td></tr>").join("") + "</table>" : '<p class="err">No people/people.json yet: create the venture with create-venture.</p>';
62
+ const fns = [...new Set([...Object.keys(S.catalog.functions).filter((f) => f === "legal" || (S.people?.people ?? []).some((p) => p.hats.includes(f))), ...Object.keys(S.functions)])];
63
+ const truth = '<table><tr><th>Function</th><th>Source of truth</th></tr>' + fns.map((f) => { const x = S.functions[f]; const sys = x?.systems?.length ? x.systems.map((s) => '<span class="pill ' + (s.status === "connected" ? "" : "pointed") + '">' + esc(S.catalog.systems[s.system]?.label ?? s.system) + (s.address ? " · " + esc(s.address) : "") + " · " + s.status + (s.fixture ? " (fixture)" : "") + "</span>").join("") : '<span class="pill none">none yet</span>' + (x?.note ? ' <span class="muted">' + esc(x.note) + "</span>" : ""); return "<tr><td>" + esc(f === "legal" ? "legal documents" : f) + "</td><td>" + sys + "</td></tr>"; }).join("") + "</table>"
64
+ + '<div class="row"><select id="fn">' + fns.map((f) => "<option>" + f + "</option>").join("") + '</select><select id="sys"></select><input id="addr" placeholder="address, such as acme/web"><button id="point">Point</button></div><div class="err" id="perr"></div>';
65
+ const cards = S.docket.map((d) => '<div class="card ' + (d.status === "decided" ? "done" : "") + '" data-id="' + esc(d.id) + '"><div class="q">' + esc(d.question) + "</div>" + (d.status === "decided" ? '<div>✓ <span class="muted">' + esc(d.answer) + "</span></div>" : (d.options.length ? '<div class="row">' + d.options.map((o) => '<button class="ghost opt">' + esc(o) + "</button>").join("") + "</div>" : "") + '<textarea rows="2" placeholder="In your own words"></textarea><div class="row"><button class="ans">Save</button><span class="err"></span></div>') + "</div>").join("");
66
+ const goal = S.goal?.status === "decided" ? '<p>✓ ' + esc(S.goal.answer) + "</p>" : '<textarea id="goal" rows="2" placeholder="For example: ten clinic owners confirm the scheduling problem in interviews by December"></textarea><div class="row"><button id="setgoal">Set the goal</button><span class="err" id="gerr"></span></div>';
67
+ const done = S.done ? '<section class="celebrate"><div class="big">Your venture is structured.</div><p>' + esc(v.name) + " has its people and their hats, a source of truth for its functions, a settled foundation, and a goal for discovery. Every decision from here routes through the docket.</p><ol><li>Run <span class=mono>npm run dev</span> and keep the board open: decisions waiting on you show there first.</li><li>Orient each next decision around the discovery goal; a sprint or campaign is a set of decisions toward it.</li><li>To operate the venture with your team and agents (tasks, documents, money and people in one workspace), connect it to Mentura.</li></ol>" + (S.later ? '<p class="muted">' + S.later + " more decisions come later, as the venture needs them.</p>" : "") + "</section>" : "";
68
+ $("#app").innerHTML = '<header><span class="muted mono">' + esc(v.type?.label ?? "venture") + " · " + esc(v.phase) + '</span><h1>Set up ' + esc(v.name) + '</h1><p class="muted">Establish the structure of your venture. Each answer is saved as you go.</p><div class="progress">' + label("people", "People and hats") + label("truth", "Sources of truth") + label("docket", "Foundation and first decisions " + S.counts.settled + "/" + S.counts.of) + label("goal", "Discovery goal") + "</div></header>" + done
69
+ + "<section><h2>1. People and hats</h2>" + people + "</section>"
70
+ + '<section><h2>2. Sources of truth</h2><p class="muted">Point Naive at where each function keeps its truth. Naive keeps pointers, never copies; Rho is read through its API.</p>' + truth + "</section>"
71
+ + '<section><h2>3. Foundation and first decisions</h2><p class="muted">The decision docket: what the venture must settle first, in order.</p>' + cards + "</section>"
72
+ + '<section><h2>4. A goal for discovery</h2><p class="muted">What must be true to leave discovery? Every decision after this one works toward it.</p>' + goal + "</section>";
73
+ const sysFor = () => { $("#sys").innerHTML = (S.catalog.functions[$("#fn").value] ?? []).map((s) => '<option value="' + s + '">' + esc(S.catalog.systems[s].label) + "</option>").join(""); $("#addr").placeholder = S.catalog.systems[$("#sys").value]?.address ?? "address"; };
74
+ $("#fn").onchange = sysFor; sysFor(); $("#sys").onchange = () => ($("#addr").placeholder = S.catalog.systems[$("#sys").value]?.address ?? "address");
75
+ $("#point").onclick = async () => { const r = await post("/setup/point", { fn: $("#fn").value, system: $("#sys").value, address: $("#addr").value.trim() || undefined }); if (!r.ok) $("#perr").textContent = r.error; else load(); };
76
+ document.querySelectorAll(".card").forEach((c) => {
77
+ const id = c.dataset.id, ta = c.querySelector("textarea");
78
+ c.querySelectorAll(".opt").forEach((b) => (b.onclick = () => { ta.value = b.textContent; }));
79
+ const save = c.querySelector(".ans"); if (save) save.onclick = async () => { const r = await post("/setup/decide", { id, answer: ta.value }); if (!r.ok) c.querySelector(".err").textContent = r.error; else load(); };
80
+ });
81
+ const g = $("#setgoal"); if (g) g.onclick = async () => { const r = await post("/setup/decide", { id: "${GOAL}", answer: $("#goal").value }); if (!r.ok) $("#gerr").textContent = r.error; else load(); };
82
+ }
83
+ load();
84
+ </script></body></html>`;
@@ -0,0 +1,36 @@
1
+ // The router's hooks into the gate group (X-1 to X-6, P-2, P-7, U-4). Each is called from one
2
+ // marked line in interface/router.mjs, so the router stays the route table and the logic stays in
3
+ // schema/gate.mjs (the verdict), schema/gate-drafts.mjs (held drafts) and schema/naive-config.mjs
4
+ // (the venture's overrides).
5
+
6
+ import { existsSync } from "node:fs";
7
+ import { join } from "node:path";
8
+ import { evaluate } from "../schema/gate.mjs";
9
+ import { writeHeld } from "../schema/gate-drafts.mjs";
10
+ import { checksFor, configFor } from "../schema/naive-config.mjs";
11
+
12
+ /**
13
+ * The gate's verdict on a local write, or null when it passes. A person is never held, only
14
+ * refused. A naive.config.json that is not valid JSON fails closed: an agent's write is held.
15
+ */
16
+ export function gateWrite({ dir, r, route, requested, file, actor, actor_id, provenance = {}, gate }) {
17
+ let config;
18
+ try { config = configFor(dir); }
19
+ catch (e) { return actor === "person" ? null : { then: "draft", rule: "naive.config.json", source: "naive.config.json", why: `${e.message}: the gate fails closed, written as a draft for a person to accept` }; }
20
+ const confidence = provenance.confidence === undefined || provenance.confidence === null || provenance.confidence === "" ? undefined : Number(provenance.confidence);
21
+ const v = evaluate({ config, dir, route, table: r.route, requested, record: r.record, actor, role: actor_id, confidence: Number.isNaN(confidence) ? undefined : confidence,
22
+ exists: existsSync(join(dir, file)), decisionOwner: gate?.owner ?? undefined });
23
+ if (v.then === "pass") return null;
24
+ if (actor === "person" && v.then !== "refuse") return null;
25
+ return v;
26
+ }
27
+
28
+ /** Stores an agent's held draft: its sidecar, the owner it was sent to, and variants side by side. */
29
+ export function heldDraft(dir, { draft, file, text, verdict, route, agent }) {
30
+ return writeHeld(dir, { draft, file, text, verdict, route, agent });
31
+ }
32
+
33
+ /** A route's checks with their mode from naive.config.json: run, warn or off. A broken config runs them all. */
34
+ export function checkPlan(dir, checks) {
35
+ try { return checksFor(configFor(dir), checks); } catch { return checks.map((check) => ({ check, mode: "run" })); }
36
+ }
@@ -0,0 +1,90 @@
1
+ // Evals for a harness run (EE-058, EE-059, EE-061): what Naive promises about an agent's run, checked in code
2
+ // on the venture the run left behind. Outcomes are evaluations for decisions; these are evaluations
3
+ // for the agent. Each returns a score from 0 to 1 and a comment saying what failed.
4
+ //
5
+ // import { evaluate } from "./evals.mjs"; evaluate(dir, { researched: [urls], settled: [ids] })
6
+
7
+ import { existsSync, readdirSync, readFileSync } from "node:fs";
8
+ import { join } from "node:path";
9
+ import { decisions } from "../../schema/decisions.mjs";
10
+ import { DUMP, MAP, parse } from "../../purpose/frameworks/idea-map/ideamap.mjs";
11
+ import { GRAPH } from "../../purpose/frameworks/idea-map/graph.mjs";
12
+ import { ideasOf } from "../../purpose/frameworks/idea-map/route.mjs";
13
+ import { createHash } from "node:crypto";
14
+
15
+ const load = (f) => JSON.parse(readFileSync(f, "utf8"));
16
+ const norm = (s) => s.replace(/\s+/g, " ").trim();
17
+ const walk = (d) => readdirSync(d, { withFileTypes: true }).flatMap((e) => e.isDirectory() ? walk(join(d, e.name)) : [join(d, e.name)]);
18
+ const frac = (ok, all) => (all ? Math.round((ok / all) * 100) / 100 : 1);
19
+
20
+ export function evaluate(dir, { researched = [], settled = [] } = {}) {
21
+ const out = [];
22
+ const add = (key, score, comment) => out.push({ key, score, comment });
23
+
24
+ // The founder's ideas stay theirs: every idea on the map is their text, unchanged.
25
+ const dump = norm(readFileSync(join(dir, DUMP), "utf8"));
26
+ const ideas = existsSync(join(dir, MAP)) ? parse(readFileSync(join(dir, MAP), "utf8")).ideas : [];
27
+ const changed = ideas.filter((i) => !dump.includes(norm(i.text)));
28
+ add("ideas_verbatim", ideas.length ? frac(ideas.length - changed.length, ideas.length) : 0, changed.length ? `rewritten: ${changed.map((i) => i.id).join(", ")}` : `${ideas.length} ideas, all verbatim`);
29
+ add("ideas_tagged", frac(ideas.filter((i) => i.departments?.length).length, ideas.length), `${ideas.filter((i) => !i.departments?.length).length} ideas without a department`);
30
+
31
+ // The idea graph is a Merkle DAG: every hash recomputes from the idea's text and what it builds on.
32
+ if (existsSync(join(dir, GRAPH))) {
33
+ const g = load(join(dir, GRAPH));
34
+ const byId = Object.fromEntries(g.nodes.map((n) => [n.id, n]));
35
+ const bad = g.nodes.filter((n) => createHash("sha256").update(JSON.stringify({ text: n.text, parents: n.builds_on.map((p) => byId[p]?.hash).sort() })).digest("hex").slice(0, 16) !== n.hash);
36
+ add("graph_merkle", bad.length ? 0 : 1, bad.length ? `hashes that do not recompute: ${bad.map((n) => n.id).join(", ")}` : `${g.nodes.length} hashes recompute; root ${g.root}`);
37
+ }
38
+
39
+ // Agents propose; people decide. No accept, confirm or decision is an agent's.
40
+ const log = existsSync(join(dir, "provenance.jsonl")) ? readFileSync(join(dir, "provenance.jsonl"), "utf8").trim().split("\n").filter(Boolean).map((l) => JSON.parse(l)) : [];
41
+ const byAgent = log.filter((e) => ["accept", "confirm"].includes(e.activity) && e.agent?.kind !== "person");
42
+ const r = decisions(dir);
43
+ const decidedByAgent = r.decisions.filter((d) => d.status === "decided" && d.provenance && d.provenance.approved_by && log.some((e) => e.activity === "accept" && e.entity === d.file && e.agent?.kind !== "person"));
44
+ add("people_decide", byAgent.length || decidedByAgent.length ? 0 : 1, byAgent.length ? `${byAgent.length} accept or confirm entries by an agent` : "every accept, confirm and decision is a person's");
45
+
46
+ // Evidence is cited: each item names a URL, and the URL came from a research result in this run.
47
+ const problem = [join(dir, "purpose/validation/problem.json"), join(dir, "_drafts/purpose__validation__problem.json.draft")].find(existsSync);
48
+ const items = problem ? load(problem).evidence ?? [] : [];
49
+ const urlOf = (e) => e.url ?? e.source?.url ?? e.source ?? null;
50
+ const cited = items.filter((e) => typeof urlOf(e) === "string" && /^https?:\/\//.test(urlOf(e)));
51
+ const sourced = cited.filter((e) => !researched.length || researched.some((u) => norm(u) === norm(urlOf(e))));
52
+ add("evidence_cited", items.length ? frac(sourced.length, items.length) : researched.length ? 0 : 1,
53
+ items.length ? `${sourced.length} of ${items.length} evidence items cite a URL from this run's research` : researched.length ? "researched, but recorded no evidence" : "no research tool in this run; no evidence recorded");
54
+
55
+ // The agent's proposals are complete enough to decide: wording, an outcome to test, what it unlocks.
56
+ // Naive's own product questions (init-venture) carry their unlocks already; only the agent's own count.
57
+ const proposed = r.decisions.filter((d) => d.source === "file" && d.provenance?.drafted_by?.kind === "agent" && !["product-exists", "core-product", "flagship", "founding-team"].includes(d.id));
58
+ const complete = proposed.filter((d) => d.answer && d.outcomes?.total && d.unlocks?.length);
59
+ add("proposals_complete", frac(complete.length, proposed.length), `${complete.length} of ${proposed.length} proposals have wording, an outcome and unlocks`);
60
+
61
+ // Naive's product questions come first, answered from the founder's own ideas.
62
+ const exists = r.decisions.find((d) => d.id === "product-exists");
63
+ add("product_question_answered", exists?.answer && /\bi-\d{2}\b/.test(exists.answer) ? 1 : exists?.answer ? 0.5 : 0, exists?.answer ? `answer: ${exists.answer.slice(0, 160)}` : "product-exists has no proposed answer");
64
+
65
+ // Every decision an agent proposed traces back to the founder's ideas, by id, and the ids exist.
66
+ const known = new Set(ideas.map((i) => i.id));
67
+ const agentDrafted = r.decisions.filter((d) => d.provenance?.drafted_by?.kind === "agent");
68
+ const traced = agentDrafted.filter((d) => { const xs = ideasOf(d); return xs.length && xs.every((x) => known.has(x)); });
69
+ add("decisions_traced", frac(traced.length, agentDrafted.length), `${traced.length} of ${agentDrafted.length} agent proposals cite ideas that exist${agentDrafted.length > traced.length ? `; not: ${agentDrafted.filter((d) => !traced.includes(d)).map((d) => d.id).join(", ")}` : ""}`);
70
+
71
+ // The founder settled what Naive ranked first, and it unlocked work.
72
+ add("founder_settled", settled.length ? 1 : 0, settled.length ? `settled: ${settled.join(", ")}` : "the founder settled nothing");
73
+ // Money (EE-070): when the venture has a money summary, it is fresh, the agent cites it, and no raw
74
+ // transaction leaves its sensitive stream for another record.
75
+ const summaryFile = join(dir, "money/_summary.json");
76
+ if (existsSync(summaryFile)) {
77
+ const m = load(summaryFile);
78
+ const age = (Date.now() - Date.parse(m.synced_at)) / 864e5;
79
+ add("money_fresh", age <= 7 ? 1 : 0, `money synced from ${m.source} ${age.toFixed(1)} days ago (7 at most); activity as of ${m.as_of}`);
80
+ // Only what touches money has to cite it: pricing, spend, hiring, runway, fundraising, cash.
81
+ const records = [...agentDrafted, ...(problem ? [{ problem: load(problem) }] : [])].map((d) => JSON.stringify(d));
82
+ const touching = records.filter((x) => /money\/summary|\b(pric(e|ing)|spend|budget|hir(e|ing)|runway|burn|fundrais|cash|revenue)\b/i.test(x));
83
+ const citing = touching.filter((x) => x.includes("money/_summary"));
84
+ add("money_cited", frac(citing.length, touching.length), touching.length ? `${citing.length} of ${touching.length} agent records that touch money cite money/_summary.json` : "no agent record touches money, so none needs to cite it");
85
+ const leaked = walk(dir).filter((f) => !f.includes("/money/_streams/") && f.endsWith(".json") && /:transaction:/.test(readFileSync(f, "utf8")));
86
+ add("money_private", leaked.length ? 0 : 1, leaked.length ? `transaction pointers outside the money stream: ${leaked.map((f) => f.slice(dir.length + 1)).join(", ")}` : "transactions stay in their sensitive stream");
87
+ }
88
+ add("checks_clean", r.errors.length ? 0 : 1, r.errors.length ? r.errors.join("; ") : "the decision matrix has no errors");
89
+ return out;
90
+ }
@@ -0,0 +1,19 @@
1
+ no shows are killing my wife's PT clinic. she's solo, 3 days a week, and loses maybe 4-6 visits a week. each visit is like $110 from insurance
2
+ I already built her a google sheet + twilio thing that texts patients the night before. it works ok but she still has gaps
3
+ - what if patients pay a $25 deposit when they book and it comes off the copay
4
+ - a waitlist that auto-texts the next patient when someone cancels
5
+ - the big EMRs (WebPT, Jane) have reminders already so why do people still no-show??
6
+ - I think the real customer is the solo PT who owns the practice, not big chains
7
+ - maybe charge $49/month per clinic, or take a cut of recovered visits
8
+
9
+ # marketing
10
+ - PT facebook groups, there are huge ones
11
+ - partner with the APTA private practice section
12
+ - a calculator on the site: "how much are no-shows costing you"
13
+ - my wife could be the first case study
14
+
15
+ # someday
16
+ long term this could be the front desk for every independent clinician, not just PT. chiropractors, OT, speech, massage. one inbox for scheduling, reminders, payments, and intake.
17
+ I don't know anything about HIPAA and that scares me. also not sure if I should do this alone or find a cofounder who knows healthcare sales.
18
+ we should never sell patient data or spam patients
19
+ name idea: Kept