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
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "money-summary.schema.json",
|
|
4
|
+
"title": "Money summary",
|
|
5
|
+
"description": "The money package's summary (money/_summary.json, EE-070): cash, monthly flows and runway as of the last sync from the system of record (Rho), the one money record that is versioned and the only one an agent or a trace sees. source says whether it came from Rho's sandbox, a saved fixture, or the founder's live account.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"source",
|
|
9
|
+
"synced_at",
|
|
10
|
+
"as_of",
|
|
11
|
+
"cash"
|
|
12
|
+
],
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"source": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "rho-sandbox, rho-live, or a fixture's name"
|
|
18
|
+
},
|
|
19
|
+
"business": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"synced_at": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "date-time"
|
|
25
|
+
},
|
|
26
|
+
"as_of": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"format": "date-time"
|
|
29
|
+
},
|
|
30
|
+
"window": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"required": [
|
|
33
|
+
"from",
|
|
34
|
+
"to"
|
|
35
|
+
],
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"from": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "date-time"
|
|
41
|
+
},
|
|
42
|
+
"to": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "date-time"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"cash": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": [
|
|
51
|
+
"amount",
|
|
52
|
+
"currency"
|
|
53
|
+
],
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"properties": {
|
|
56
|
+
"amount": {
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"description": "Minor units (cents for USD), as the source returns them"
|
|
59
|
+
},
|
|
60
|
+
"currency": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^[A-Z]{3}$"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"monthly_inflow": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": [
|
|
69
|
+
"amount",
|
|
70
|
+
"currency"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"properties": {
|
|
74
|
+
"amount": {
|
|
75
|
+
"type": "integer",
|
|
76
|
+
"description": "Minor units (cents for USD), as the source returns them"
|
|
77
|
+
},
|
|
78
|
+
"currency": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^[A-Z]{3}$"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"monthly_outflow": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": [
|
|
87
|
+
"amount",
|
|
88
|
+
"currency"
|
|
89
|
+
],
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"properties": {
|
|
92
|
+
"amount": {
|
|
93
|
+
"type": "integer",
|
|
94
|
+
"description": "Minor units (cents for USD), as the source returns them"
|
|
95
|
+
},
|
|
96
|
+
"currency": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "^[A-Z]{3}$"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"monthly_net": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": [
|
|
105
|
+
"amount",
|
|
106
|
+
"currency"
|
|
107
|
+
],
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"properties": {
|
|
110
|
+
"amount": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"description": "Minor units (cents for USD), as the source returns them"
|
|
113
|
+
},
|
|
114
|
+
"currency": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"pattern": "^[A-Z]{3}$"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"runway_months": {
|
|
121
|
+
"type": [
|
|
122
|
+
"number",
|
|
123
|
+
"null"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"accounts": {
|
|
127
|
+
"type": "integer",
|
|
128
|
+
"minimum": 0
|
|
129
|
+
},
|
|
130
|
+
"transactions": {
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"minimum": 0
|
|
133
|
+
},
|
|
134
|
+
"note": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// naive.config.json (P-2, like next.config.js): a venture's overrides to Naive's defaults. Every
|
|
2
|
+
// field is optional; what a venture leaves out keeps the default here. The file holds the gate's
|
|
3
|
+
// static rules (X-3, X-5, X-6), function owners (X-2), check settings (P-7, like
|
|
4
|
+
// eslint.config.mjs), thresholds, which System 1 questions run, pinned package versions (U-4) and
|
|
5
|
+
// how strictly the acting role is checked (M-18). Shape: schema/naive-config.schema.json. Checked
|
|
6
|
+
// by node schema/check-config.mjs <venture dir>.
|
|
7
|
+
//
|
|
8
|
+
// Reading the config never calls a model or the network: it is files only, so the gate can read it
|
|
9
|
+
// on every write.
|
|
10
|
+
|
|
11
|
+
import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
import { ventureFile } from "./venture-paths.mjs";
|
|
14
|
+
|
|
15
|
+
const repo = new URL("..", import.meta.url).pathname;
|
|
16
|
+
const load = (p) => JSON.parse(readFileSync(p, "utf8"));
|
|
17
|
+
export const CONFIG = "naive.config.json";
|
|
18
|
+
|
|
19
|
+
/** The defaults a venture overrides. Arrays and scalars are replaced; objects are merged key by key. */
|
|
20
|
+
export const DEFAULTS = Object.freeze({
|
|
21
|
+
gate: { fail_closed: [], rules: [], packages: true, variants: false },
|
|
22
|
+
owners: {},
|
|
23
|
+
checks: { off: [], warn: [] },
|
|
24
|
+
thresholds: { confidence: 0.7, "idea-map": load(join(repo, "purpose/frameworks/idea-map/conventions.json")).threshold },
|
|
25
|
+
questions: {},
|
|
26
|
+
packages: {},
|
|
27
|
+
acting: { unknown_roles: "allow" },
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const isObj = (x) => x && typeof x === "object" && !Array.isArray(x);
|
|
31
|
+
function merge(base, over) {
|
|
32
|
+
if (!isObj(base) || !isObj(over)) return over === undefined ? structuredClone(base) : structuredClone(over);
|
|
33
|
+
const out = structuredClone(base);
|
|
34
|
+
for (const [k, v] of Object.entries(over)) out[k] = k in base ? merge(base[k], v) : structuredClone(v);
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The venture's naive.config.json as written, or {} when it has none. A file that is not JSON throws, naming the file. */
|
|
39
|
+
export function rawConfig(dir) {
|
|
40
|
+
const f = dir && ventureFile(dir, CONFIG);
|
|
41
|
+
if (!f || !existsSync(f)) return {};
|
|
42
|
+
try { return load(f); } catch (e) { throw new Error(`${CONFIG} is not valid JSON: ${e.message}`); }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The resolved config: the defaults with the venture's overrides on top. */
|
|
46
|
+
export function configFor(dir) {
|
|
47
|
+
return merge(DEFAULTS, rawConfig(dir));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A threshold by name, from the config, else the fallback. */
|
|
51
|
+
export function threshold(config, name, fallback) {
|
|
52
|
+
const t = config?.thresholds?.[name];
|
|
53
|
+
return typeof t === "number" ? t : fallback;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Check settings (P-7): each check with its mode, run, warn or off. */
|
|
57
|
+
export function checksFor(config, checks) {
|
|
58
|
+
const off = new Set(config?.checks?.off ?? []), warn = new Set(config?.checks?.warn ?? []);
|
|
59
|
+
return checks.map((check) => ({ check, mode: off.has(check) ? "off" : warn.has(check) ? "warn" : "run" }));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// A question's kind is its key before the colon (dept.legal:i-01 is dept.legal). A pattern may end in *.
|
|
63
|
+
export const questionKind = (key) => key.split(":")[0];
|
|
64
|
+
const kindMatches = (pattern, kind) => pattern.endsWith("*") ? kind.startsWith(pattern.slice(0, -1)) : kind === pattern;
|
|
65
|
+
|
|
66
|
+
/** Whether a System 1 question runs, for a framework (idea-map). */
|
|
67
|
+
export function questionOn(config, framework, key) {
|
|
68
|
+
return !(config?.questions?.[framework]?.off ?? []).some((p) => kindMatches(p, questionKind(key)));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** A System 1 request ({ state, model, questions }) with the questions the config turns off left out. */
|
|
72
|
+
export function questionsFor(request, config, framework) {
|
|
73
|
+
const questions = Object.fromEntries(Object.entries(request.questions ?? {}).filter(([k]) => questionOn(config, framework, k)));
|
|
74
|
+
const off = Object.keys(request.questions ?? {}).length - Object.keys(questions).length;
|
|
75
|
+
return { ...request, questions, ...(off ? { questions_off: off } : {}) };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** System 1 answers limited to the questions that run (an answer to a question turned off is ignored). */
|
|
79
|
+
export function answersFor(answers, config, framework) {
|
|
80
|
+
return Object.fromEntries(Object.entries(answers ?? {}).filter(([k]) => questionOn(config, framework, k)));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Package definitions, read once per process: they are framework files and do not change under a running gate.
|
|
84
|
+
let pkgCache = null;
|
|
85
|
+
export function packageDefs() {
|
|
86
|
+
if (pkgCache) return pkgCache;
|
|
87
|
+
const dir = join(repo, "packages");
|
|
88
|
+
const catalog = existsSync(join(dir, "catalog.json")) ? load(join(dir, "catalog.json")) : {};
|
|
89
|
+
pkgCache = existsSync(dir) ? readdirSync(dir).filter((n) => existsSync(join(dir, n, "package.json"))).sort().map((n) => {
|
|
90
|
+
const p = load(join(dir, n, "package.json"));
|
|
91
|
+
// A package without its own version is versioned with the catalog it ships in.
|
|
92
|
+
return { ...p, folder: n, version: p.version ?? catalog.version ?? "0.0.0" };
|
|
93
|
+
}) : [];
|
|
94
|
+
return pkgCache;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Installed package versions: name to version. */
|
|
98
|
+
export function installed() {
|
|
99
|
+
return Object.fromEntries(packageDefs().map((p) => [p.name, p.version]));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** The packages that hold a record type: its home (required or optional) first, then any that lists it in records. */
|
|
103
|
+
export function packagesOf(recordType) {
|
|
104
|
+
if (!recordType) return [];
|
|
105
|
+
const defs = packageDefs();
|
|
106
|
+
const home = defs.filter((p) => [...(p.required ?? []), ...(p.optional ?? [])].includes(recordType));
|
|
107
|
+
const listed = defs.filter((p) => (p.records ?? []).includes(recordType) && !home.includes(p));
|
|
108
|
+
return [...home, ...listed];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** The function (department) a record type belongs to: its home package's department. */
|
|
112
|
+
export function functionOf(recordType) {
|
|
113
|
+
return packagesOf(recordType).find((p) => p.department)?.department ?? null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Pins that do not match what is installed: { package, pinned, installed } (installed null for an unknown package). */
|
|
117
|
+
export function pinProblems(config) {
|
|
118
|
+
const have = installed();
|
|
119
|
+
return Object.entries(pins(config ?? {})).filter(([n, v]) => have[n] !== v.version).map(([n, v]) => ({ package: n, pinned: v.version, installed: have[n] ?? null }));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** The pins that block a write to a record type: its packages pinned to a version other than the installed one. */
|
|
123
|
+
export function pinsBlocking(config, recordType) {
|
|
124
|
+
const bad = new Map(pinProblems(config).map((p) => [p.package, p]));
|
|
125
|
+
return packagesOf(recordType).map((p) => bad.get(p.name)).filter(Boolean);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// A venture's naive.config.json (EE-073): the framework's defaults, overridden for one venture.
|
|
129
|
+
// The gate reads `gate` (schema/gate.mjs). Upgrades read and write the pins (EE-076, U-1 to U-5):
|
|
130
|
+
//
|
|
131
|
+
// naive { version, channel } the framework version the venture is on, and its channel
|
|
132
|
+
// (stable, or canary for experimental packages)
|
|
133
|
+
// packages { <name>: { version, early?, channel? } } the package versions it is pinned to; early
|
|
134
|
+
// marks a later phase's package adopted before its phase. A bare
|
|
135
|
+
// version string ("0.3.0") is read as { version }.
|
|
136
|
+
// triggers [ ... ] what starts the next step on an event (schema/triggers.mjs)
|
|
137
|
+
// kits [ <name> ] Mentura kits whose automations this venture turns on
|
|
138
|
+
//
|
|
139
|
+
// Every other key is kept as it is. Nothing here calls a model or the network.
|
|
140
|
+
|
|
141
|
+
/** The venture's naive.config.json, or {} when it has none. A file that is not JSON throws. */
|
|
142
|
+
export function readConfig(dir) {
|
|
143
|
+
const f = ventureFile(dir, CONFIG);
|
|
144
|
+
if (!existsSync(f)) return {};
|
|
145
|
+
try { return JSON.parse(readFileSync(f, "utf8")); }
|
|
146
|
+
catch (e) { throw new Error(`${CONFIG} is not valid JSON: ${e.message}`); }
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** Writes the config back, keys in a stable order: naive, packages, kits, triggers, gate, then the rest. */
|
|
150
|
+
export function writeConfig(dir, cfg) {
|
|
151
|
+
const order = ["naive", "packages", "kits", "triggers", "gate"];
|
|
152
|
+
const out = Object.fromEntries([...order.filter((k) => cfg[k] !== undefined).map((k) => [k, cfg[k]]), ...Object.entries(cfg).filter(([k]) => !order.includes(k))]);
|
|
153
|
+
writeFileSync(ventureFile(dir, CONFIG), JSON.stringify(out, null, 2) + "\n");
|
|
154
|
+
return out;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** The pinned packages as { name: { version, early, channel } }. */
|
|
158
|
+
export function pins(cfg) {
|
|
159
|
+
return Object.fromEntries(Object.entries(cfg.packages ?? {}).map(([k, v]) => [k, typeof v === "string" ? { version: v } : { ...v }]));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** The names of the packages adopted early (U-5): open now whatever their phase prior says. */
|
|
163
|
+
export function adopted(dir) {
|
|
164
|
+
try { return new Set(Object.entries(pins(readConfig(dir))).filter(([, p]) => p.early).map(([k]) => k)); }
|
|
165
|
+
catch { return new Set(); }
|
|
166
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "naive-config.schema.json",
|
|
4
|
+
"title": "naive.config.json",
|
|
5
|
+
"description": "A venture's overrides to Naive's defaults, at the venture root (P-2, like next.config.js): the gate (fail-closed routes, rules over the router's path patterns, which package rules it imports), function owners, check settings (P-7, like eslint.config.mjs), thresholds, which System 1 questions run, pinned package versions (U-4) and how strictly the acting role is checked (M-18). Every field is optional; a missing one keeps the default in schema/naive-config.mjs. node schema/check-config.mjs <venture dir> checks it.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"gate": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"description": "The venture's one gate (X-5). It runs before every write and never calls a model (X-4).",
|
|
16
|
+
"properties": {
|
|
17
|
+
"fail_closed": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"description": "Routes whose agent writes are always drafts; each covers that route and every route under it (X-3)",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"rules": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"description": "Rules that read the write itself: who writes it, its route, its confidence (X-1, X-2, X-6)",
|
|
28
|
+
"items": {
|
|
29
|
+
"$ref": "#/$defs/rule"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"packages": {
|
|
33
|
+
"description": "Which packages' gate rules the gate imports from their package definitions (X-5): true for all (the default), false for none, or a map of package name to false to leave one out",
|
|
34
|
+
"oneOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": {
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"variants": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"description": "Keep differing agent drafts of one record side by side, with one decision for the founder, on every held route (X-2). A rule can turn this on for its routes alone"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"owners": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"description": "Function owners: function (department) id to the role that owns it, so a write routed to its owner reaches the right person (X-2)",
|
|
55
|
+
"additionalProperties": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"checks": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"description": "Check settings (P-7): which of a route's checks are off, and which only warn",
|
|
64
|
+
"properties": {
|
|
65
|
+
"off": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"description": "Checks that do not run, by path (schema/check-telos.mjs)"
|
|
71
|
+
},
|
|
72
|
+
"warn": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"description": "Checks that run but do not fail the route's check"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"thresholds": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"description": "Thresholds by name: confidence (the gate's confidence routing), idea-map (when a System 1 answer becomes a tag)",
|
|
84
|
+
"additionalProperties": {
|
|
85
|
+
"type": "number",
|
|
86
|
+
"minimum": 0,
|
|
87
|
+
"maximum": 1
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"questions": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"description": "Which System 1 questions run, by framework (idea-map): off lists question kinds, the part of a question key before the colon (exists, dept.legal, rec.*)",
|
|
93
|
+
"additionalProperties": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"properties": {
|
|
97
|
+
"off": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"packages": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"description": "Pinned package versions (U-4): package name to the version the venture uses. A write to a pinned package whose installed version differs is refused until the pin or the install changes. A pin is a version string, or { version, early, channel } as naive upgrade writes it (U-5)",
|
|
109
|
+
"additionalProperties": {
|
|
110
|
+
"oneOf": [
|
|
111
|
+
{
|
|
112
|
+
"type": "string",
|
|
113
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": [
|
|
118
|
+
"version"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"properties": {
|
|
122
|
+
"version": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
125
|
+
},
|
|
126
|
+
"early": {
|
|
127
|
+
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
"channel": {
|
|
130
|
+
"enum": [
|
|
131
|
+
"stable",
|
|
132
|
+
"canary"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"acting": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"description": "How the acting role is checked on every action (M-18)",
|
|
144
|
+
"properties": {
|
|
145
|
+
"unknown_roles": {
|
|
146
|
+
"enum": [
|
|
147
|
+
"allow",
|
|
148
|
+
"refuse"
|
|
149
|
+
],
|
|
150
|
+
"description": "A role id the team plan does not list: allow (the default, it may reach every route) or refuse"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"naive": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"description": "The framework version the venture is on, and its channel (EE-076, written by naive upgrade)",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"properties": {
|
|
159
|
+
"version": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
|
|
162
|
+
},
|
|
163
|
+
"channel": {
|
|
164
|
+
"enum": [
|
|
165
|
+
"stable",
|
|
166
|
+
"canary"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"kits": {
|
|
172
|
+
"type": "array",
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"description": "Mentura kits whose automations this venture turns on"
|
|
177
|
+
},
|
|
178
|
+
"triggers": {
|
|
179
|
+
"type": "array",
|
|
180
|
+
"description": "What starts the next step on an event (schema/triggers.mjs)"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"$defs": {
|
|
184
|
+
"rule": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": [
|
|
188
|
+
"id",
|
|
189
|
+
"routes",
|
|
190
|
+
"then"
|
|
191
|
+
],
|
|
192
|
+
"properties": {
|
|
193
|
+
"id": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
196
|
+
},
|
|
197
|
+
"routes": {
|
|
198
|
+
"type": "array",
|
|
199
|
+
"minItems": 1,
|
|
200
|
+
"description": "The routes the rule covers, in the router's own path patterns (X-6): a route (validation/pricing), an [id] segment (money/[id]), * for one segment and ** for any depth (validation/**, which covers validation too)",
|
|
201
|
+
"items": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"minLength": 1
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"actors": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"items": {
|
|
209
|
+
"enum": [
|
|
210
|
+
"agent",
|
|
211
|
+
"person"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"description": "Who it applies to; default agents only"
|
|
215
|
+
},
|
|
216
|
+
"roles": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
},
|
|
221
|
+
"description": "Team-plan roles it applies to; default every role"
|
|
222
|
+
},
|
|
223
|
+
"when": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"additionalProperties": false,
|
|
226
|
+
"properties": {
|
|
227
|
+
"confidence_below": {
|
|
228
|
+
"description": "Applies when the write carries a confidence score below this number, or below the named threshold. The score is computed before the write; a write with no score never matches",
|
|
229
|
+
"oneOf": [
|
|
230
|
+
{
|
|
231
|
+
"type": "number",
|
|
232
|
+
"minimum": 0,
|
|
233
|
+
"maximum": 1
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"type": "string"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"exists": {
|
|
241
|
+
"type": "boolean",
|
|
242
|
+
"description": "Applies only when the record already exists (true) or does not yet (false)"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"then": {
|
|
247
|
+
"enum": [
|
|
248
|
+
"draft",
|
|
249
|
+
"owner",
|
|
250
|
+
"refuse"
|
|
251
|
+
],
|
|
252
|
+
"description": "draft: hold it as a draft; owner: hold it as a draft sent to the function owner; refuse: do not write it"
|
|
253
|
+
},
|
|
254
|
+
"owner": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"description": "The owner a routed write goes to; default the function owner in owners, else the record's decision-class owner, else founder"
|
|
257
|
+
},
|
|
258
|
+
"variants": {
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"description": "Keep differing drafts side by side under one decision (X-2)"
|
|
261
|
+
},
|
|
262
|
+
"note": {
|
|
263
|
+
"type": "string"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|