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/AGENTS.md
CHANGED
|
@@ -33,9 +33,10 @@ The Everything Ecosystem methodology, packaged as one private repo (EE-001). Pro
|
|
|
33
33
|
- `node schema/check-publication.mjs <dir>` checks each venture's publication policy and every handoff that publishes: a named channel and content rule, and a person approving (EE-025).
|
|
34
34
|
- `node schema/check-validation.mjs <dir> [--json]` grades each venture's validation records from their cited evidence (high to very low, adapted from GRADE). The validation package is `packages/validation/` (EE-071). A kit, Mentura's enhanced package, will live under `platform/kits/` and is not built yet.
|
|
35
35
|
- `node schema/check-execution.mjs <venture dir>` checks handoffs, evidence and decision rights; `node schema/run-handoff.mjs <venture dir> <handoff id>` runs a handoff's done-criteria and writes evidence (EE-017).
|
|
36
|
-
- `node interface/cli/naive.mjs typegen` writes `.naive/types/` from the route table and the MCP tools. `mentura typegen` is the same command. `naive upgrade <venture dir>` (was `mentura migrate`)
|
|
36
|
+
- `node interface/cli/naive.mjs typegen` writes `.naive/types/` from the route table and the MCP tools. `mentura typegen` is the same command. `naive upgrade <venture dir>` (was `mentura migrate`) runs the migrations in `schema/upgrades.json` up to the installed Naive and pins versions in `naive.config.json`; `--check`, `--guide`, `--adopt <package>`, `--canary`, `--agent` (a staged copy accepted with `--accept --confirm upgrade`) and `--framework` are in `schema/upgrade-venture.mjs` (`node schema/upgrades-test.mjs`). `mentura triggers` (`schema/triggers.mjs`) shows the triggers that run after each write and raises a failed run as a decision; `mentura notify` and `mentura stale` (`schema/stale.mjs`) mark summaries stale when a source changes; `mentura adapt` and `mentura adapters verify` (`interface/adapters.mjs`) write and test harness adapters. `naive port <folder> --venture <dir>` plans moving a folder into the venture whole and unchanged (to `repo/<name>` unless `--to` says where), naming what the move would break (worktrees, links into it, processes inside it); `--apply --confirm port` moves it with a rename, names it in `sources.json` as a read-only source of truth and logs the move in provenance (EE-076, a move since 2026-10-29; `node schema/port-test.mjs`). Each run writes `.release/port-trace.json` for `platform/integrations/langsmith.mjs`. `naive migrate --from <project> --venture <dir>` has an agent rewrite the project as records, settled by `migrate-<function>` decisions and written through the router with `--apply` (`node schema/migrate-test.mjs`, with a stand-in agent). Neither opens a file that looks like a secret. `schema/init-venture.mjs` creates new ventures only. `node schema/check-private.mjs <dir>` fails when a private record or field could reach a model. `node schema/gate.mjs` is not a CLI: the gate reads `naive.config.json` and package `gate_rules`, matches the router's path patterns and never calls a model. `node schema/check-config.mjs <venture dir>` checks `naive.config.json` (`--explain <route>`, `--rules`, `--resolved`, `--pin`); `node schema/gate-drafts.mjs <venture dir> [--owner <role>]` lists held drafts; `node schema/gate-test.mjs` tests the gate, the config, who is acting (`interface/acting.mjs`) and access at the record.
|
|
37
37
|
- `node interface/cli/mentura.mjs <route> <action> --venture <id>` reads, writes, checks or runs one route; `node interface/mcp/server.mjs` is the MCP server and `node interface/api/server.mjs` the local API, all over `interface/router.mjs` (EE-030). Routes follow the Next.js App Router (EE-032): `[id]` collection items, nested ventures by path, layout, view, not-found, loading and error, route groups by phase, the `system/overview` slots and team-plan robots; see `docs/reference/ROUTES.md`. `node interface/test.mjs` tests them. Records are read and written through connectors for the venture's sources (`knowledge/connectors/`, EE-037); `node knowledge/connectors/eval.mjs` runs the framework's (filesystem) and `node platform/connectors/eval.mjs` the platform's (GitHub), both against `knowledge/connectors/suite.mjs`. The source map's `rules` are the source-of-truth matrix (EE-042, `knowledge/connectors/resolve.mjs`): a system of record and owner per record type, attribute and context; `node schema/check-sources.mjs <dir>` refuses ties, and `node schema/check-where-used.mjs <dir>` reports where-used children that drifted from their parent. Every write through them appends to the venture's provenance log, `provenance.jsonl` (EE-031); `node schema/check-provenance.mjs <dir>` checks its hash chain, and `mentura baseline --venture <id>` adopts records written before the log. `node schema/need-now.mjs <venture dir>` says what a venture needs now (EE-028); `node schema/time-to-ready.mjs <venture dir>` measures time to running and ready; `node schema/check-team.mjs <dir>` checks team plans against the agent capability register (EE-029).
|
|
38
38
|
- `node schema/assess-problem.mjs <venture dir> [--as-is]` (route `purpose/validation/assess`) says what the problem's evidence is strong enough for: four assumptions labelled demonstrated to contradicted, the commitment they support (explore, prototype, charge, raise) and the next test, with no single score; it asks first when the record is incomplete (EE-050). `node schema/foundation.mjs <dir>` (route `purpose/foundation`) reports the strategic foundation by the Five Ws and How plus whether, and whose each is; `mentura confirm <statement>` and `mentura accept` of a foundation record need the name typed (EE-051).
|
|
39
|
+
- `node schema/freshness.mjs <venture dir>` (route `system/freshness`, `mentura freshness`) says which records are fresh, stale, expired or live holes: by time from freshness profiles (`knowledge/freshness.json`, overridden under `freshness` in `naive.config.json`, with per-phase profiles) and on demand when a dependency changed or a tag, path or package was revalidated (`mentura revalidate`, `verify`, `phase`; route `system/revalidate`). A stale record is still read, with a `freshness` flag; `--freeze <dir>` writes a shell that leaves live records as holes (Revalidating, V-1 to V-8; `node schema/freshness-test.mjs`).
|
|
39
40
|
- `node schema/bdd.mjs <file.feature>` runs Gherkin behaviors as tests, with step definitions in `<file>.steps.mjs`; behaviors are written first (EE-050).
|
|
40
41
|
- `node purpose/frameworks/product-anatomy/test.mjs` tests the Product Anatomy runner's role rules.
|
|
41
42
|
- `node schema/test.mjs` tests the checkers on broken copies; `python3 schema/validate.py` validates every record against its schema.
|
|
@@ -856,6 +856,48 @@
|
|
|
856
856
|
"EE-034",
|
|
857
857
|
"EE-044"
|
|
858
858
|
]
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"id": "EE-082",
|
|
862
|
+
"date": "2026-10-29",
|
|
863
|
+
"status": "in-force",
|
|
864
|
+
"related": [
|
|
865
|
+
"EE-047",
|
|
866
|
+
"EE-048",
|
|
867
|
+
"EE-060",
|
|
868
|
+
"EE-070",
|
|
869
|
+
"EE-076"
|
|
870
|
+
],
|
|
871
|
+
"decision": "A venture has a type (venture.json `type`, from schema/venture-types.json), and create-venture scaffolds nothing until the type and the founder's role are set. The founder describes the venture in a few words and Jev classifies it (one Noul per type, uncertain below 0.5), or picks from the list; without TYPESAFE_API_KEY the list is the only way. The type decides the starting packages, the first decisions, the layers it needs and the functions it imports (as departments, with folders). Roles a person can hold are in governance/venture-template/roles/venture-roles.json; investors are roles too (general partner, limited partner), so an investor creates a venture of type vc-fund, which starts with a thesis, terms, deals and a portfolio of nested ventures instead of product questions. people/ holds the venture's human capital: people/people.json (who is in it, in which role, and the functions, or hats, each owns; a solo founder owns every function) and one file per founder in people/founders/, linked to the founder agreement. schema/check-people.mjs checks that roles, hats and founder files agree.",
|
|
872
|
+
"why": "Torian, 2026-10-29: the app should not be scaffolded until a role is chosen and the type of venture is selected; an investor can be a role, and a VC fund needs a thesis and other templates than a software startup; a solo founder owns every function by default; people needs a top-level folder that is to human capital what venture.json is to the venture, with one file per founder linked to founding agreements. Defaults (one file per founder, the type list, investor split into general and limited partner, the folder name people/, the model only with a key) were chosen by the coordinator on Torian's go-ahead and stay open to change."
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"id": "EE-083",
|
|
876
|
+
"date": "2026-10-29",
|
|
877
|
+
"status": "in-force",
|
|
878
|
+
"related": [
|
|
879
|
+
"EE-037",
|
|
880
|
+
"EE-042",
|
|
881
|
+
"EE-070",
|
|
882
|
+
"EE-082"
|
|
883
|
+
],
|
|
884
|
+
"decision": "Setup asks where each of the venture's functions keeps its truth, and records the answers as pointers in knowledge/sources.json under `functions` (the source-of-truth matrix, EE-042, not a second file), with `truth` naming where the venture's source of truth as a whole lives (local by default). schema/systems-catalog.json lists the systems offered per function (a local repo, GitHub, Vercel, Cloudflare, Stripe, Square, Shopify, Rho, Google Drive, DocuSign, a local folder). A system Naive reads through code is connected (Rho, through its MCP API: sandbox, live with RHO_API_TOKEN, or a saved fixture marked as one); the rest are pointed until a connector exists. A function with no system keeps the founder's words. naive dev serves a setup page at /setup (interface/dev/setup.mjs) that walks through people and hats, sources of truth, the strategic foundation and first decisions (each answer an approved decision; a foundation statement as a decision with `statement`), and a goal for discovery, and says when the structure is established and what comes next. A new venture's .gitignore keeps sensitive stream activity out of git.",
|
|
885
|
+
"why": "Torian, 2026-10-29: when scaffolding, ask the user to point Naive to the source of truth for each function (the repo, GitHub and Vercel for a software product; analytics from the host; Stripe, Square or Shopify for sales; Rho for financials in the demo; legal documents, with the connections to set them up if missing), let a function default or be answered in prose, and ship a local setup experience like the one Next.js gives, essentially the strategic foundation and a version of the decision docket, ending by setting a goal for the discovery phase. After setup a founder has the structure of the venture and a way of routing decisions; operating it is Mentura's, as deploying is Vercel's after Next.js."
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"id": "EE-086",
|
|
889
|
+
"date": "2026-10-29",
|
|
890
|
+
"status": "in-force",
|
|
891
|
+
"related": [
|
|
892
|
+
"EE-047",
|
|
893
|
+
"EE-070",
|
|
894
|
+
"EE-071",
|
|
895
|
+
"EE-082",
|
|
896
|
+
"EE-083",
|
|
897
|
+
"EE-085"
|
|
898
|
+
],
|
|
899
|
+
"decision": "The venture project structure (docs/design/VENTURE_STRUCTURE_2026-10-29.md). At the top: venture.json, README.md (was profile.md), AGENTS.md, knowledge/ (the knowledge base), meta/ (sources.json, naive.config.json, provenance.jsonl, releases) and an optional repo/ for code. Packages sit flat in knowledge/. venture.json declares the business functions once (the org chart, flat by default with one function per package owned by the founder); packages and records inherit their function from it, a founder composes functions over several packages, (group)/ folders are an optional view, and hats derive from function ownership. A record's route is its path inside knowledge/, with groups and the extension dropped: no name table, no reserved route names. Skills teach where files go; code guarantees schema, the person-only gate, private data, provenance and outside systems. A function's publishable items are in public.json where it has any.",
|
|
900
|
+
"why": "Torian, 2026-10-29: the folder structure is a visual aid and an educational device for how a founder should think about the business; put the knowledge base in a knowledge folder, code in an optional repo folder like src, and add a meta folder; let people group and merge functions their own way, starting from a flat org chart declared in the venture file that everything inherits from; routes were overcomplicated, and agents can handle file conventions with skills. Answers marked default in the design note are Claude's recommendations until Torian changes them."
|
|
859
901
|
}
|
|
860
902
|
]
|
|
861
903
|
}
|
package/docs/reference/ROUTES.md
CHANGED
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
source: generated
|
|
4
|
-
created: 2026-10-27T20:52:31Z
|
|
5
|
-
ai-model: claude-opus-5.5
|
|
6
|
-
tags: [everything-ecosystem, mentura, routing, interfaces, reference]
|
|
7
|
-
description: "Every route a venture has: the records and commands the CLI, the MCP server and the HTTP API reach, with their actions and gates (EE-030). The table below is generated from the data model and kits; test.mjs fails when it is stale."
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Routes
|
|
11
|
-
|
|
12
|
-
One route table serves three interfaces: the CLI (`interface/cli/mentura.mjs`), the MCP server (`interface/mcp/server.mjs`) and the HTTP API (`interface/api/server.mjs`). All three call `interface/router.mjs`, so they cannot disagree. Install them into an agent harness with `interface/skills/install-mentura/SKILL.md`.
|
|
13
|
-
|
|
14
|
-
Routes follow the Next.js App Router (EE-032). The path is the route: a record in a layer's own kit is `<layer>/<record>`, and a record in a nested kit is `<layer>/<kit>/<record>`, so a route is its record's folder path. The venture comes first: an id, or a nested venture's folder path (`studio/print`), given as `--venture`, a tool argument, or `/ventures/<venture>/` in the API.
|
|
15
|
-
|
|
16
|
-
| Next.js | Here |
|
|
17
|
-
| --- | --- |
|
|
18
|
-
| `route` (API endpoint) | record actions read, write, check and template; command routes run |
|
|
19
|
-
| `page` | the view action: a Markdown page for a person |
|
|
20
|
-
| `layout` | the layout action: system, layer and kit context, skills, references, gate and need-now status |
|
|
21
|
-
| `not-found`, `loading`, `error` | a missing record answers with its template and need-now status; a waiting draft is reported on read; a failed check or write answers with the kit's skills and template |
|
|
22
|
-
| `[id]` | collection items: `purpose/product/[id]` beside the list route `purpose/product` |
|
|
23
|
-
| `[...slug]` | the venture: `studio/print` |
|
|
24
|
-
| `(group)` | route groups by phase, below |
|
|
25
|
-
| `@slot` | `system/overview`: slots that render side by side, one failing without stopping the rest |
|
|
26
|
-
| `_private` | `_drafts/`, never routed |
|
|
27
|
-
| `proxy` | gates before every write: schema, decision class (from the data model, applied from the venture's decision rights), the role's routes |
|
|
28
|
-
| `robots` | team-plan roles may list the routes they read and write; `system/robots` shows them |
|
|
29
|
-
| redirects | `interface/route-aliases.json`: a renamed route keeps its old one as an alias |
|
|
30
|
-
|
|
31
|
-
Nothing here is written by hand: add a record type to `schema/data-model.json` and a kit, and its route appears. Regenerate the table with `node interface/router.mjs --md`.
|
|
32
|
-
|
|
33
1
|
## Routes (generated by `node interface/router.mjs --md`)
|
|
34
2
|
|
|
35
3
|
Every route works on one venture, named in front of it: its id, or its folder path for a nested venture (`studio/print`). Record routes read, write, check, view, lay out or show the template of one record type; a collection has a list route and an `[id]` item route; command routes run a venture-wide tool and can be viewed. A write is checked against the record's schema first; a record whose decision class escalates is written as a draft when an agent writes it, for a person to accept.
|
|
@@ -39,6 +7,8 @@ Every route works on one venture, named in front of it: its id, or its folder pa
|
|
|
39
7
|
| `.release/venture-package` | record | read, view, layout | `.release/venture-package.json`, `.release/layout.json`, `package/venture-package.json` | | (discovery) (validation) (beachhead) (scale) (platform) | 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 |
|
|
40
8
|
| `customers` | record (list) | read, view, layout | `customers/*.json` | | | A customer master record. Activity is an append-only stream. The package is never complete (EE-070). |
|
|
41
9
|
| `customers/[id]` | record (item) | read, view, layout, write | `customers/*.json` | | | A customer master record. Activity is an append-only stream. The package is never complete (EE-070). |
|
|
10
|
+
| `deals` | record (list) | read, view, layout | `deals/*.json` | | | A company in a fund's pipeline (EE-082) |
|
|
11
|
+
| `deals/[id]` | record (item) | read, view, layout, write | `deals/*.json` | | | A company in a fund's pipeline (EE-082) |
|
|
42
12
|
| `decisions` | record (list) | read, view, layout | `decisions/*.decision.json` | | (discovery) (validation) (beachhead) (scale) (platform) | One live decision, in a decisions/ folder beside the record it decides, with its parent, boundary (fail closed or open) and the phase it is needed in (EE-054, EE-057); node schema/decisions.mjs renders the matrix. The decision log keeps the history |
|
|
43
13
|
| `decisions/[id]` | record (item) | read, view, layout, write | `decisions/*.decision.json` | | (discovery) (validation) (beachhead) (scale) (platform) | One live decision, in a decisions/ folder beside the record it decides, with its parent, boundary (fail closed or open) and the phase it is needed in (EE-054, EE-057); node schema/decisions.mjs renders the matrix. The decision log keeps the history |
|
|
44
14
|
| `evidence` | record (list) | read, view, layout, check | `evidence/results/*.json` | | (validation) (beachhead) (scale) (platform) | Append-only results of running checks |
|
|
@@ -47,6 +17,11 @@ Every route works on one venture, named in front of it: its id, or its folder pa
|
|
|
47
17
|
| `foundation/icp` | record | read, view, layout, write | `foundation/icp.json`, `purpose/icp.json` | strategy-or-constitution | (discovery) (validation) (beachhead) (scale) (platform) | Who the venture serves: ideal customer profiles, one primary (EE-051); a foundation statement, gated |
|
|
48
18
|
| `foundation/problem` | record | read, view, layout, write, check, template | `foundation/problem.json`, `purpose/validation/problem.json` | strategy-or-constitution | (discovery) (validation) (beachhead) | The problem sub-score of validation: the claim and its cited evidence, each item graded (EE-026). Shares schema/validation-evidence.schema.json with every sub-score Gated like the telos (EE-050): the problem statement is a founder-critical record, so an agent's write is a draft the founder accepts. |
|
|
49
19
|
| `foundation/telos` | record | read, view, layout, write, check, template | `foundation/telos.json`, `purpose/telos.json` | strategy-or-constitution | (validation) (beachhead) (scale) (platform) | The end the venture exists to reach: statement, end state, measures, owner outcome, exit criteria per phase (EE-023) |
|
|
20
|
+
| `fund/terms` | record | read, view, layout, write | `fund/terms.json` | | | A fund's terms and closes (EE-082) |
|
|
21
|
+
| `fund/thesis` | record | read, view, layout, write | `fund/thesis.json` | | | A fund's thesis (EE-082) |
|
|
22
|
+
| `glossary` | record (list) | read, view, layout, check, template | `glossary/*.json` | | (beachhead) (scale) (platform) | 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 |
|
|
23
|
+
| `glossary/[id]` | record (item) | read, view, layout, write, check, template | `glossary/*.json` | | (beachhead) (scale) (platform) | 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 |
|
|
24
|
+
| `glossary/terms` | command | run, view, layout | `schema/brand.mjs` | | | The terms one package sees (Y-2): its own glossary and the terms other packages export; their local terms stay with them. Input value is the package |
|
|
50
25
|
| `governance/analytics` | command | run, layout | `schema/decision-analytics.mjs` | | | Decision analytics (EE-072): how many decisions of each type each function has made, open against decided, in whose words, in which phase, and their outcomes. Data only; a view is the platform's, or a visualization skill's |
|
|
51
26
|
| `governance/board` | record | read, view, layout, write, check | `governance/board.json` | ownership-or-control | (platform) | Formal and advisory boards, their seats and reserved matters |
|
|
52
27
|
| `governance/decision-rights` | record | read, view, layout, write, check | `governance/decision-rights.json` | strategy-or-constitution | (validation) (beachhead) (scale) (platform) | |
|
|
@@ -63,12 +38,20 @@ Every route works on one venture, named in front of it: its id, or its folder pa
|
|
|
63
38
|
| `investors` | record (list) | read, view, layout | `investors/*.json` | | | An investor master record. Activity is an append-only stream. The package is never complete (EE-070). |
|
|
64
39
|
| `investors/[id]` | record (item) | read, view, layout, write | `investors/*.json` | | | An investor master record. Activity is an append-only stream. The package is never complete (EE-070). |
|
|
65
40
|
| `knowledge/catalog` | command | run, view, layout | `knowledge/connectors/catalog.mjs` | | | Build or refresh the catalog: every item in every source the venture keeps records in, with its address and version, no content (EE-037) |
|
|
41
|
+
| `knowledge/freshness-log` | record | read, view, layout | `knowledge/freshness.jsonl` | | (beachhead) (scale) (platform) | 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) |
|
|
42
|
+
| `knowledge/judgment` | record (list) | read, view, layout | `knowledge/judgments/*.json` | | | 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) |
|
|
43
|
+
| `knowledge/judgment/[id]` | record (item) | read, view, layout, write | `knowledge/judgments/*.json` | | | 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) |
|
|
66
44
|
| `knowledge/knowledge-sources` | record | read, view, layout, write, check | `knowledge/sources.json` | | (scale) (platform) | Which source each record type lives in: the venture's own folder by default, or a connected source such as a GitHub repository (EE-037); its rules are the source-of-truth matrix: a system of record and owner per record type, attribute and context (EE-042) |
|
|
67
45
|
| `knowledge/search` | command | run, view, layout | `knowledge/connectors/catalog.mjs` | | | Find items across every source through the catalog; input value is the query (EE-037) |
|
|
68
46
|
| `knowledge/venture-profile` | record | read, view, layout | `profile.md` | | (discovery) (validation) (beachhead) (scale) (platform) | The venture's story and thesis in prose, beside venture.json |
|
|
69
47
|
| `knowledge/where-used` | record | read, view, layout, write, check | `knowledge/where-used.json` | | (scale) (platform) | 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) |
|
|
48
|
+
| `marketing/brand` | record | read, view, layout, write, check, template | `marketing/brand.json` | experience-design | (beachhead) (scale) (platform) | 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 |
|
|
49
|
+
| `marketing/brand/resolve` | command | run, view, layout | `schema/brand.mjs` | | | The brand at one route (Y-5, T-2): the venture brand with every scope that covers the route applied, nearer last, and which scope set each value; input value is the route |
|
|
50
|
+
| `marketing/brand/tokens` | command | run, view, layout | `schema/brand.mjs` | | | The venture's brand tokens (Y-3): colors and typefaces as W3C design tokens, the CSS custom properties and @font-face rules an interface loads, each scope as its own selector, and the head links for the venture's marks (P-24) |
|
|
70
51
|
| `marketing/content` | record | read, view, layout | `marketing/content/**/*.mdx`, `operations/marketing/content/**/*.mdx` | | (beachhead) (scale) (platform) | Public variants of internal records, written by marketing agents as their own MDX: each names the record it is a variant of, its audience, whether it is published and who approved it; checked by the public gate (EE-064) |
|
|
71
52
|
| `marketing/sitemap` | record | read, view, layout, write | `marketing/sitemap.json`, `operations/marketing/sitemap.json` | | (validation) (beachhead) (scale) (platform) | The planned public site: each page's sections in order, with the MDX component, the need, the audience and why, when it shows, the internal record it draws on and the public variant to write; part of the marketing package handed to engineering (EE-064, EE-065) |
|
|
53
|
+
| `marketing/sitemap/xml` | command | run, view, layout | `schema/brand.mjs` | | | sitemap.xml rendered from the marketing sitemap record (P-26), for a release; input value is the site's base URL |
|
|
54
|
+
| `marketing/voice` | command | run, view, layout | `schema/brand.mjs` | | | Marketing content held to the voice rules, the global stylesheet for words (Y-3): each phrase to avoid, where it is and what to use instead; and terms another package keeps local (Y-2) |
|
|
72
55
|
| `money` | record (list) | read, view, layout | `money/*.json` | | | A money master record. Activity is an append-only stream. The package is never complete (EE-070). |
|
|
73
56
|
| `money/[id]` | record (item) | read, view, layout, write | `money/*.json` | | | A money master record. Activity is an append-only stream. The package is never complete (EE-070). |
|
|
74
57
|
| `operations/department` | record | read, view, layout, check | `departments/*/department.json`, `departments/*/*/department.json` | | (validation) (beachhead) (scale) (platform) | The tag in each department folder, in the governance or operations layer; an optional primary/ or support/ grouping folder is for looking at only (EE-047) |
|
|
@@ -78,6 +61,9 @@ Every route works on one venture, named in front of it: its id, or its folder pa
|
|
|
78
61
|
| `operations/marketing/site` | command | run, view, layout | `operations/marketing/site/presence.mjs` | | | How present the venture's public records are on its marketing site: a score weighed by who the site must speak to now (raising, hiring, contributors, ICPs), and each item missing, not prominent enough or present, with where it belongs (EE-062). Read the site first with interface/harness/site.mjs |
|
|
79
62
|
| `operations/marketing/sitemap` | command | run, view, layout | `operations/marketing/site/plan.mjs` | | | Plan the public site from the venture's records: the product decides whom it is offered to, that decides the audiences, and each page gets its sections in order with the MDX component, need, audience, reason, condition, source record and the public variant to write (EE-064) |
|
|
80
63
|
| `operations/site-presence` | record | read, view, layout, write | `operations/marketing/site-presence.json` | | (validation) (beachhead) (scale) (platform) | How present the venture's public records are on its marketing site, item by item, with a score weighed by who the site must speak to now (EE-062) |
|
|
64
|
+
| `people` | record | read, view, layout, write | `people/people.json` | | (discovery) (validation) (beachhead) (scale) (platform) | The venture's people: role and hats per person; venture.json for human capital (EE-082) |
|
|
65
|
+
| `people/founders` | record (list) | read, view, layout | `people/founders/*.json` | | (discovery) (validation) (beachhead) (scale) (platform) | One file per founder, linked to the founder agreement (EE-082) |
|
|
66
|
+
| `people/founders/[id]` | record (item) | read, view, layout, write | `people/founders/*.json` | | (discovery) (validation) (beachhead) (scale) (platform) | One file per founder, linked to the founder agreement (EE-082) |
|
|
81
67
|
| `people/team` | record | read, view, layout, write, check, template | `people/team.json`, `purpose/validation/team.json` | | (validation) (beachhead) (scale) | Validation sub-score: skills needed, held and the gaps; cofounder sought (EE-026) |
|
|
82
68
|
| `people/team-plan` | record | read, view, layout, write, check | `people/team-plan.json`, `operations/team-plan.json` | | (validation) (beachhead) (scale) (platform) | Who the venture needs, agent or person, when, with what authority, and where a human stays in the loop; recruiting briefs for open person roles (EE-029) |
|
|
83
69
|
| `product` | record (list) | read, view, layout, check | `product/*.json`, `products/*.json` | | (discovery) (validation) (beachhead) (scale) (platform) | |
|
|
@@ -85,6 +71,8 @@ Every route works on one venture, named in front of it: its id, or its folder pa
|
|
|
85
71
|
| `product/anatomy` | record (list) | read, view, layout | `product/anatomy/*.json`, `purpose/anatomy/*.json` | | (beachhead) (scale) (platform) | Product Anatomy input for one product with parts (venture, core, products, flows), such as Naive or Mentura; read by purpose/frameworks/product-anatomy/anatomy.mjs |
|
|
86
72
|
| `product/anatomy-answers` | record | read, view, layout | `product/anatomy/answers*.json`, `product/anatomy.answers*.json`, `purpose/anatomy.answers*.json` | | (beachhead) (scale) (platform) | Scores per product per question; the matrix is rendered from them |
|
|
87
73
|
| `product/anatomy/[id]` | record (item) | read, view, layout | `product/anatomy/*.json`, `purpose/anatomy/*.json` | | (beachhead) (scale) (platform) | Product Anatomy input for one product with parts (venture, core, products, flows), such as Naive or Mentura; read by purpose/frameworks/product-anatomy/anatomy.mjs |
|
|
74
|
+
| `public/assets` | record | read, view, layout, write, check, template | `public/assets.json` | | (beachhead) (scale) (platform) | 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 |
|
|
75
|
+
| `public/assets/facts` | command | run, view, layout | `schema/assets.mjs` | | | What code reads from each file in public/ (J-4): type from the bytes, width and height, icon sizes, bytes and sha256. Agents copy these, never guess them |
|
|
88
76
|
| `purpose/account` | record (list) | read, view, layout, check | `accounts/*/account.json` | | (beachhead) (scale) (platform) | A named party the venture keeps a record for: client, customer, user, member or partner (EE-021). Optional |
|
|
89
77
|
| `purpose/account/[id]` | record (item) | read, view, layout, write, check | `accounts/*/account.json` | | (beachhead) (scale) (platform) | A named party the venture keeps a record for: client, customer, user, member or partner (EE-021). Optional |
|
|
90
78
|
| `purpose/data-stream` | record (list) | read, view, layout | `customers/_streams/*/stream.json`, `investors/_streams/*/stream.json`, `money/_streams/*/stream.json` | | | Declares one append-only stream and whether it is sensitive (EE-070). |
|
|
@@ -93,6 +81,7 @@ Every route works on one venture, named in front of it: its id, or its folder pa
|
|
|
93
81
|
| `purpose/ideas` | command | run, view, layout | `purpose/frameworks/idea-map/ideamap.mjs` | | | The founder's idea dump mapped onto Naive's conventions: each idea verbatim with its departments, records and whether it exists, where the ideas cluster, what the dump never mentions, and what it says about whether a product exists (EE-059) |
|
|
94
82
|
| `purpose/ideas/graph` | command | run, view, layout | `purpose/frameworks/idea-map/graph.mjs` | | | The idea graph: which ideas build on which, each idea's signal, the lanes that move in order and the ones that can move on their own, and the ideas to develop next (EE-060) |
|
|
95
83
|
| `purpose/ideas/routes` | command | run, view, layout | `purpose/frameworks/idea-map/route.mjs` | | | Where each idea goes in the framework: the records it feeds, each destination's stage (routed, drafted, your decision, waiting, done), whether it moves in order or on its own, and the one step that moves it; plus the decision docket traced to the ideas (EE-061) |
|
|
84
|
+
| `purpose/money/summary` | record | read, view, layout, write | `money/_summary.json` | | (beachhead) (scale) (platform) | Cash, monthly flows and runway from the money source's last sync; versioned, and the only money record a model sees (EE-070) |
|
|
96
85
|
| `purpose/raw/text` | record (list) | read, view, layout | `raw/sources/*/text.md` | | | The text of a raw source. original.* stays out of git (EE-070). |
|
|
97
86
|
| `purpose/raw/text/[id]` | record (item) | read, view, layout | `raw/sources/*/text.md` | | | The text of a raw source. original.* stays out of git (EE-070). |
|
|
98
87
|
| `purpose/validation/assess` | command | run, view, layout | `schema/assess-problem.mjs` | | | What the problem's evidence is strong enough for: each assumption labelled demonstrated, inferred, assumed, unknown or contradicted, the commitment it supports and the next test (EE-050). Asks first when the record is incomplete; input as_is runs it anyway |
|
|
@@ -100,12 +89,22 @@ Every route works on one venture, named in front of it: its id, or its folder pa
|
|
|
100
89
|
| `raw/dump` | record | read, view, layout | `raw/dump.md`, `purpose/ideas/dump.md` | | (discovery) (validation) | The founder's raw idea dump: every idea about the venture, verbatim and unprompted. Never rewritten by an agent (EE-059) |
|
|
101
90
|
| `raw/sources` | record (list) | read, view, layout | `raw/sources/*/source.json` | | | Where a founder-supplied source came from. Raw is immutable (EE-070). |
|
|
102
91
|
| `raw/sources/[id]` | record (item) | read, view, layout, write | `raw/sources/*/source.json` | | | Where a founder-supplied source came from. Raw is immutable (EE-070). |
|
|
92
|
+
| `system/answer` | command | run, view, layout | router | | | One answer from several routes (C-8): each part says whether it is a confirmed record, an agent's record, a draft, a cached result or judgment, or fresh computation; input routes (a list, or value a,b) and judge (a request) |
|
|
93
|
+
| `system/cache` | command | run, view, layout | router | | | The venture's cache (C-1, C-17): entries by level, what is private to you, what has expired, and which routes are cached for how long; input value list, prune or clear |
|
|
94
|
+
| `system/context` | command | run, view, layout | `interface/context.mjs` | | | The context budget (N-13): what every route sends an agent, in tokens, against its budget, with the largest part and where to move it (S-14, F-6) |
|
|
95
|
+
| `system/freshness` | command | run, view, layout | `schema/freshness.mjs` | | | What is fresh, stale or expired, and which records are live holes: by time (freshness profiles, per phase too) and on demand (a dependency changed, a where-used parent drifted, a tag, path or package was revalidated) |
|
|
96
|
+
| `system/judge` | command | run, view, layout | router | | | Ask System 1 a typed request ({ state, model, questions }) through the judgment cache (S-8, C-5): reused answers are not asked again; the rest go to NAIVE_JUDGE_CMD in one request |
|
|
97
|
+
| `system/naive-config` | record | read, view, layout, write, check | `naive.config.json` | security-loosening | | 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 |
|
|
103
98
|
| `system/need-now` | command | run, view, layout | `schema/need-now.mjs` | | | What the venture needs now, soon, or should hold back (EE-028) |
|
|
104
99
|
| `system/overview` | command | run, view, layout | router | | | The venture at a glance: telos, validation, need-now, time to ready, team and recent provenance, rendered as parallel slots |
|
|
105
100
|
| `system/package` | command | run, view, layout | `schema/packages.mjs` | | | The venture package (EE-067, EE-069): the core packages open now and the handoffs, each record confirmed, to review or to write, what moves on its own and what waits, and what completion unlocks; --write renders the view and records a version. Assumes a solo founder or small founding team in Discovery and Validation; agents are a package enhancement |
|
|
106
101
|
| `system/provenance` | record | read, view, layout, check | `provenance.jsonl` | | (discovery) (validation) (beachhead) (scale) (platform) | 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) |
|
|
102
|
+
| `system/release` | record | read, view, layout | `.release/release.json`, `.release/card.json` | | (beachhead) (scale) (platform) | 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 |
|
|
103
|
+
| `system/revalidate` | command | run, view, layout | `schema/freshness.mjs` | | | Mark records stale on demand: input value tag:<route> (the record and what depends on it), path:<folder>, package:<name>, or pivot (the validation package); a plain folder is refused in favour of exact tags |
|
|
107
104
|
| `system/robots` | command | run, view, layout | router | | | Which roles may read and write which routes, from the team plan |
|
|
105
|
+
| `system/steps` | command | run, view, layout | `schema/model-steps.mjs` | | | The model steps' payload (use model, EE-073): what code computed, a placeholder for each judgment a model has yet to give, and the only fields each one receives; asks no model. mentura steps run asks one |
|
|
108
106
|
| `system/time-to-ready` | command | run, view, layout | `schema/time-to-ready.mjs` | | | Time to running, and to ready per layer and MAD tier |
|
|
107
|
+
| `system/vitals` | command | run, view, layout | `interface/vitals.mjs` | | | Agent vitals (N-6): calls per task, tokens of context per call, time to a useful answer and time from a decision opening to a person deciding it, at the 75th percentile, each checked against its threshold (C-15). Reads the events log that instrumentation writes |
|
|
109
108
|
| `validation/go-to-market` | record | read, view, layout, write, check, template | `validation/go-to-market.json`, `purpose/validation/go-to-market.json` | | (validation) (beachhead) (scale) | Validation sub-score: path, motion, channels and evidence a channel works; the path sets the weights (EE-026) |
|
|
110
109
|
| `validation/operations-readiness` | record | read, view, layout, write, check, template | `validation/operations-readiness.json`, `purpose/validation/operations-readiness.json` | | (beachhead) (scale) (platform) | Validation sub-score: per MAD tier evidence; grades as the weakest tier (EE-026) |
|
|
111
110
|
| `validation/pricing` | record | read, view, layout, write, check, template | `validation/pricing.json`, `purpose/validation/pricing.json` | | (validation) (beachhead) (scale) | Validation sub-score: price model, points, buyer and evidence they pay (EE-026) |
|
|
@@ -118,8 +117,8 @@ A group gathers the routes need-now suggests in a phase. It changes the layout a
|
|
|
118
117
|
|
|
119
118
|
| Group | The phase asks | Routes |
|
|
120
119
|
| --- | --- | --- |
|
|
121
|
-
| `(discovery)` | Does a real problem exist, and who has it? | `.release/venture-package`, `decisions`, `decisions/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/problem`, `ideas/graph`, `ideas/map`, `knowledge/venture-profile`, `product`, `product/[id]`, `raw/dump`, `system/provenance` |
|
|
122
|
-
| `(validation)` | Will people adopt this solution and keep using it? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/problem`, `foundation/telos`, `governance/decision-rights`, `governance/publication-policy`, `ideas/graph`, `ideas/map`, `knowledge/venture-profile`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people/team`, `people/team-plan`, `product`, `product/[id]`, `raw/dump`, `system/provenance`, `validation/go-to-market`, `validation/pricing`, `validation/product-market-fit`, `validation/solution` |
|
|
123
|
-
| `(beachhead)` | Can we win one segment repeatably, at a profitable cost? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/problem`, `foundation/telos`, `governance/decision-rights`, `governance/pillar`, `governance/pillar/[id]`, `governance/publication-policy`, `knowledge/venture-profile`, `marketing/content`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people/team`, `people/team-plan`, `product`, `product/[id]`, `product/anatomy`, `product/anatomy-answers`, `product/anatomy/[id]`, `purpose/account`, `purpose/account/[id]`, `system/provenance`, `validation/go-to-market`, `validation/operations-readiness`, `validation/pricing`, `validation/product-market-fit`, `validation/solution` |
|
|
124
|
-
| `(scale)` | How fast can we take the mass market? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/telos`, `governance/decision-rights`, `governance/exit`, `governance/ownership`, `governance/pillar`, `governance/pillar/[id]`, `governance/publication-policy`, `knowledge/knowledge-sources`, `knowledge/venture-profile`, `knowledge/where-used`, `marketing/content`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people/team`, `people/team-plan`, `product`, `product/[id]`, `product/anatomy`, `product/anatomy-answers`, `product/anatomy/[id]`, `purpose/account`, `purpose/account/[id]`, `system/provenance`, `validation/go-to-market`, `validation/operations-readiness`, `validation/pricing` |
|
|
125
|
-
| `(platform)` | What will others build on, so the venture can't be displaced? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/telos`, `governance/board`, `governance/decision-rights`, `governance/exit`, `governance/ownership`, `governance/pillar`, `governance/pillar/[id]`, `governance/publication-policy`, `knowledge/knowledge-sources`, `knowledge/venture-profile`, `knowledge/where-used`, `marketing/content`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people/team-plan`, `product`, `product/[id]`, `product/anatomy`, `product/anatomy-answers`, `product/anatomy/[id]`, `purpose/account`, `purpose/account/[id]`, `system/provenance`, `validation/operations-readiness` |
|
|
120
|
+
| `(discovery)` | Does a real problem exist, and who has it? | `.release/venture-package`, `decisions`, `decisions/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/problem`, `ideas/graph`, `ideas/map`, `knowledge/venture-profile`, `people`, `people/founders`, `people/founders/[id]`, `product`, `product/[id]`, `raw/dump`, `system/provenance` |
|
|
121
|
+
| `(validation)` | Will people adopt this solution and keep using it? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/problem`, `foundation/telos`, `governance/decision-rights`, `governance/publication-policy`, `ideas/graph`, `ideas/map`, `knowledge/venture-profile`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people`, `people/founders`, `people/founders/[id]`, `people/team`, `people/team-plan`, `product`, `product/[id]`, `raw/dump`, `system/provenance`, `validation/go-to-market`, `validation/pricing`, `validation/product-market-fit`, `validation/solution` |
|
|
122
|
+
| `(beachhead)` | Can we win one segment repeatably, at a profitable cost? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/problem`, `foundation/telos`, `glossary`, `glossary/[id]`, `governance/decision-rights`, `governance/pillar`, `governance/pillar/[id]`, `governance/publication-policy`, `knowledge/freshness-log`, `knowledge/venture-profile`, `marketing/brand`, `marketing/content`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people`, `people/founders`, `people/founders/[id]`, `people/team`, `people/team-plan`, `product`, `product/[id]`, `product/anatomy`, `product/anatomy-answers`, `product/anatomy/[id]`, `public/assets`, `purpose/account`, `purpose/account/[id]`, `purpose/money/summary`, `system/provenance`, `system/release`, `validation/go-to-market`, `validation/operations-readiness`, `validation/pricing`, `validation/product-market-fit`, `validation/solution` |
|
|
123
|
+
| `(scale)` | How fast can we take the mass market? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/telos`, `glossary`, `glossary/[id]`, `governance/decision-rights`, `governance/exit`, `governance/ownership`, `governance/pillar`, `governance/pillar/[id]`, `governance/publication-policy`, `knowledge/freshness-log`, `knowledge/knowledge-sources`, `knowledge/venture-profile`, `knowledge/where-used`, `marketing/brand`, `marketing/content`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people`, `people/founders`, `people/founders/[id]`, `people/team`, `people/team-plan`, `product`, `product/[id]`, `product/anatomy`, `product/anatomy-answers`, `product/anatomy/[id]`, `public/assets`, `purpose/account`, `purpose/account/[id]`, `purpose/money/summary`, `system/provenance`, `system/release`, `validation/go-to-market`, `validation/operations-readiness`, `validation/pricing` |
|
|
124
|
+
| `(platform)` | What will others build on, so the venture can't be displaced? | `.release/venture-package`, `decisions`, `decisions/[id]`, `evidence`, `evidence/[id]`, `foundation/alignment`, `foundation/icp`, `foundation/telos`, `glossary`, `glossary/[id]`, `governance/board`, `governance/decision-rights`, `governance/exit`, `governance/ownership`, `governance/pillar`, `governance/pillar/[id]`, `governance/publication-policy`, `knowledge/freshness-log`, `knowledge/knowledge-sources`, `knowledge/venture-profile`, `knowledge/where-used`, `marketing/brand`, `marketing/content`, `marketing/sitemap`, `operations/department`, `operations/handoff`, `operations/handoff/[id]`, `operations/site-presence`, `people`, `people/founders`, `people/founders/[id]`, `people/team-plan`, `product`, `product/[id]`, `product/anatomy`, `product/anatomy-answers`, `product/anatomy/[id]`, `public/assets`, `purpose/account`, `purpose/account/[id]`, `purpose/money/summary`, `system/provenance`, `system/release`, `validation/operations-readiness` |
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import { readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { join, extname, basename } from "node:path";
|
|
18
|
+
import { ventureFile } from "../../../schema/venture-paths.mjs";
|
|
18
19
|
|
|
19
20
|
// ---------------------------------------------------------------- lexicons
|
|
20
21
|
|
|
@@ -59,7 +60,7 @@ const jsonOut = flag("json");
|
|
|
59
60
|
function walk(dir, acc = []) {
|
|
60
61
|
for (const entry of readdirSync(dir)) {
|
|
61
62
|
if (entry === "node_modules" || entry.startsWith(".")) continue;
|
|
62
|
-
const full =
|
|
63
|
+
const full = ventureFile(dir, entry);
|
|
63
64
|
const st = statSync(full);
|
|
64
65
|
if (st.isDirectory()) walk(full, acc);
|
|
65
66
|
else if (extname(entry) === ".tsx" && !/\.(test|spec|stories)\.tsx$/.test(entry)) acc.push(full);
|
package/governance/layer.json
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1.0",
|
|
3
|
+
"note": "Roles a person can hold in a venture (EE-082). Agent roles are in agent-roles.json.",
|
|
4
|
+
"roles": [
|
|
5
|
+
{
|
|
6
|
+
"id": "founder",
|
|
7
|
+
"name": "Founder",
|
|
8
|
+
"kind": "builder",
|
|
9
|
+
"description": "Started the venture and owns it; alone, owns every function",
|
|
10
|
+
"founder": true,
|
|
11
|
+
"owns_when_solo": true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "co-founder",
|
|
15
|
+
"name": "Co-founder",
|
|
16
|
+
"kind": "builder",
|
|
17
|
+
"description": "One of two or more founders; owns the functions the team assigns",
|
|
18
|
+
"founder": true,
|
|
19
|
+
"owns_when_solo": true
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "general-partner",
|
|
23
|
+
"name": "General partner",
|
|
24
|
+
"kind": "investor",
|
|
25
|
+
"description": "Runs a fund or firm: sets the thesis, raises from limited partners, makes and manages investments",
|
|
26
|
+
"founder": true,
|
|
27
|
+
"owns_when_solo": true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "limited-partner",
|
|
31
|
+
"name": "Limited partner",
|
|
32
|
+
"kind": "investor",
|
|
33
|
+
"description": "Commits capital to a fund and receives reports; does not run it",
|
|
34
|
+
"founder": false,
|
|
35
|
+
"owns_when_solo": false
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "operator",
|
|
39
|
+
"name": "Operator",
|
|
40
|
+
"kind": "operator",
|
|
41
|
+
"description": "Runs one or more functions without founding the venture: an early employee or executive",
|
|
42
|
+
"founder": false,
|
|
43
|
+
"owns_when_solo": false
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "advisor",
|
|
47
|
+
"name": "Advisor",
|
|
48
|
+
"kind": "advisor",
|
|
49
|
+
"description": "Advises the founders; owns no function",
|
|
50
|
+
"founder": false,
|
|
51
|
+
"owns_when_solo": false
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "board-member",
|
|
55
|
+
"name": "Board member",
|
|
56
|
+
"kind": "governor",
|
|
57
|
+
"description": "Sits on the board and governs; owns no function",
|
|
58
|
+
"founder": false,
|
|
59
|
+
"owns_when_solo": false
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Who is acting (M-18, like cookies in a Server Action) and access on every read (F-5). Every action
|
|
2
|
+
// through the router carries who is acting, a person or an agent, and in which team-plan role. The
|
|
3
|
+
// router checks it before anything else, on every call: the actor is a person or an agent, an agent
|
|
4
|
+
// never acts in a role a person holds, and a venture can refuse role ids its team plan does not list
|
|
5
|
+
// (naive.config.json acting.unknown_roles). Each answer carries `acting` back. When who is acting
|
|
6
|
+
// changes between two calls on one interface, or the role's entry in the team plan changes, the next
|
|
7
|
+
// answer carries `acting_changed` with the routes the new identity may reach: the re-render.
|
|
8
|
+
//
|
|
9
|
+
// Access (P-27) is checked again at the record: a list read returns only the items the role may read,
|
|
10
|
+
// so a role allowed one product never sees the others. Credentials never enter here; connectors keep
|
|
11
|
+
// them, and the platform's stay in platform/ (EE-041).
|
|
12
|
+
|
|
13
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
14
|
+
import { createHash } from "node:crypto";
|
|
15
|
+
import { globsOf, mayReadItem, mayReadSome, roleOf, teamPlan } from "../schema/access.mjs";
|
|
16
|
+
import { configFor } from "../schema/naive-config.mjs";
|
|
17
|
+
|
|
18
|
+
export { mayReadItem, mayReadSome };
|
|
19
|
+
|
|
20
|
+
/** Checks who is acting on a venture. Returns { ok, who: { kind, role, known, occupant } } or { ok: false, error }. */
|
|
21
|
+
export function actingOf(dir, kind, roleId) {
|
|
22
|
+
const who = { kind, role: roleId ?? null };
|
|
23
|
+
if (kind !== "agent" && kind !== "person") return { ok: false, error: `the actor is a person or an agent, not ${kind}`, who };
|
|
24
|
+
if (!dir || !roleId) return { ok: true, who };
|
|
25
|
+
const plan = teamPlan(dir);
|
|
26
|
+
if (!plan) return { ok: true, who };
|
|
27
|
+
const role = (plan.roles ?? []).find((r) => r.id === roleId);
|
|
28
|
+
if (!role) {
|
|
29
|
+
let mode = "allow";
|
|
30
|
+
try { mode = configFor(dir).acting?.unknown_roles ?? "allow"; } catch {}
|
|
31
|
+
if (mode === "refuse") return { ok: false, error: `${roleId} is not a role in the team plan, and naive.config.json refuses unknown roles (acting.unknown_roles)`, who };
|
|
32
|
+
return { ok: true, who: { ...who, known: false } };
|
|
33
|
+
}
|
|
34
|
+
if (kind === "agent" && role.occupant === "person") return { ok: false, error: `${roleId} is a person's role in the team plan: an agent may not act in it`, who };
|
|
35
|
+
return { ok: true, who: { ...who, known: true, occupant: role.occupant } };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** A fingerprint of who is acting: kind, role and the role's team-plan entry, so a changed entry counts as a change. */
|
|
39
|
+
export function fingerprint(dir, who) {
|
|
40
|
+
return createHash("sha256").update(JSON.stringify({ kind: who.kind, role: who.role, entry: dir && who.role ? roleOf(dir, who.role) : null })).digest("hex");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** The routes an identity may reach: globs to read and write. */
|
|
44
|
+
export function reach(dir, roleId) {
|
|
45
|
+
const g = dir && roleId ? globsOf(dir, roleId) : null;
|
|
46
|
+
return g ?? { read: ["**"], write: ["**"] };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The id of a collection item from its file, given the collection's file patterns (products/*.json). */
|
|
50
|
+
export function itemId(patterns, path) {
|
|
51
|
+
for (const g of patterns) {
|
|
52
|
+
if (!g.includes("*")) continue;
|
|
53
|
+
const m = path.match(new RegExp("^" + g.split("*").map((s) => s.replace(/[.+^${}()|[\]\\]/g, "\\$&")).join("([^/]*)") + "$"));
|
|
54
|
+
if (m) return m[1];
|
|
55
|
+
}
|
|
56
|
+
return path;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const nested = new AsyncLocalStorage();
|
|
60
|
+
const last = new Map();
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Runs one router action with who is acting checked first and carried on the answer. inner is the
|
|
64
|
+
* router's own call; findDir finds a venture folder. Calls the router makes inside another call
|
|
65
|
+
* (a view's read, the overview's slots) are checked too, but only the outer call tracks changes.
|
|
66
|
+
*/
|
|
67
|
+
export async function actingCall(a, inner, findDir) {
|
|
68
|
+
const kind = a.actor ?? "agent", role = a.actor_id ?? process.env.MENTURA_ACTOR_ID;
|
|
69
|
+
let dir = null;
|
|
70
|
+
try { dir = a.venture ? findDir(a.venture, a.workspace) : null; } catch {}
|
|
71
|
+
const check = actingOf(dir, kind, role);
|
|
72
|
+
const acting = { kind, role: role ?? null };
|
|
73
|
+
if (!check.ok) return { ok: false, error: check.error, acting };
|
|
74
|
+
if (nested.getStore()) return { ...(await inner(a)), acting };
|
|
75
|
+
let changed = null;
|
|
76
|
+
if (dir) {
|
|
77
|
+
const key = `${dir}\0${a.via ?? "router"}`, fp = fingerprint(dir, check.who), prev = last.get(key);
|
|
78
|
+
if (prev && prev.fp !== fp) changed = { from: prev.acting, to: acting, may: reach(dir, role) };
|
|
79
|
+
last.set(key, { fp, acting });
|
|
80
|
+
}
|
|
81
|
+
const r = await nested.run(true, () => inner(a));
|
|
82
|
+
return { ...r, acting, ...(changed ? { acting_changed: changed } : {}) };
|
|
83
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-code",
|
|
3
|
+
"title": "Claude Code",
|
|
4
|
+
"kind": "harness",
|
|
5
|
+
"integration": "claude-code",
|
|
6
|
+
"reads": ["CLAUDE.md", ".claude/skills/*/SKILL.md"],
|
|
7
|
+
"files": [
|
|
8
|
+
{ "path": "CLAUDE.md", "text": "@AGENTS.md\n" }
|
|
9
|
+
],
|
|
10
|
+
"skills": ".claude/skills",
|
|
11
|
+
"sources": [
|
|
12
|
+
"https://docs.claude.com/en/docs/claude-code/memory",
|
|
13
|
+
"https://docs.claude.com/en/docs/claude-code/skills"
|
|
14
|
+
],
|
|
15
|
+
"note": "Claude Code reads CLAUDE.md, which imports the venture's AGENTS.md with @AGENTS.md, and loads project skills from .claude/skills/<name>/SKILL.md. The adapter copies the skill of each package open now, so the agent has the installed version's skill."
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "codex",
|
|
3
|
+
"title": "Codex",
|
|
4
|
+
"kind": "harness",
|
|
5
|
+
"integration": "codex",
|
|
6
|
+
"reads": ["AGENTS.md"],
|
|
7
|
+
"files": [],
|
|
8
|
+
"skills": null,
|
|
9
|
+
"sources": [
|
|
10
|
+
"https://agents.md/",
|
|
11
|
+
"https://github.com/openai/codex"
|
|
12
|
+
],
|
|
13
|
+
"note": "Codex reads AGENTS.md natively, from the venture root down to the folder it works in, which is the layout chain Naive already writes. Nothing else is needed."
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cursor",
|
|
3
|
+
"title": "Cursor",
|
|
4
|
+
"kind": "harness",
|
|
5
|
+
"integration": "cursor",
|
|
6
|
+
"reads": ["AGENTS.md", ".cursor/rules/*.mdc"],
|
|
7
|
+
"files": [
|
|
8
|
+
{ "path": ".cursor/rules/naive.mdc", "text": "---\ndescription: How to work in this Naive venture\nalwaysApply: true\n---\n\nRead AGENTS.md at the venture root, and the AGENTS.md of each folder down to the one you work in, before writing anything. Write records through the router (node interface/cli/mentura.mjs), never by editing files, and never read _private/.\n" }
|
|
9
|
+
],
|
|
10
|
+
"skills": null,
|
|
11
|
+
"sources": [
|
|
12
|
+
"https://docs.cursor.com/context/rules",
|
|
13
|
+
"https://agents.md/"
|
|
14
|
+
],
|
|
15
|
+
"note": "Cursor reads AGENTS.md and project rules in .cursor/rules/. The adapter adds one rule that always applies and points at the AGENTS.md chain."
|
|
16
|
+
}
|