naive-framework 0.1.0 → 0.3.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.
- package/AGENTS.md +2 -1
- package/docs/decisions/decisions.json +42 -0
- package/docs/reference/ROUTES.md +36 -37
- package/evidence/skills/fidelity-ladder-audit/ladder-census.mjs +2 -1
- package/governance/layer.json +2 -1
- package/governance/venture-template/roles/venture-roles.json +62 -0
- package/interface/acting.mjs +83 -0
- package/interface/adapters/claude-code.json +16 -0
- package/interface/adapters/codex.json +14 -0
- package/interface/adapters/cursor.json +16 -0
- package/interface/adapters.mjs +183 -0
- package/interface/api/server.mjs +4 -2
- package/interface/boundaries.mjs +219 -0
- package/interface/brand.mjs +215 -0
- package/interface/cli/freshness.mjs +59 -0
- package/interface/cli/guard.mjs +6 -0
- package/interface/cli/mentura.mjs +82 -11
- package/interface/cli/naive.mjs +44 -14
- package/interface/context.mjs +525 -0
- package/interface/demo/board.mjs +9 -8
- package/interface/demo/decision-harness.mjs +4 -3
- package/interface/dev/setup.mjs +84 -0
- package/interface/gate-hooks.mjs +37 -0
- package/interface/harness/evals.mjs +10 -9
- package/interface/harness/run.mjs +16 -15
- package/interface/instrumentation.mjs +87 -0
- package/interface/kit-boundary.mjs +73 -0
- package/interface/layer.json +8 -2
- package/interface/mcp/server.mjs +47 -7
- package/interface/package-routes.mjs +197 -0
- package/interface/provenance.mjs +28 -4
- package/interface/reads.mjs +174 -0
- package/interface/release-card.mjs +43 -0
- package/interface/router.mjs +110 -36
- package/interface/skills/naive-setup/SKILL.md +71 -0
- package/interface/skills/naive-setup/artifact.html +83 -0
- package/interface/vitals.mjs +116 -0
- package/interface/writes.mjs +190 -0
- package/knowledge/connectors/catalog.mjs +3 -2
- package/knowledge/connectors/filesystem.mjs +10 -5
- package/knowledge/connectors/index.mjs +3 -2
- package/knowledge/freshness.json +85 -0
- package/knowledge/layer.json +11 -3
- package/knowledge/templates/glossary.md +23 -0
- package/operations/layer.json +10 -3
- package/operations/marketing/check-public.mjs +7 -6
- package/operations/marketing/site/plan.mjs +4 -3
- package/operations/marketing/site/presence.mjs +4 -3
- package/operations/templates/marketing-brand.md +46 -0
- package/operations/templates/public-assets.md +39 -0
- package/package.json +3 -1
- package/packages/catalog.json +8 -0
- package/packages/customers/package.json +21 -1
- package/packages/deals/package.json +27 -0
- package/packages/decisions/package.json +12 -1
- package/packages/finance/frames/fund-without-ceding-control.frame.json +177 -0
- package/packages/foundation/package.json +8 -1
- package/packages/fund/package.json +48 -0
- package/packages/marketing/package.json +10 -4
- package/packages/money/package.json +24 -3
- package/packages/validation/package.json +13 -0
- package/platform/README.md +6 -0
- package/platform/adapter.json +15 -0
- package/platform/integrations/remote-image.mjs +79 -0
- package/platform/integrations/rho.mjs +9 -7
- package/platform/kits/README.md +8 -1
- package/platform/kits/agent-upgrade/kit.json +15 -0
- package/platform/kits/agent-upgrade/run.mjs +82 -0
- package/platform/kits/agent-upgrade/stand-in-agent.mjs +32 -0
- package/platform/kits/validation-kickoff/kit.json +29 -0
- package/platform/webhooks/server.mjs +70 -0
- package/purpose/frameworks/idea-map/ideamap.mjs +4 -2
- package/purpose/frameworks/idea-map/route.mjs +5 -4
- package/purpose/frameworks/product-anatomy/anatomy.mjs +2 -1
- package/schema/README.md +1 -0
- package/schema/access.mjs +58 -0
- package/schema/adapter.schema.json +33 -0
- package/schema/add-department.mjs +3 -2
- package/schema/assess-problem.mjs +3 -2
- package/schema/assets.mjs +213 -0
- package/schema/brand.mjs +374 -0
- package/schema/build-release.mjs +61 -0
- package/schema/caching.mjs +506 -0
- package/schema/check-assets.mjs +24 -0
- package/schema/check-brand.mjs +24 -0
- package/schema/check-config.mjs +111 -0
- package/schema/check-data-model.mjs +2 -1
- package/schema/check-data-packages.mjs +5 -4
- package/schema/check-execution.mjs +4 -3
- package/schema/check-nextjs-status.mjs +3 -1
- package/schema/check-people.mjs +84 -0
- package/schema/check-private.mjs +2 -1
- package/schema/check-ready.mjs +6 -5
- package/schema/check-sources.mjs +11 -2
- package/schema/check-where-used.mjs +4 -3
- package/schema/data-model.json +334 -8
- package/schema/deal.schema.json +80 -0
- package/schema/decision-analytics.mjs +2 -1
- package/schema/decisions.mjs +21 -12
- package/schema/examples/frames/judge.mjs +10 -0
- package/schema/examples/venture-type/jev.mjs +12 -0
- package/schema/examples/workspace/ventures/acme-labs/AGENTS.md +17 -0
- package/schema/examples/workspace/ventures/acme-labs/accounts/.gitkeep +0 -0
- package/schema/examples/workspace/ventures/acme-labs/decisions/discovery-goal.decision.json +23 -0
- package/schema/examples/workspace/ventures/acme-labs/decisions/statement-icp.decision.json +22 -0
- package/schema/examples/workspace/ventures/acme-labs/decisions/statement-problem.decision.json +22 -0
- package/schema/examples/workspace/ventures/acme-labs/decisions/venture.team.decision.json +37 -0
- package/schema/examples/workspace/ventures/acme-labs/knowledge/README.md +3 -0
- package/schema/examples/workspace/ventures/acme-labs/knowledge/sources.json +46 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000001.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000002.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000003.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000004.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000005.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000006.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000007.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000008.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000009.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000010.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000011.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000012.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000013.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/30000000-0000-4000-8000-000000000014.json +12 -0
- package/schema/examples/workspace/ventures/acme-labs/money/_streams/transactions/stream.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/money/_summary.json +30 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/customer-service/README.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/customer-service/department.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/finance/README.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/finance/department.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/human-capital/README.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/human-capital/department.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/it/README.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/it/department.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/marketing-and-sales/README.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/marketing-and-sales/department.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/products/README.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/products/department.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/strategy/README.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/operations/departments/strategy/department.json +5 -0
- package/schema/examples/workspace/ventures/acme-labs/people/founders/maya-chen.json +15 -0
- package/schema/examples/workspace/ventures/acme-labs/people/people.json +22 -0
- package/schema/examples/workspace/ventures/acme-labs/pillars/brand.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/pillars/business.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/pillars/product.md +5 -0
- package/schema/examples/workspace/ventures/acme-labs/products/.gitkeep +0 -0
- package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.core-product.decision.json +28 -0
- package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.exists.decision.json +38 -0
- package/schema/examples/workspace/ventures/acme-labs/products/decisions/product.flagship.decision.json +27 -0
- package/schema/examples/workspace/ventures/acme-labs/profile.md +12 -0
- package/schema/examples/workspace/ventures/acme-labs/provenance.jsonl +12 -0
- package/schema/examples/workspace/ventures/acme-labs/raw/dump.md +6 -0
- package/schema/examples/workspace/ventures/acme-labs/venture.json +27 -0
- package/schema/examples/workspace/ventures/northstar/AGENTS.md +17 -0
- package/schema/examples/workspace/ventures/northstar/accounts/.gitkeep +0 -0
- package/schema/examples/workspace/ventures/northstar/deals/ductline.json +8 -0
- package/schema/examples/workspace/ventures/northstar/deals/kilnworks.json +14 -0
- package/schema/examples/workspace/ventures/northstar/decisions/venture.team.decision.json +31 -0
- package/schema/examples/workspace/ventures/northstar/evidence/README.md +3 -0
- package/schema/examples/workspace/ventures/northstar/fund/decisions/terms.decision.json +27 -0
- package/schema/examples/workspace/ventures/northstar/fund/decisions/terms.first-close.decision.json +27 -0
- package/schema/examples/workspace/ventures/northstar/fund/decisions/thesis.decision.json +26 -0
- package/schema/examples/workspace/ventures/northstar/fund/terms.json +22 -0
- package/schema/examples/workspace/ventures/northstar/fund/thesis.json +22 -0
- package/schema/examples/workspace/ventures/northstar/governance/README.md +3 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/external-relationships/charter.md +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/external-relationships/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/finance/charter.md +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/finance/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/human-capital/charter.md +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/human-capital/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/risk-and-compliance/charter.md +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/risk-and-compliance/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/strategy/charter.md +5 -0
- package/schema/examples/workspace/ventures/northstar/governance/departments/strategy/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/knowledge/README.md +3 -0
- package/schema/examples/workspace/ventures/northstar/operations/README.md +3 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/external-relationships/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/external-relationships/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/finance/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/finance/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/human-capital/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/human-capital/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/risk-and-compliance/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/risk-and-compliance/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/strategy/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/operations/departments/strategy/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/people/founders/ana-ruiz.json +13 -0
- package/schema/examples/workspace/ventures/northstar/people/founders/ben-okafor.json +7 -0
- package/schema/examples/workspace/ventures/northstar/people/people.json +27 -0
- package/schema/examples/workspace/ventures/northstar/pillars/brand.md +5 -0
- package/schema/examples/workspace/ventures/northstar/pillars/business.md +5 -0
- package/schema/examples/workspace/ventures/northstar/pillars/product.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/AGENTS.md +17 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/accounts/.gitkeep +0 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/decisions/venture.team.decision.json +31 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/knowledge/README.md +3 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/customer-service/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/customer-service/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/finance/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/finance/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/human-capital/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/human-capital/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/it/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/it/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/marketing-and-sales/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/marketing-and-sales/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/products/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/products/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/strategy/README.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/operations/departments/strategy/department.json +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/brand.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/business.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/pillars/product.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/.gitkeep +0 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.core-product.decision.json +28 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.exists.decision.json +32 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/products/decisions/product.flagship.decision.json +27 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/profile.md +5 -0
- package/schema/examples/workspace/ventures/northstar/portfolio/kilnworks/venture.json +27 -0
- package/schema/examples/workspace/ventures/northstar/products/.gitkeep +0 -0
- package/schema/examples/workspace/ventures/northstar/profile.md +5 -0
- package/schema/examples/workspace/ventures/northstar/provenance.jsonl +3 -0
- package/schema/examples/workspace/ventures/northstar/purpose/README.md +3 -0
- package/schema/examples/workspace/ventures/northstar/venture.json +49 -0
- package/schema/foundation.mjs +8 -7
- package/schema/founder.schema.json +72 -0
- package/schema/frame.schema.json +240 -0
- package/schema/frames.mjs +229 -0
- package/schema/freshness-log.schema.json +40 -0
- package/schema/freshness-profiles.schema.json +44 -0
- package/schema/freshness.mjs +474 -0
- package/schema/fund-terms.schema.json +107 -0
- package/schema/fund-thesis.schema.json +87 -0
- package/schema/gate-drafts.mjs +131 -0
- package/schema/gate.mjs +105 -11
- package/schema/glossary.schema.json +25 -0
- package/schema/init-venture.mjs +69 -21
- package/schema/judgment.schema.json +38 -0
- package/schema/kit.schema.json +47 -0
- package/schema/kits.mjs +24 -0
- package/schema/knowledge-sources.schema.json +145 -15
- package/schema/layer.json +16 -3
- package/schema/marketing-brand.schema.json +116 -0
- package/schema/migrate-venture.mjs +8 -7
- package/schema/migrations/kit-to-package.mjs +95 -0
- package/schema/migrations/package-layout.mjs +90 -0
- package/schema/model-steps.mjs +718 -0
- package/schema/money-summary.schema.json +138 -0
- package/schema/naive-config.mjs +166 -0
- package/schema/naive-config.schema.json +268 -0
- package/schema/need-now.json +171 -0
- package/schema/need-now.mjs +8 -6
- package/schema/packages.mjs +21 -15
- package/schema/payouts.mjs +3 -2
- package/schema/people.schema.json +85 -0
- package/schema/port-venture.mjs +206 -132
- package/schema/public-assets.schema.json +76 -0
- package/schema/release-read.mjs +112 -0
- package/schema/releases.mjs +498 -0
- package/schema/run-handoff.mjs +5 -4
- package/schema/setup.mjs +165 -0
- package/schema/stale.mjs +112 -0
- package/schema/start-release.mjs +41 -0
- package/schema/structure.mjs +187 -0
- package/schema/systems-catalog.json +126 -0
- package/schema/systems-catalog.schema.json +78 -0
- package/schema/time-to-ready.mjs +7 -6
- package/schema/trigger.schema.json +44 -0
- package/schema/triggers.mjs +238 -0
- package/schema/upgrade-registry.schema.json +60 -0
- package/schema/upgrade-venture.mjs +96 -118
- package/schema/upgrades.json +69 -0
- package/schema/upgrades.mjs +386 -0
- package/schema/validate.py +19 -10
- package/schema/venture-paths.mjs +85 -0
- package/schema/venture-role.schema.json +64 -0
- package/schema/venture-type.mjs +62 -0
- package/schema/venture-types.json +346 -0
- package/schema/venture-types.schema.json +129 -0
- package/schema/venture.schema.json +61 -0
- package/schema/workspace.schema.json +5 -1
package/schema/data-model.json
CHANGED
|
@@ -48,7 +48,13 @@
|
|
|
48
48
|
"exit",
|
|
49
49
|
"telos",
|
|
50
50
|
"provenance",
|
|
51
|
-
"knowledge-sources"
|
|
51
|
+
"knowledge-sources",
|
|
52
|
+
"people",
|
|
53
|
+
"founder",
|
|
54
|
+
"fund-thesis",
|
|
55
|
+
"fund-terms",
|
|
56
|
+
"deal",
|
|
57
|
+
"money-summary"
|
|
52
58
|
],
|
|
53
59
|
"refs": [
|
|
54
60
|
{
|
|
@@ -495,6 +501,43 @@
|
|
|
495
501
|
],
|
|
496
502
|
"note": "For each fact kept once in its system of record, every place that repeats it; live children must show the parent's value (EE-042)"
|
|
497
503
|
},
|
|
504
|
+
{
|
|
505
|
+
"id": "freshness-profiles",
|
|
506
|
+
"layer": "knowledge",
|
|
507
|
+
"level": "method",
|
|
508
|
+
"schema": "schema/freshness-profiles.schema.json",
|
|
509
|
+
"form": "json",
|
|
510
|
+
"paths": [
|
|
511
|
+
"knowledge/freshness.json"
|
|
512
|
+
],
|
|
513
|
+
"refs": [
|
|
514
|
+
{
|
|
515
|
+
"field": "records",
|
|
516
|
+
"to": "(record types)",
|
|
517
|
+
"checked_by": "schema/freshness-test.mjs"
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"note": "Default freshness profiles by record type (Revalidating V-2): stale, revalidate and expire after Next.js cacheLife, plus per_phase and live; a venture overrides them under freshness in naive.config.json"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"id": "freshness-log",
|
|
524
|
+
"layer": "knowledge",
|
|
525
|
+
"level": "venture",
|
|
526
|
+
"schema": "schema/freshness-log.schema.json",
|
|
527
|
+
"form": "json-lines",
|
|
528
|
+
"paths": [
|
|
529
|
+
"instance/**/knowledge/freshness.jsonl",
|
|
530
|
+
"schema/examples/**/knowledge/freshness.jsonl"
|
|
531
|
+
],
|
|
532
|
+
"refs": [
|
|
533
|
+
{
|
|
534
|
+
"field": "target.value",
|
|
535
|
+
"to": "(venture file)",
|
|
536
|
+
"checked_by": "schema/freshness.mjs"
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
"note": "On-demand revalidations (a tag, a path or a package marked stale), checks that a record is still right, and phase changes: one append-only line each (Revalidating V-1, V-5, V-7)"
|
|
540
|
+
},
|
|
498
541
|
{
|
|
499
542
|
"id": "department-catalog",
|
|
500
543
|
"layer": "operations",
|
|
@@ -979,6 +1022,24 @@
|
|
|
979
1022
|
],
|
|
980
1023
|
"note": "Venture packages (EE-067, EE-069): the assumed governance model; core packages by department (each record's one home, what it reads, priors per phase with conditions, what completion unlocks); handoff packages by receiver; record-level dependencies; the question matrix"
|
|
981
1024
|
},
|
|
1025
|
+
{
|
|
1026
|
+
"id": "frame",
|
|
1027
|
+
"layer": "system",
|
|
1028
|
+
"level": "method",
|
|
1029
|
+
"schema": "schema/frame.schema.json",
|
|
1030
|
+
"form": "json",
|
|
1031
|
+
"paths": [
|
|
1032
|
+
"packages/*/frames/*.frame.json"
|
|
1033
|
+
],
|
|
1034
|
+
"refs": [
|
|
1035
|
+
{
|
|
1036
|
+
"field": "emits.*.id",
|
|
1037
|
+
"to": "decision",
|
|
1038
|
+
"checked_by": "schema/frames-test.mjs"
|
|
1039
|
+
}
|
|
1040
|
+
],
|
|
1041
|
+
"note": "The decision library: one recurring venture problem as a shape (goal, hidden decisions, premises and the attacks on them, a freshness spec, reasoning), never an answer. schema/frames.mjs matches it to the founder's words, judges its premises against the venture and proposes its decisions, open"
|
|
1042
|
+
},
|
|
982
1043
|
{
|
|
983
1044
|
"id": "venture-package",
|
|
984
1045
|
"layer": "system",
|
|
@@ -992,6 +1053,18 @@
|
|
|
992
1053
|
],
|
|
993
1054
|
"note": "The venture package view (EE-067, EE-069): the open core packages and handoffs, each record confirmed, to review or to write, what moves now and what waits, with its versions; the records themselves stay in place"
|
|
994
1055
|
},
|
|
1056
|
+
{
|
|
1057
|
+
"id": "release",
|
|
1058
|
+
"layer": "system",
|
|
1059
|
+
"level": "venture",
|
|
1060
|
+
"schema": null,
|
|
1061
|
+
"form": "json",
|
|
1062
|
+
"paths": [
|
|
1063
|
+
"instance/**/.release/release.json",
|
|
1064
|
+
"instance/**/.release/card.json"
|
|
1065
|
+
],
|
|
1066
|
+
"note": "A release (C-11, I-17): the venture's static shell, written by node schema/build-release.mjs. release.json is the manifest (confirmed records frozen in with their sha256, date and who confirmed them; named live holes; the route table as the release holds it; frozen command answers); card.json is the release card's data (P-25, O-7). The frozen copies under .release/records/ keep their own record types. Read without the router by node schema/start-release.mjs"
|
|
1067
|
+
},
|
|
995
1068
|
{
|
|
996
1069
|
"id": "team-plan",
|
|
997
1070
|
"layer": "operations",
|
|
@@ -1063,6 +1136,35 @@
|
|
|
1063
1136
|
],
|
|
1064
1137
|
"note": "Who or what wrote each record, how, from what and under which decision: one append-only line per write, hash-chained, after W3C PROV (EE-031)"
|
|
1065
1138
|
},
|
|
1139
|
+
{
|
|
1140
|
+
"id": "naive-config",
|
|
1141
|
+
"layer": "system",
|
|
1142
|
+
"level": "venture",
|
|
1143
|
+
"schema": "schema/naive-config.schema.json",
|
|
1144
|
+
"paths": [
|
|
1145
|
+
"instance/**/naive.config.json",
|
|
1146
|
+
"schema/examples/**/naive.config.json"
|
|
1147
|
+
],
|
|
1148
|
+
"decision_class": "security-loosening",
|
|
1149
|
+
"refs": [
|
|
1150
|
+
{
|
|
1151
|
+
"field": "gate.rules.routes",
|
|
1152
|
+
"to": "(routes)",
|
|
1153
|
+
"checked_by": "schema/check-config.mjs"
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
"field": "owners",
|
|
1157
|
+
"to": "team-plan",
|
|
1158
|
+
"checked_by": "schema/check-config.mjs"
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"field": "packages",
|
|
1162
|
+
"to": "venture-packages",
|
|
1163
|
+
"checked_by": "schema/check-config.mjs"
|
|
1164
|
+
}
|
|
1165
|
+
],
|
|
1166
|
+
"note": "The venture's overrides to Naive's defaults (P-2, like next.config.js): the gate's static rules, function owners, check settings, thresholds, which System 1 questions run, pinned package versions and how strictly the acting role is checked. An agent's write of it is a draft, since it can loosen the gate"
|
|
1167
|
+
},
|
|
1066
1168
|
{
|
|
1067
1169
|
"id": "route-aliases",
|
|
1068
1170
|
"layer": "interface",
|
|
@@ -1073,6 +1175,51 @@
|
|
|
1073
1175
|
],
|
|
1074
1176
|
"note": "Old routes kept as aliases of their new ones, so a rename does not break agents (EE-032)"
|
|
1075
1177
|
},
|
|
1178
|
+
{
|
|
1179
|
+
"id": "adapter",
|
|
1180
|
+
"layer": "interface",
|
|
1181
|
+
"level": "method",
|
|
1182
|
+
"schema": "schema/adapter.schema.json",
|
|
1183
|
+
"paths": [
|
|
1184
|
+
"interface/adapters/*.json",
|
|
1185
|
+
"platform/adapter.json"
|
|
1186
|
+
],
|
|
1187
|
+
"note": "What runs Naive on a platform or in an agent harness (Z-4): the entry files a harness adapter writes into a venture and where it loads skills, or the tests a platform adapter runs. Verified when it passes the framework's tests (interface/adapters.mjs verify)"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"id": "upgrade-registry",
|
|
1191
|
+
"layer": "system",
|
|
1192
|
+
"level": "method",
|
|
1193
|
+
"schema": "schema/upgrade-registry.schema.json",
|
|
1194
|
+
"paths": [
|
|
1195
|
+
"schema/upgrades.json"
|
|
1196
|
+
],
|
|
1197
|
+
"refs": [
|
|
1198
|
+
{
|
|
1199
|
+
"field": "versions[].guide",
|
|
1200
|
+
"to": "(repository file)",
|
|
1201
|
+
"checked_by": "schema/upgrades-test.mjs"
|
|
1202
|
+
}
|
|
1203
|
+
],
|
|
1204
|
+
"note": "Naive's versions with their guides, the migrations between them, and each package's version and channel (U-1 to U-6, EE-076). naive upgrade reads it from the installed copy"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"id": "kit",
|
|
1208
|
+
"layer": "system",
|
|
1209
|
+
"level": "method",
|
|
1210
|
+
"schema": "schema/kit.schema.json",
|
|
1211
|
+
"paths": [
|
|
1212
|
+
"platform/kits/*/kit.json"
|
|
1213
|
+
],
|
|
1214
|
+
"refs": [
|
|
1215
|
+
{
|
|
1216
|
+
"field": "extends.package",
|
|
1217
|
+
"to": "venture-packages",
|
|
1218
|
+
"checked_by": null
|
|
1219
|
+
}
|
|
1220
|
+
],
|
|
1221
|
+
"note": "A Mentura kit (EE-071): an enhanced package or command, with its automations (triggers that need a complete package, M-12) or its agent workflow (the agent-run upgrade, U-3). The framework reads it as data and never imports its code (schema/kits.mjs)"
|
|
1222
|
+
},
|
|
1076
1223
|
{
|
|
1077
1224
|
"id": "icp",
|
|
1078
1225
|
"layer": "purpose",
|
|
@@ -1158,6 +1305,17 @@
|
|
|
1158
1305
|
],
|
|
1159
1306
|
"note": "A money master record. Activity is an append-only stream. The package is never complete (EE-070)."
|
|
1160
1307
|
},
|
|
1308
|
+
{
|
|
1309
|
+
"id": "money-summary",
|
|
1310
|
+
"layer": "purpose",
|
|
1311
|
+
"level": "venture",
|
|
1312
|
+
"schema": "schema/money-summary.schema.json",
|
|
1313
|
+
"paths": [
|
|
1314
|
+
"instance/**/money/_summary.json",
|
|
1315
|
+
"schema/examples/**/money/_summary.json"
|
|
1316
|
+
],
|
|
1317
|
+
"note": "Cash, monthly flows and runway from the money source's last sync; versioned, and the only money record a model sees (EE-070)"
|
|
1318
|
+
},
|
|
1161
1319
|
{
|
|
1162
1320
|
"id": "data-stream",
|
|
1163
1321
|
"layer": "purpose",
|
|
@@ -1195,17 +1353,177 @@
|
|
|
1195
1353
|
"schema/examples/**/raw/sources/*/text.md"
|
|
1196
1354
|
],
|
|
1197
1355
|
"note": "The text of a raw source. original.* stays out of git (EE-070)."
|
|
1198
|
-
}
|
|
1199
|
-
],
|
|
1200
|
-
"ignore": [
|
|
1356
|
+
},
|
|
1201
1357
|
{
|
|
1202
|
-
"
|
|
1203
|
-
"
|
|
1358
|
+
"id": "judgment",
|
|
1359
|
+
"layer": "knowledge",
|
|
1360
|
+
"level": "venture",
|
|
1361
|
+
"schema": "schema/judgment.schema.json",
|
|
1362
|
+
"paths": [
|
|
1363
|
+
"instance/**/knowledge/judgments/*.json",
|
|
1364
|
+
"schema/examples/**/knowledge/judgments/*.json"
|
|
1365
|
+
],
|
|
1366
|
+
"refs": [
|
|
1367
|
+
{
|
|
1368
|
+
"field": "package",
|
|
1369
|
+
"to": "(packages and kits)",
|
|
1370
|
+
"checked_by": "schema/model-steps.mjs"
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"field": "decision",
|
|
1374
|
+
"to": "decision-record",
|
|
1375
|
+
"checked_by": "schema/model-steps.mjs"
|
|
1376
|
+
}
|
|
1377
|
+
],
|
|
1378
|
+
"note": "The typed output of one model step (use model, EE-073): what it read, its answer and confidence, and whether code accepted, overruled or routed it to a person as uncertain. The agent's until a person confirms it (schema/model-steps.mjs)"
|
|
1204
1379
|
},
|
|
1205
1380
|
{
|
|
1206
|
-
"
|
|
1207
|
-
"
|
|
1381
|
+
"id": "venture-types",
|
|
1382
|
+
"layer": "system",
|
|
1383
|
+
"level": "method",
|
|
1384
|
+
"schema": "schema/venture-types.schema.json",
|
|
1385
|
+
"paths": [
|
|
1386
|
+
"schema/venture-types.json"
|
|
1387
|
+
],
|
|
1388
|
+
"note": "The venture types create-venture scaffolds, and what each starts with (EE-082)"
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"id": "venture-role",
|
|
1392
|
+
"layer": "governance",
|
|
1393
|
+
"level": "method",
|
|
1394
|
+
"schema": "schema/venture-role.schema.json",
|
|
1395
|
+
"paths": [
|
|
1396
|
+
"governance/venture-template/roles/venture-roles.json"
|
|
1397
|
+
],
|
|
1398
|
+
"note": "Roles a person can hold in a venture, beside the agent roles (EE-082)"
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"id": "people",
|
|
1402
|
+
"layer": "operations",
|
|
1403
|
+
"level": "venture",
|
|
1404
|
+
"schema": "schema/people.schema.json",
|
|
1405
|
+
"paths": [
|
|
1406
|
+
"instance/**/people/people.json",
|
|
1407
|
+
"schema/examples/**/people/people.json"
|
|
1408
|
+
],
|
|
1409
|
+
"note": "The venture's people: role and hats per person; venture.json for human capital (EE-082)"
|
|
1208
1410
|
},
|
|
1411
|
+
{
|
|
1412
|
+
"id": "founder",
|
|
1413
|
+
"layer": "operations",
|
|
1414
|
+
"level": "venture",
|
|
1415
|
+
"schema": "schema/founder.schema.json",
|
|
1416
|
+
"paths": [
|
|
1417
|
+
"instance/**/people/founders/*.json",
|
|
1418
|
+
"schema/examples/**/people/founders/*.json"
|
|
1419
|
+
],
|
|
1420
|
+
"note": "One file per founder, linked to the founder agreement (EE-082)"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"id": "fund-thesis",
|
|
1424
|
+
"layer": "purpose",
|
|
1425
|
+
"level": "venture",
|
|
1426
|
+
"schema": "schema/fund-thesis.schema.json",
|
|
1427
|
+
"paths": [
|
|
1428
|
+
"instance/**/fund/thesis.json",
|
|
1429
|
+
"schema/examples/**/fund/thesis.json"
|
|
1430
|
+
],
|
|
1431
|
+
"note": "A fund's thesis (EE-082)"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"id": "fund-terms",
|
|
1435
|
+
"layer": "purpose",
|
|
1436
|
+
"level": "venture",
|
|
1437
|
+
"schema": "schema/fund-terms.schema.json",
|
|
1438
|
+
"paths": [
|
|
1439
|
+
"instance/**/fund/terms.json",
|
|
1440
|
+
"schema/examples/**/fund/terms.json"
|
|
1441
|
+
],
|
|
1442
|
+
"note": "A fund's terms and closes (EE-082)"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"id": "deal",
|
|
1446
|
+
"layer": "purpose",
|
|
1447
|
+
"level": "venture",
|
|
1448
|
+
"schema": "schema/deal.schema.json",
|
|
1449
|
+
"paths": [
|
|
1450
|
+
"instance/**/deals/*.json",
|
|
1451
|
+
"schema/examples/**/deals/*.json"
|
|
1452
|
+
],
|
|
1453
|
+
"note": "A company in a fund's pipeline (EE-082)"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"id": "systems-catalog",
|
|
1457
|
+
"layer": "knowledge",
|
|
1458
|
+
"level": "method",
|
|
1459
|
+
"schema": "schema/systems-catalog.schema.json",
|
|
1460
|
+
"paths": [
|
|
1461
|
+
"schema/systems-catalog.json"
|
|
1462
|
+
],
|
|
1463
|
+
"note": "The systems of record create-venture offers per function (EE-083)"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"id": "glossary",
|
|
1467
|
+
"layer": "knowledge",
|
|
1468
|
+
"level": "venture",
|
|
1469
|
+
"schema": "schema/glossary.schema.json",
|
|
1470
|
+
"paths": [
|
|
1471
|
+
"instance/**/glossary/*.json",
|
|
1472
|
+
"schema/examples/**/glossary/*.json"
|
|
1473
|
+
],
|
|
1474
|
+
"refs": [
|
|
1475
|
+
{
|
|
1476
|
+
"field": "terms[].export",
|
|
1477
|
+
"to": "glossary",
|
|
1478
|
+
"checked_by": "schema/check-brand.mjs"
|
|
1479
|
+
}
|
|
1480
|
+
],
|
|
1481
|
+
"note": "A package's own terms, at glossary/<package>.json (Y-2): local to the package unless exported, so an agent in another package sees only exported terms; glossary/terms shows what one package sees"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"id": "marketing-brand",
|
|
1485
|
+
"layer": "operations",
|
|
1486
|
+
"level": "venture",
|
|
1487
|
+
"schema": "schema/marketing-brand.schema.json",
|
|
1488
|
+
"paths": [
|
|
1489
|
+
"instance/**/marketing/brand.json",
|
|
1490
|
+
"schema/examples/**/marketing/brand.json"
|
|
1491
|
+
],
|
|
1492
|
+
"refs": [
|
|
1493
|
+
{
|
|
1494
|
+
"field": "marks[].asset",
|
|
1495
|
+
"to": "public-assets",
|
|
1496
|
+
"checked_by": "schema/check-brand.mjs"
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"field": "typefaces[].files",
|
|
1500
|
+
"to": "public-assets",
|
|
1501
|
+
"checked_by": "schema/check-brand.mjs"
|
|
1502
|
+
}
|
|
1503
|
+
],
|
|
1504
|
+
"decision_class": "experience-design",
|
|
1505
|
+
"note": "Brand tokens in the marketing package (Y-3): colors, licensed self-hosted typefaces (T-1), the font each role uses with scopes where nearer context wins (Y-5, T-2), voice rules (the global stylesheet for words), the logo and marks (P-24) and outside design systems by reference (Y-4). Read by every agent's layout; marketing/brand/tokens renders it for interfaces"
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
"id": "public-assets",
|
|
1509
|
+
"layer": "operations",
|
|
1510
|
+
"level": "venture",
|
|
1511
|
+
"schema": "schema/public-assets.schema.json",
|
|
1512
|
+
"paths": [
|
|
1513
|
+
"instance/**/public/assets.json",
|
|
1514
|
+
"schema/examples/**/public/assets.json"
|
|
1515
|
+
],
|
|
1516
|
+
"refs": [
|
|
1517
|
+
{
|
|
1518
|
+
"field": "remote[].id",
|
|
1519
|
+
"to": "raw-source",
|
|
1520
|
+
"checked_by": "schema/check-assets.mjs"
|
|
1521
|
+
}
|
|
1522
|
+
],
|
|
1523
|
+
"note": "The register of what the venture ships as it is, in public/ (I-23, J-2, J-3, J-4): each file's source, license and credit, facts code reads from its bytes, alt text and who wrote it; remote images as links with a note in raw/; the hosts an agent may fetch from"
|
|
1524
|
+
}
|
|
1525
|
+
],
|
|
1526
|
+
"ignore": [
|
|
1209
1527
|
{
|
|
1210
1528
|
"path": "site/package.json",
|
|
1211
1529
|
"reason": "The developer-docs site's npm manifest (EE-034); not a record"
|
|
@@ -1253,6 +1571,14 @@
|
|
|
1253
1571
|
{
|
|
1254
1572
|
"path": "site/content/marketing/meta.json",
|
|
1255
1573
|
"reason": "Fumadocs sidebar order for marketing pages (EE-080); not a record"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"path": "package.json",
|
|
1577
|
+
"reason": "The framework's npm manifest: the naive and mentura commands (I-1, I-17); not a record"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
"path": "interface/create-venture/package.json",
|
|
1581
|
+
"reason": "The create-venture generator's npm manifest (I-1); not a record"
|
|
1256
1582
|
}
|
|
1257
1583
|
]
|
|
1258
1584
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "deal.schema.json",
|
|
4
|
+
"title": "Deal",
|
|
5
|
+
"description": "One company in the fund's pipeline (deals/<id>.json), from sourced to invested or passed. An investment it makes becomes a nested venture under portfolio/.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"id",
|
|
9
|
+
"company",
|
|
10
|
+
"round",
|
|
11
|
+
"status"
|
|
12
|
+
],
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"id": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[a-z0-9-]+$"
|
|
18
|
+
},
|
|
19
|
+
"company": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"round": {
|
|
23
|
+
"enum": [
|
|
24
|
+
"pre-seed",
|
|
25
|
+
"seed",
|
|
26
|
+
"series-a",
|
|
27
|
+
"series-b",
|
|
28
|
+
"growth",
|
|
29
|
+
"late"
|
|
30
|
+
],
|
|
31
|
+
"description": "The financing round the company is raising"
|
|
32
|
+
},
|
|
33
|
+
"status": {
|
|
34
|
+
"enum": [
|
|
35
|
+
"sourced",
|
|
36
|
+
"screening",
|
|
37
|
+
"diligence",
|
|
38
|
+
"term-sheet",
|
|
39
|
+
"invested",
|
|
40
|
+
"passed"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"sector": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"source": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"check": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": [
|
|
52
|
+
"amount",
|
|
53
|
+
"currency"
|
|
54
|
+
],
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"properties": {
|
|
57
|
+
"amount": {
|
|
58
|
+
"type": "number",
|
|
59
|
+
"minimum": 0
|
|
60
|
+
},
|
|
61
|
+
"currency": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^[A-Z]{3}$"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"thesis_fit": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "How the company fits fund/thesis.json, in a sentence"
|
|
70
|
+
},
|
|
71
|
+
"portfolio": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^portfolio/[a-z0-9-]+$",
|
|
74
|
+
"description": "The nested venture, once invested"
|
|
75
|
+
},
|
|
76
|
+
"note": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -19,6 +19,7 @@ import { readFileSync } from "node:fs";
|
|
|
19
19
|
import { join } from "node:path";
|
|
20
20
|
import { decisions } from "./decisions.mjs";
|
|
21
21
|
import { HOME, PACKAGES, TITLES } from "./packages.mjs";
|
|
22
|
+
import { ventureFile } from "./venture-paths.mjs";
|
|
22
23
|
|
|
23
24
|
const load = (f) => JSON.parse(readFileSync(f, "utf8"));
|
|
24
25
|
const titleOf = (t) => ({ icp: "ICP", "venture-core": "Core product" })[t] ?? TITLES[t] ?? t.replace(/^validation-/, "").replace(/-/g, " ").replace(/^./, (c) => c.toUpperCase());
|
|
@@ -30,7 +31,7 @@ const OPEN = new Set(["now", "overdue", "waiting", "stale", "later"]);
|
|
|
30
31
|
export function analytics(dir, now) {
|
|
31
32
|
const r = decisions(dir, now);
|
|
32
33
|
const rows = r.decisions.filter((d) => d.source !== "root").map((d) => {
|
|
33
|
-
const raw = d.file ? load(
|
|
34
|
+
const raw = d.file ? load(ventureFile(dir, d.file)) : {};
|
|
34
35
|
const record = d.decides?.record ?? null;
|
|
35
36
|
// A foundation statement belongs to the strategic foundation whatever record holds it; so does a
|
|
36
37
|
// decision about venture.json itself (the core product, the team).
|
package/schema/decisions.mjs
CHANGED
|
@@ -30,6 +30,9 @@ import { dirname, join, relative } from "node:path";
|
|
|
30
30
|
import { FRAME, foundation } from "./foundation.mjs";
|
|
31
31
|
import { agentFromEnv, record as prov } from "../interface/provenance.mjs";
|
|
32
32
|
import { glob as routeFileGlob, routes } from "../interface/router.mjs";
|
|
33
|
+
// Caching hook (F-12): the decision list is computed once per router action (schema/caching.mjs).
|
|
34
|
+
import { memo } from "./caching.mjs";
|
|
35
|
+
import { layoutOf, logicalFiles, ventureFile } from "./venture-paths.mjs";
|
|
33
36
|
|
|
34
37
|
const repo = new URL("..", import.meta.url).pathname;
|
|
35
38
|
const load = (f) => JSON.parse(readFileSync(f, "utf8"));
|
|
@@ -45,7 +48,9 @@ export function recordOf(file) {
|
|
|
45
48
|
|
|
46
49
|
// Every *.decision.json in a venture, outside drafts, hidden folders and nested ventures.
|
|
47
50
|
function decisionFiles(dir, sub = "") {
|
|
48
|
-
|
|
51
|
+
// A structured venture (EE-086): its decision files by their logical paths.
|
|
52
|
+
if (!sub && layoutOf(dir) === "structured") return logicalFiles(dir).filter((r) => r.endsWith(".decision.json") && r.split("/").at(-2) === "decisions" && !r.split("/").some((s) => s.startsWith(".") || s.startsWith("_")));
|
|
53
|
+
return readdirSync(ventureFile(dir, sub), { withFileTypes: true }).flatMap((e) => {
|
|
49
54
|
const rel = sub ? `${sub}/${e.name}` : e.name;
|
|
50
55
|
if (e.isDirectory()) return e.name.startsWith(".") || e.name.startsWith("_") || existsSync(join(dir, rel, "venture.json")) ? [] : decisionFiles(dir, rel);
|
|
51
56
|
return e.name.endsWith(".decision.json") && sub.split("/").at(-1) === "decisions" ? [rel] : [];
|
|
@@ -53,7 +58,11 @@ function decisionFiles(dir, sub = "") {
|
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
/** Every decision of a venture, resolved: boundary, render state and what holds it. */
|
|
56
|
-
|
|
61
|
+
// Caching hook (F-12): without an explicit now, one action shares one decision list; now is the action's.
|
|
62
|
+
export function decisions(dir, now) {
|
|
63
|
+
return now === undefined ? memo("decisions", () => decisionsAt(dir), { dir }) : decisionsAt(dir, now);
|
|
64
|
+
}
|
|
65
|
+
function decisionsAt(dir, now = Date.parse(process.env.DECISIONS_NOW ?? "") || Date.now()) {
|
|
57
66
|
const venture = load(join(dir, "venture.json"));
|
|
58
67
|
const phase = PHASES.indexOf(venture.phase);
|
|
59
68
|
const productOnly = venture.kind === "product";
|
|
@@ -68,7 +77,7 @@ export function decisions(dir, now = Date.parse(process.env.DECISIONS_NOW ?? "")
|
|
|
68
77
|
status: settled ? "decided" : "open", decided_at: null, needed_in: venture.phase },
|
|
69
78
|
];
|
|
70
79
|
for (const f of decisionFiles(dir)) {
|
|
71
|
-
const d = load(
|
|
80
|
+
const d = load(ventureFile(dir, f));
|
|
72
81
|
// decisions/<record>[.<topic>].decision.json decides <record>.json in the folder that holds decisions/.
|
|
73
82
|
const at = f.split("/").slice(0, -2).join("/"), base = f.split("/").at(-1).split(".")[0];
|
|
74
83
|
const path = d.decides?.path ?? (at ? `${at}/${base}.json` : `${base}.json`);
|
|
@@ -101,7 +110,7 @@ export function decisions(dir, now = Date.parse(process.env.DECISIONS_NOW ?? "")
|
|
|
101
110
|
}
|
|
102
111
|
const statementFor = (record) => list.find((x) => x.part_of === "foundation" && x.status === "open" && x.decides?.record === record);
|
|
103
112
|
// An agent's draft of a gated record waits for a person to accept it.
|
|
104
|
-
const drafts = existsSync(join(dir, "_drafts")) ? readdirSync(join(dir, "_drafts")).filter((f) => f.endsWith(".draft")) : [];
|
|
113
|
+
const drafts = existsSync(join(ventureFile(dir, "_drafts"))) ? readdirSync(join(ventureFile(dir, "_drafts"))).filter((f) => f.endsWith(".draft")) : [];
|
|
105
114
|
for (const d of drafts) {
|
|
106
115
|
const path = d.replace(/\.draft$/, "").replace(/__/g, "/");
|
|
107
116
|
const record = recordOf(path);
|
|
@@ -234,7 +243,7 @@ const routeGlob = (g) => new RegExp("^" + g.replace(/[.+^${}()|[\]\\]/g, "\\$&")
|
|
|
234
243
|
/** The decision that keeps a route closed to an actor (EE-058): an undecided decision that unlocks it. */
|
|
235
244
|
export function locked(dir, route, actorId) {
|
|
236
245
|
if (!existsSync(join(dir, "venture.json"))) return null;
|
|
237
|
-
const files = decisionFiles(dir).map((f) => load(
|
|
246
|
+
const files = decisionFiles(dir).map((f) => load(ventureFile(dir, f)));
|
|
238
247
|
const d = files.find((x) => x.status !== "decided" && x.status !== "withdrawn" && (x.unlocks ?? []).some((u) =>
|
|
239
248
|
(u.routes ?? []).some((g) => routeGlob(g).test(route)) && (!u.for?.length || !actorId || u.for.includes(actorId))));
|
|
240
249
|
return d ? { id: d.id, question: d.question } : null;
|
|
@@ -248,7 +257,7 @@ const validate = (d) => {
|
|
|
248
257
|
rmSync(scratch, { recursive: true, force: true });
|
|
249
258
|
return v.status === 0 ? null : (v.stdout + v.stderr).trim();
|
|
250
259
|
};
|
|
251
|
-
const fileOf = (dir, id) => decisionFiles(dir).find((f) => load(
|
|
260
|
+
const fileOf = (dir, id) => decisionFiles(dir).find((f) => load(ventureFile(dir, f)).id === id);
|
|
252
261
|
|
|
253
262
|
/** An agent proposes a decision, or new wording for an open one. It stays open until a person
|
|
254
263
|
* approves it: an agent never decides (EE-058). at: the folder beside the record it decides. */
|
|
@@ -257,16 +266,16 @@ export function propose(dir, input, { agentId, via = "router", harness, model }
|
|
|
257
266
|
if (!rest.id || !rest.question) return { ok: false, error: "a decision needs an id and a question" };
|
|
258
267
|
if (rest.status && rest.status !== "open") return { ok: false, error: "an agent may only propose an open decision; a person approves it" };
|
|
259
268
|
const existing = fileOf(dir, rest.id);
|
|
260
|
-
if (existing && load(
|
|
269
|
+
if (existing && load(ventureFile(dir, existing)).status === "decided") return { ok: false, error: `${rest.id} is decided; only a person can change it` };
|
|
261
270
|
const file = existing ?? `${at ? `${at}/` : ""}decisions/${name ?? rest.id}.decision.json`;
|
|
262
271
|
if (!existing && !/^([a-z0-9-]+\/)*decisions\/[a-z0-9.-]+\.decision\.json$/.test(file)) return { ok: false, error: `${file} is not a decisions/ path` };
|
|
263
272
|
// New wording for an open decision keeps what the agent did not restate: its parent, boundary, unlocks.
|
|
264
|
-
const before = existing ? load(
|
|
273
|
+
const before = existing ? load(ventureFile(dir, existing)) : {};
|
|
265
274
|
const d = { ...before, ...rest, status: "open", provenance: { drafted_by: { kind: "agent", ...(agentId ? { id: agentId } : {}) } } };
|
|
266
275
|
const bad = validate(d);
|
|
267
276
|
if (bad) return { ok: false, error: `does not match schema/decision-record.schema.json:\n${bad}` };
|
|
268
|
-
mkdirSync(dirname(
|
|
269
|
-
writeFileSync(
|
|
277
|
+
mkdirSync(dirname(ventureFile(dir, file)), { recursive: true });
|
|
278
|
+
writeFileSync(ventureFile(dir, file), JSON.stringify(d, null, 2) + "\n");
|
|
270
279
|
const e = prov(dir, { entity: file, route: "governance/decisions", activity: "draft", agent: agentFromEnv("agent", via, { ...(agentId ? { id: agentId } : {}), ...(harness ? { harness } : {}), ...(model ? { model } : {}) }), note: `proposed decision ${d.id}` });
|
|
271
280
|
return { ok: true, result: { proposed: d.id, file, awaiting: "approval", provenance: e.hash } };
|
|
272
281
|
}
|
|
@@ -276,7 +285,7 @@ export function approve(dir, id, { by, answer, via = "cli", note } = {}) {
|
|
|
276
285
|
const file = fileOf(dir, id);
|
|
277
286
|
if (!file) return { ok: false, error: `no decision ${id}` };
|
|
278
287
|
if (!by) return { ok: false, error: "approving needs the person's name (--by)" };
|
|
279
|
-
const d = load(
|
|
288
|
+
const d = load(ventureFile(dir, file));
|
|
280
289
|
if (d.status === "decided") return { ok: false, error: `${id} is already decided` };
|
|
281
290
|
if (!answer && !d.answer) return { ok: false, error: `${id} has no wording to approve; give an answer` };
|
|
282
291
|
const drafted = d.provenance?.drafted_by ?? { kind: "person", id: by };
|
|
@@ -285,7 +294,7 @@ export function approve(dir, id, { by, answer, via = "cli", note } = {}) {
|
|
|
285
294
|
const out = { ...d, status: "decided", answer: answer ?? d.answer, provenance: { ...d.provenance, drafted_by: drafted, approved_by: by, approved_at: new Date().toISOString().replace(/\.\d+Z$/, "Z"), phase, wording, via } };
|
|
286
295
|
const bad = validate(out);
|
|
287
296
|
if (bad) return { ok: false, error: bad };
|
|
288
|
-
writeFileSync(
|
|
297
|
+
writeFileSync(ventureFile(dir, file), JSON.stringify(out, null, 2) + "\n");
|
|
289
298
|
const e = prov(dir, { entity: file, route: "governance/decisions", activity: "accept", agent: agentFromEnv("person", via, { id: by }), note: note ?? `approved decision ${id} (${wording})` });
|
|
290
299
|
return { ok: true, result: { decided: id, wording, phase, provenance: e.hash, unlocks: (out.unlocks ?? []).map((u) => u.activity) } };
|
|
291
300
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// A stand-in judge for the frames test (the Jev protocol): reads one request on stdin and answers every
|
|
3
|
+
// noul question from the facts it was given, without a model. A premise is unknown (0.5) when a fact it
|
|
4
|
+
// could rest on says "not on record", else no (0.1); the trade reads as a sequence.
|
|
5
|
+
let input = "";
|
|
6
|
+
for await (const c of process.stdin) input += c;
|
|
7
|
+
const req = JSON.parse(input);
|
|
8
|
+
const unknown = Object.values(req.state.venture ?? {}).some((v) => v === "not on record");
|
|
9
|
+
const answers = Object.fromEntries(Object.keys(req.questions).map((k) => [k, { noul: k.startsWith("dichotomy:") ? (k === "dichotomy:sequence" ? 0.9 : 0.1) : k === "premise:needs-outside-money" && unknown ? 0.5 : 0.1 }]));
|
|
10
|
+
console.log(JSON.stringify({ model: "stand-in", answers }));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// A stand-in for Jev in tests (MENTURA_TYPE_CMD="node schema/examples/venture-type/jev.mjs"): reads the
|
|
3
|
+
// typed request on stdin and answers each type:<id> question yes when the description uses one of that
|
|
4
|
+
// type's examples, so the classifier's ranking and its uncertain path can be tested offline.
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
|
+
let input = "";
|
|
7
|
+
for await (const c of process.stdin) input += c;
|
|
8
|
+
const req = JSON.parse(input);
|
|
9
|
+
const words = req.state.venture.description.toLowerCase();
|
|
10
|
+
const types = JSON.parse(readFileSync(new URL("../../venture-types.json", import.meta.url), "utf8")).types;
|
|
11
|
+
const answers = Object.fromEntries(types.map((t) => [`type:${t.id}`, { noul: t.examples.some((e) => words.includes(e.toLowerCase())) ? 0.92 : 0.04 }]));
|
|
12
|
+
console.log(JSON.stringify({ model: "stand-in", answers }));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AGENTS.md: acme-labs
|
|
2
|
+
|
|
3
|
+
The map of this venture for agents. Read it, then a route's layout, before writing anything here.
|
|
4
|
+
|
|
5
|
+
## How to work here
|
|
6
|
+
|
|
7
|
+
- List the routes with `mentura routes`. Read a route's `layout` and `template` before you write to it.
|
|
8
|
+
- Write through the router (the CLI or the MCP server), not by editing files. Every write is checked against its schema and recorded in provenance.jsonl.
|
|
9
|
+
- A write that fails closed comes back as a draft in `_drafts/`. A person accepts it with `mentura accept`.
|
|
10
|
+
- Never read or send anything under `_private/` to a model.
|
|
11
|
+
- A deeper AGENTS.md (for example `marketing/AGENTS.md`) adds to this one for the routes under it; the nearer one wins.
|
|
12
|
+
|
|
13
|
+
## Instructions
|
|
14
|
+
|
|
15
|
+
phase: discovery
|
|
16
|
+
voice: plain words, in the founder's own terms
|
|
17
|
+
private: _private/
|
|
File without changes
|