@elevasis/ui 2.48.0 → 2.50.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/dist/api/index.js +4 -3
- package/dist/app/index.d.ts +132 -0
- package/dist/app/index.js +8 -6
- package/dist/auth/index.js +8 -6
- package/dist/charts/index.js +8 -6
- package/dist/{chunk-SOGPJFO6.js → chunk-4UA62IDF.js} +1 -1
- package/dist/{chunk-OFLWSKSC.js → chunk-7Q5THR43.js} +1 -1
- package/dist/chunk-EJL4U7OZ.js +79 -0
- package/dist/chunk-FVOMKZ7S.js +118 -0
- package/dist/{chunk-FVI3AMBM.js → chunk-SBNC3FRX.js} +163 -214
- package/dist/{chunk-CDZB24OR.js → chunk-XOPLS4S6.js} +1 -85
- package/dist/components/index.d.ts +132 -0
- package/dist/components/index.js +8 -6
- package/dist/components/navigation/index.js +8 -6
- package/dist/features/auth/index.d.ts +132 -0
- package/dist/features/auth/index.js +9 -7
- package/dist/features/clients/index.js +8 -6
- package/dist/features/crm/index.d.ts +132 -0
- package/dist/features/crm/index.js +8 -6
- package/dist/features/dashboard/index.js +8 -6
- package/dist/features/delivery/index.d.ts +132 -0
- package/dist/features/delivery/index.js +8 -6
- package/dist/features/knowledge/index.js +8 -6
- package/dist/features/lead-gen/index.js +8 -6
- package/dist/features/monitoring/index.js +8 -6
- package/dist/features/monitoring/requests/index.js +9 -7
- package/dist/features/operations/index.d.ts +2 -2
- package/dist/features/operations/index.js +8 -6
- package/dist/features/public-agent-chat/index.d.ts +161 -0
- package/dist/features/public-agent-chat/index.js +413 -0
- package/dist/features/settings/index.d.ts +132 -0
- package/dist/features/settings/index.js +8 -6
- package/dist/hooks/access/index.js +8 -6
- package/dist/hooks/delivery/index.d.ts +132 -0
- package/dist/hooks/delivery/index.js +8 -6
- package/dist/hooks/index.d.ts +135 -1
- package/dist/hooks/index.js +8 -6
- package/dist/hooks/published.d.ts +135 -1
- package/dist/hooks/published.js +8 -6
- package/dist/index.d.ts +135 -1
- package/dist/index.js +9 -7
- package/dist/initialization/index.d.ts +132 -0
- package/dist/knowledge/index.js +264 -30
- package/dist/{knowledge-search-index-MHOBQTT3.js → knowledge-search-index-JOPRYZN6.js} +600 -561
- package/dist/layout/index.js +8 -6
- package/dist/organization/index.js +8 -6
- package/dist/profile/index.d.ts +132 -0
- package/dist/provider/index.d.ts +132 -0
- package/dist/provider/index.js +8 -6
- package/dist/provider/published.d.ts +132 -0
- package/dist/provider/published.js +8 -6
- package/dist/supabase/index.d.ts +258 -0
- package/dist/test-utils/index.js +4 -3
- package/dist/types/index.d.ts +135 -3
- package/dist/utils/index.js +2 -1
- package/package.json +10 -5
|
@@ -886,620 +886,659 @@ Launch Checklist
|
|
|
886
886
|
id: "knowledge.client-cli-overview",
|
|
887
887
|
title: "Client CLI Overview",
|
|
888
888
|
summary: "Reference for the seven client:* SDK CLI commands -- list, get, status, resolve, create, update, and delete -- with drill-down recipes for navigating client lineage, org-wide rollups, and write operations.",
|
|
889
|
-
bodyText: `Overview
|
|
890
|
-
|
|
891
|
-
The client: commands expose the clients hub through the SDK CLI. Use them to paginate clients, inspect individual client lineage, check org-wide status rollups, resolve a fuzzy name to a client ID, and mutate clients with create, update, and delete operations
|
|
892
|
-
|
|
893
|
-
All examples below use the canonical monorepo invocation pattern. Tenant projects inside their own operations/ directory drop the -C packages/elevasis-operations prefix and run pnpm exec elevasis-sdk <cmd> directly
|
|
894
|
-
|
|
895
|
-
client:list
|
|
896
|
-
|
|
897
|
-
Lists clients for the authenticated organization with optional filtering and pagination
|
|
898
|
-
|
|
899
|
-
Purpose: Paginate all clients or narrow by status or search term to find the right client ID before drilling in with client:get
|
|
900
|
-
|
|
901
|
-
Monorepo invocation
|
|
902
|
-
|
|
903
|
-
bash
|
|
904
|
-
pnpm -C packages/elevasis-operations exec elevasis-sdk client:list
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
- --
|
|
916
|
-
- --
|
|
917
|
-
- --
|
|
918
|
-
|
|
919
|
-
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
client
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
4. Retry client:delete <id> --pretty once all links are resolved.\r
|
|
1118
|
-
5. Confirm deletion with client:list --search "<name>" -- the record should no longer appear.\r
|
|
1119
|
-
\r
|
|
1120
|
-
Typical Workflow\r
|
|
1121
|
-
\r
|
|
1122
|
-
A common session combining read and write commands:\r
|
|
1123
|
-
\r
|
|
1124
|
-
1. client:status --pretty -- check org-wide distribution.\r
|
|
1125
|
-
2. client:resolve "Acme" -- get the Acme client ID.\r
|
|
1126
|
-
3. client:get <id> --pretty -- confirm lineage (deal, company, contact, projects).\r
|
|
1127
|
-
4. project:update <projectId> --client <id> -- link a project if missing.\r
|
|
1128
|
-
5. client:get <id> --pretty -- verify the linkage appears in the projects array.\r
|
|
1129
|
-
6. client:create --name "New Corp" --status onboarding --pretty -- provision a new client.\r
|
|
1130
|
-
7. client:update <id> --status active --pretty -- transition a client to active.\r
|
|
889
|
+
bodyText: `Overview
|
|
890
|
+
|
|
891
|
+
The client: commands expose the clients hub through the SDK CLI. Use them to paginate clients, inspect individual client lineage, check org-wide status rollups, resolve a fuzzy name to a client ID, and mutate clients with create, update, and delete operations.
|
|
892
|
+
|
|
893
|
+
All examples below use the canonical monorepo invocation pattern. Tenant projects inside their own operations/ directory drop the -C packages/elevasis-operations prefix and run pnpm exec elevasis-sdk <cmd> directly.
|
|
894
|
+
|
|
895
|
+
client:list
|
|
896
|
+
|
|
897
|
+
Lists clients for the authenticated organization with optional filtering and pagination.
|
|
898
|
+
|
|
899
|
+
Purpose: Paginate all clients or narrow by status or search term to find the right client ID before drilling in with client:get.
|
|
900
|
+
|
|
901
|
+
Monorepo invocation:
|
|
902
|
+
|
|
903
|
+
bash
|
|
904
|
+
pnpm -C packages/elevasis-operations exec elevasis-sdk client:list
|
|
905
|
+
|
|
906
|
+
Tenant invocation (from inside operations/):
|
|
907
|
+
|
|
908
|
+
bash
|
|
909
|
+
pnpm exec elevasis-sdk client:list
|
|
910
|
+
|
|
911
|
+
Key flags:
|
|
912
|
+
|
|
913
|
+
- --status <value> -- filter by client status (e.g. active, inactive, prospect)
|
|
914
|
+
- --search <term> -- full-text search against client name
|
|
915
|
+
- --limit <n> -- maximum rows to return (default varies by server)
|
|
916
|
+
- --offset <n> -- pagination offset
|
|
917
|
+
- --pretty -- pretty-print JSON output
|
|
918
|
+
|
|
919
|
+
Drill-down recipe:
|
|
920
|
+
|
|
921
|
+
1. Run client:list --pretty to scan names and IDs.
|
|
922
|
+
2. Use --search to narrow when the list is long.
|
|
923
|
+
3. Copy the id from a row and pass it to client:get <id> for the full lineage payload (linked deal, primary company, primary contact, projects).
|
|
924
|
+
|
|
925
|
+
client:get
|
|
926
|
+
|
|
927
|
+
Fetches a single client record with its full lineage payload.
|
|
928
|
+
|
|
929
|
+
Purpose: Inspect one client in detail -- its associated deal, primary company, primary contact, and linked projects. Use this to confirm linkage after wiring a project to a client via project:update --client.
|
|
930
|
+
|
|
931
|
+
Monorepo invocation:
|
|
932
|
+
|
|
933
|
+
bash
|
|
934
|
+
pnpm -C packages/elevasis-operations exec elevasis-sdk client:get <clientId>
|
|
935
|
+
|
|
936
|
+
Tenant invocation:
|
|
937
|
+
|
|
938
|
+
bash
|
|
939
|
+
pnpm exec elevasis-sdk client:get <clientId>
|
|
940
|
+
|
|
941
|
+
Key flags:
|
|
942
|
+
|
|
943
|
+
- --pretty -- pretty-print JSON output
|
|
944
|
+
|
|
945
|
+
Drill-down recipe:
|
|
946
|
+
|
|
947
|
+
1. Obtain <clientId> from client:list or client:resolve.
|
|
948
|
+
2. Run client:get <clientId> --pretty.
|
|
949
|
+
3. Check projects array to confirm which projects are linked.
|
|
950
|
+
4. If projects is empty and a linkage was expected, run project:update <projectId> --client <clientId> to attach it.
|
|
951
|
+
5. Re-run client:get to verify the lineage updated.
|
|
952
|
+
|
|
953
|
+
client:status
|
|
954
|
+
|
|
955
|
+
Returns an org-wide rollup of client counts grouped by status.
|
|
956
|
+
|
|
957
|
+
Purpose: High-level health check -- how many clients are active, how many are in each pipeline stage -- without enumerating every record.
|
|
958
|
+
|
|
959
|
+
Monorepo invocation:
|
|
960
|
+
|
|
961
|
+
bash
|
|
962
|
+
pnpm -C packages/elevasis-operations exec elevasis-sdk client:status
|
|
963
|
+
|
|
964
|
+
Tenant invocation:
|
|
965
|
+
|
|
966
|
+
bash
|
|
967
|
+
pnpm exec elevasis-sdk client:status
|
|
968
|
+
|
|
969
|
+
Key flags:
|
|
970
|
+
|
|
971
|
+
- --pretty -- pretty-print JSON output
|
|
972
|
+
|
|
973
|
+
Drill-down recipe:
|
|
974
|
+
|
|
975
|
+
1. Run client:status --pretty to see counts per status bucket.
|
|
976
|
+
2. If a bucket looks unexpectedly large or small, run client:list --status <value> to enumerate the records in that bucket.
|
|
977
|
+
3. Use client:get <id> on specific records to investigate lineage gaps.
|
|
978
|
+
|
|
979
|
+
client:resolve
|
|
980
|
+
|
|
981
|
+
Fuzzy-resolves a client name to a client ID.
|
|
982
|
+
|
|
983
|
+
Purpose: Convert a partial or approximate name to the canonical UUID before passing --client to project commands. Mirrors project:resolve in shape.
|
|
984
|
+
|
|
985
|
+
Monorepo invocation:
|
|
986
|
+
|
|
987
|
+
bash
|
|
988
|
+
pnpm -C packages/elevasis-operations exec elevasis-sdk client:resolve "<query>"
|
|
989
|
+
|
|
990
|
+
Tenant invocation:
|
|
991
|
+
|
|
992
|
+
bash
|
|
993
|
+
pnpm exec elevasis-sdk client:resolve "<query>"
|
|
994
|
+
|
|
995
|
+
Key flags:
|
|
996
|
+
|
|
997
|
+
None beyond the positional <query> argument. Output is the resolved client ID (or a ranked list if multiple matches exist).
|
|
998
|
+
|
|
999
|
+
Drill-down recipe:
|
|
1000
|
+
|
|
1001
|
+
1. Run client:resolve "partial name" -- the command returns the best-match client ID.
|
|
1002
|
+
2. Pass the returned ID to project:create --client <id>, project:update --client <id>, or project:list --client <id>.
|
|
1003
|
+
3. If multiple matches are returned, refine the query or use client:list --search "<term>" to inspect candidates before committing.
|
|
1004
|
+
|
|
1005
|
+
client:create
|
|
1006
|
+
|
|
1007
|
+
Creates a new client record for the authenticated organization.
|
|
1008
|
+
|
|
1009
|
+
Purpose: Provision a client directly from the CLI -- useful for scripted onboarding or bulk imports where no source deal exists yet. The only required field is --name; all relationship IDs are optional and can be set later via client:update.
|
|
1010
|
+
|
|
1011
|
+
Monorepo invocation:
|
|
1012
|
+
|
|
1013
|
+
bash
|
|
1014
|
+
pnpm -C packages/elevasis-operations exec elevasis-sdk client:create --name "Acme Corp"
|
|
1015
|
+
|
|
1016
|
+
Tenant invocation (from inside operations/):
|
|
1017
|
+
|
|
1018
|
+
bash
|
|
1019
|
+
pnpm exec elevasis-sdk client:create --name "Acme Corp"
|
|
1020
|
+
|
|
1021
|
+
Key flags:
|
|
1022
|
+
|
|
1023
|
+
- --name <name> -- (required) client display name
|
|
1024
|
+
- --status <value> -- initial status: active | onboarding | paused | completed | churned
|
|
1025
|
+
- --source-deal-id <uuid> -- UUID of the originating deal
|
|
1026
|
+
- --primary-company-id <uuid> -- UUID of the primary company record
|
|
1027
|
+
- --primary-contact-id <uuid> -- UUID of the primary contact record
|
|
1028
|
+
- --metadata <json> -- arbitrary metadata as a JSON string (e.g. '{"tier":"enterprise"}')
|
|
1029
|
+
- --pretty -- render a human-readable summary instead of raw JSON
|
|
1030
|
+
|
|
1031
|
+
Drill-down recipe:
|
|
1032
|
+
|
|
1033
|
+
1. Run client:create --name "Acme Corp" --status onboarding --pretty to create and confirm the new record.
|
|
1034
|
+
2. Copy the ID from the pretty output (or id from raw JSON) for subsequent commands.
|
|
1035
|
+
3. Run client:get <id> --pretty to verify the full lineage payload was initialized correctly.
|
|
1036
|
+
4. If a source deal exists, pass --source-deal-id <uuid> at create time or backfill with client:update <id> --source-deal-id <uuid>.
|
|
1037
|
+
|
|
1038
|
+
client:update
|
|
1039
|
+
|
|
1040
|
+
Updates one or more fields on an existing client. Accepts a UUID or fuzzy name as the \\<id\\> argument.
|
|
1041
|
+
|
|
1042
|
+
Purpose: Rename a client, change its status, swap or clear relationship IDs, or patch arbitrary metadata -- without leaving the CLI. The command enforces a client-side "at-least-one-field" guard and rejects mutually exclusive flag pairs before making any API call.
|
|
1043
|
+
|
|
1044
|
+
Monorepo invocation:
|
|
1045
|
+
|
|
1046
|
+
bash
|
|
1047
|
+
pnpm -C packages/elevasis-operations exec elevasis-sdk client:update <id> --status active
|
|
1048
|
+
|
|
1049
|
+
Tenant invocation:
|
|
1050
|
+
|
|
1051
|
+
bash
|
|
1052
|
+
pnpm exec elevasis-sdk client:update <id> --status active
|
|
1053
|
+
|
|
1054
|
+
Key flags:
|
|
1055
|
+
|
|
1056
|
+
- --name <name> -- new client display name
|
|
1057
|
+
- --status <value> -- new status: active | onboarding | paused | completed | churned
|
|
1058
|
+
- --source-deal-id <uuid> -- set or replace the source deal link
|
|
1059
|
+
- --clear-source-deal -- remove the source deal link (sets sourceDealId to null; mutually exclusive with --source-deal-id)
|
|
1060
|
+
- --primary-company-id <uuid> -- set or replace the primary company
|
|
1061
|
+
- --clear-primary-company -- remove the primary company link (mutually exclusive with --primary-company-id)
|
|
1062
|
+
- --primary-contact-id <uuid> -- set or replace the primary contact
|
|
1063
|
+
- --clear-primary-contact -- remove the primary contact link (mutually exclusive with --primary-contact-id)
|
|
1064
|
+
- --metadata <json> -- replace metadata with the provided JSON string
|
|
1065
|
+
- --pretty -- render a human-readable summary instead of raw JSON
|
|
1066
|
+
|
|
1067
|
+
Drill-down recipe:
|
|
1068
|
+
|
|
1069
|
+
1. Obtain \\<id\\> from client:list, client:resolve, or the output of client:create.
|
|
1070
|
+
2. Pass only the fields to change -- the command patches rather than replaces the record.
|
|
1071
|
+
3. To unlink a relationship (e.g. remove the source deal), use --clear-source-deal rather than omitting the flag; omitting leaves the existing value unchanged.
|
|
1072
|
+
4. After update, run client:get <id> --pretty to confirm all fields reflect the expected state.
|
|
1073
|
+
5. If the command exits with CONFLICTINGFLAGS on stderr, you passed both a set flag and its --clear- counterpart -- remove one and retry.
|
|
1074
|
+
|
|
1075
|
+
client:delete
|
|
1076
|
+
|
|
1077
|
+
Deletes a client record. Accepts a UUID or fuzzy name as the \\<id\\> argument.
|
|
1078
|
+
|
|
1079
|
+
Purpose: Remove a client that was created in error or is no longer relevant. The API enforces a 409 Conflict when the client has linked rows (deals, projects, companies, contacts). The CLI surfaces the API error message verbatim so you know which links to resolve first.
|
|
1080
|
+
|
|
1081
|
+
Monorepo invocation:
|
|
1082
|
+
|
|
1083
|
+
bash
|
|
1084
|
+
pnpm -C packages/elevasis-operations exec elevasis-sdk client:delete <id>
|
|
1085
|
+
|
|
1086
|
+
Tenant invocation:
|
|
1087
|
+
|
|
1088
|
+
bash
|
|
1089
|
+
pnpm exec elevasis-sdk client:delete <id>
|
|
1090
|
+
|
|
1091
|
+
Key flags:
|
|
1092
|
+
|
|
1093
|
+
- --pretty -- render a human-readable confirmation instead of raw JSON
|
|
1094
|
+
- --api-url <url> -- override the API base URL (advanced; rarely needed)
|
|
1095
|
+
|
|
1096
|
+
Drill-down recipe:
|
|
1097
|
+
|
|
1098
|
+
1. Run client:get <id> --pretty to confirm which projects and deal links are attached before attempting deletion.
|
|
1099
|
+
2. Run client:delete <id> --pretty.
|
|
1100
|
+
3. If the API returns a 409, the error message lists the linked record counts (deals, projects, companies, contacts). Unlink or reassign those records first:
|
|
1101
|
+
- Projects: project:update <projectId> --clear-client (or reassign with --client <otherId>)
|
|
1102
|
+
- Deals: handled via the acquisition domain; no dedicated CLI command today
|
|
1103
|
+
4. Retry client:delete <id> --pretty once all links are resolved.
|
|
1104
|
+
5. Confirm deletion with client:list --search "<name>" -- the record should no longer appear.
|
|
1105
|
+
|
|
1106
|
+
Typical Workflow
|
|
1107
|
+
|
|
1108
|
+
A common session combining read and write commands:
|
|
1109
|
+
|
|
1110
|
+
1. client:status --pretty -- check org-wide distribution.
|
|
1111
|
+
2. client:resolve "Acme" -- get the Acme client ID.
|
|
1112
|
+
3. client:get <id> --pretty -- confirm lineage (deal, company, contact, projects).
|
|
1113
|
+
4. project:update <projectId> --client <id> -- link a project if missing.
|
|
1114
|
+
5. client:get <id> --pretty -- verify the linkage appears in the projects array.
|
|
1115
|
+
6. client:create --name "New Corp" --status onboarding --pretty -- provision a new client.
|
|
1116
|
+
7. client:update <id> --status active --pretty -- transition a client to active.
|
|
1131
1117
|
8. client:delete <id> --pretty -- remove a client (API rejects with 409 if linked rows exist).`
|
|
1132
1118
|
},
|
|
1133
1119
|
{
|
|
1134
1120
|
id: "knowledge.youtube-obs-recording-setup",
|
|
1135
1121
|
title: "YouTube OBS Recording Setup",
|
|
1136
1122
|
summary: "Canonical OBS Studio recording setup for Elevasis YouTube production, covering 1080p60 screen capture, safe recording format, NVENC quality settings, audio routing, face-camera scenes, and pre-recording checks.",
|
|
1137
|
-
bodyText: `Overview
|
|
1138
|
-
|
|
1139
|
-
Use this setup for Elevasis YouTube recordings that combine a short face-camera intro with Command Center or workflow screen capture. The target output is a clean 1080p60 source file that YouTube can re-encode without avoidable motion, audio, or color artifacts
|
|
1140
|
-
|
|
1141
|
-
Baseline configuration
|
|
1142
|
-
|
|
1143
|
-
text
|
|
1144
|
-
Video: 1920x1080, 60fps, NV12, Rec. 709 Partial
|
|
1145
|
-
Encode: NVENC H.264, CQP 18, P5 preset, High profile
|
|
1146
|
-
Format: MKV with automatic remux to MP4
|
|
1147
|
-
Audio: 48 kHz stereo, 320 kbps AAC, mixed plus mic-only tracks
|
|
1148
|
-
Camera: Insta360 Link 2C at 1080p60 with circle mask
|
|
1149
|
-
Scenes: Face + Screen on F5, Screen Only on F6
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
Recording
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
-
|
|
1381
|
-
-
|
|
1382
|
-
- Upload the OBS-remuxed MP4 directly unless the video was edited.\r
|
|
1383
|
-
- If editing in DaVinci Resolve or Premiere, render H.264 at 50 Mbps CBR for 1080p60 or use the YouTube preset.\r
|
|
1384
|
-
\r
|
|
1385
|
-
The OBS output should match YouTube's expected upload shape: MP4 container, H.264 video, AAC-LC audio, 48 kHz stereo, Rec. 709 limited range.\r
|
|
1386
|
-
\r
|
|
1387
|
-
Pre-Recording Checklist\r
|
|
1388
|
-
\r
|
|
1389
|
-
- Scarlett 2i2 phantom power is on and voice peaks around -12 dB.\r
|
|
1390
|
-
- Correct OBS scene is selected, usually Face + Screen.\r
|
|
1391
|
-
- Insta360 Link Controller has AI tracking and HDR enabled when needed.\r
|
|
1392
|
-
- Door is closed, fan or AC is off, and the room is controlled.\r
|
|
1393
|
-
- OBS mic meter peaks in green or yellow, never red.\r
|
|
1394
|
-
- A 10-second test recording has been played back for audio, video quality, and facecam position.\r
|
|
1123
|
+
bodyText: `Overview
|
|
1124
|
+
|
|
1125
|
+
Use this setup for Elevasis YouTube recordings that combine a short face-camera intro with Command Center or workflow screen capture. The target output is a clean 1080p60 source file that YouTube can re-encode without avoidable motion, audio, or color artifacts.
|
|
1126
|
+
|
|
1127
|
+
Baseline configuration:
|
|
1128
|
+
|
|
1129
|
+
text
|
|
1130
|
+
Video: 1920x1080, 60fps, NV12, Rec. 709 Partial
|
|
1131
|
+
Encode: NVENC H.264, CQP 18, P5 preset, High profile
|
|
1132
|
+
Format: MKV with automatic remux to MP4
|
|
1133
|
+
Audio: 48 kHz stereo, 320 kbps AAC, mixed plus mic-only tracks
|
|
1134
|
+
Camera: Insta360 Link 2C at 1080p60 with circle mask
|
|
1135
|
+
Scenes: Face + Screen on F5, Screen Only on F6
|
|
1136
|
+
|
|
1137
|
+
Prefer 1080p60 over 4K30 for screen recordings. Smooth cursor motion, scrolling, typing, and app transitions matter more than pixel density, and most viewers watch at 1080p or below. 4K30 produces larger files, slower editing, and visibly choppier screen motion.
|
|
1138
|
+
|
|
1139
|
+
Recording Output
|
|
1140
|
+
|
|
1141
|
+
Record to MKV, not MP4. MKV writes continuously, so a crash usually leaves the file usable. MP4 writes its index at the end, so a crash can corrupt the recording.
|
|
1142
|
+
|
|
1143
|
+
Enable automatic remux:
|
|
1144
|
+
|
|
1145
|
+
text
|
|
1146
|
+
Settings > Advanced > Recording > Automatically remux to mp4
|
|
1147
|
+
|
|
1148
|
+
After each recording, upload the remuxed MP4 and keep the MKV as the backup.
|
|
1149
|
+
|
|
1150
|
+
Use the advanced recording output mode:
|
|
1151
|
+
|
|
1152
|
+
text
|
|
1153
|
+
Settings > Output > Output Mode: Advanced
|
|
1154
|
+
Recording Tab:
|
|
1155
|
+
Type: Standard
|
|
1156
|
+
Recording Format: mkv
|
|
1157
|
+
Encoder: NVIDIA NVENC H.264
|
|
1158
|
+
Rate Control: CQP
|
|
1159
|
+
CQ Level: 18
|
|
1160
|
+
Keyframe Interval: 2
|
|
1161
|
+
Preset: P5 (Slow)
|
|
1162
|
+
Profile: high
|
|
1163
|
+
Look-ahead: checked
|
|
1164
|
+
Psycho Visual Tuning: checked
|
|
1165
|
+
Max B-frames: 2
|
|
1166
|
+
|
|
1167
|
+
CQP 18 is the stable quality target for screen content. It is visually lossless for this use case and gives YouTube a high-quality source before its VP9 or AV1 re-encode.
|
|
1168
|
+
|
|
1169
|
+
Fallback encoders:
|
|
1170
|
+
|
|
1171
|
+
- AMD GPU: use AMD HW H.264 (AMF) with equivalent CQP settings.
|
|
1172
|
+
- No dedicated GPU: use x264, CRF 18, CPU preset slow, or medium if the CPU struggles.
|
|
1173
|
+
|
|
1174
|
+
Set audio bitrates:
|
|
1175
|
+
|
|
1176
|
+
text
|
|
1177
|
+
Output > Advanced > Audio:
|
|
1178
|
+
Track 1: 320 kbps
|
|
1179
|
+
Track 2: 320 kbps
|
|
1180
|
+
|
|
1181
|
+
Video Settings
|
|
1182
|
+
|
|
1183
|
+
Use a 1080p canvas and output:
|
|
1184
|
+
|
|
1185
|
+
text
|
|
1186
|
+
Settings > Video:
|
|
1187
|
+
Base (Canvas) Resolution: 1920x1080
|
|
1188
|
+
Output (Scaled) Resolution: 1920x1080
|
|
1189
|
+
Downscale Filter: Lanczos (36 samples)
|
|
1190
|
+
Common FPS Values: 60
|
|
1191
|
+
|
|
1192
|
+
Use Rec. 709 limited-range color:
|
|
1193
|
+
|
|
1194
|
+
text
|
|
1195
|
+
Settings > Advanced:
|
|
1196
|
+
Color Format: NV12
|
|
1197
|
+
Color Space: 709
|
|
1198
|
+
Color Range: Partial
|
|
1199
|
+
|
|
1200
|
+
YouTube expects Rec. 709 limited range. Full range can produce washed-out or overly contrasty results after processing.
|
|
1201
|
+
|
|
1202
|
+
For a 3440x1440 ultrawide monitor, crop the display capture to the center 16:9 region before it is downscaled:
|
|
1203
|
+
|
|
1204
|
+
1. Add Display Capture for the primary monitor.
|
|
1205
|
+
2. Right-click the source and open Transform > Edit Transform.
|
|
1206
|
+
3. Set Crop Left to 440 and Crop Right to 440.
|
|
1207
|
+
4. Right-click the source again and select Transform > Fit to Screen.
|
|
1208
|
+
|
|
1209
|
+
This crops the capture to the center 2560x1440 region. Keep recorded windows inside that center area. A Windows 11 FancyZones center 16:9 zone is useful for keeping Command Center, browser, and terminal windows inside the captured area.
|
|
1210
|
+
|
|
1211
|
+
Use Window Capture only when the recording is limited to one browser window. Display Capture is better for tutorials that switch windows, show the taskbar, or tile terminal and browser views.
|
|
1212
|
+
|
|
1213
|
+
Audio Settings
|
|
1214
|
+
|
|
1215
|
+
Global audio settings:
|
|
1216
|
+
|
|
1217
|
+
text
|
|
1218
|
+
Settings > Audio:
|
|
1219
|
+
Sample Rate: 48 kHz
|
|
1220
|
+
Channels: Stereo
|
|
1221
|
+
Desktop Audio: Default
|
|
1222
|
+
Mic/Auxiliary Audio: Focusrite USB Audio (Scarlett 2i2)
|
|
1223
|
+
|
|
1224
|
+
Set the Focusrite input in Windows before recording:
|
|
1225
|
+
|
|
1226
|
+
1. Open Windows Sound Settings.
|
|
1227
|
+
2. Select the Focusrite USB Audio input.
|
|
1228
|
+
3. Set format to 48000 Hz, 24-bit.
|
|
1229
|
+
|
|
1230
|
+
Physical Focusrite setup:
|
|
1231
|
+
|
|
1232
|
+
- Turn 48V phantom power on for the Lewitt LCT 240 PRO condenser.
|
|
1233
|
+
- Start input gain at 12 o'clock and adjust so peaks land around -12 dB.
|
|
1234
|
+
- Keep Direct Monitor off to avoid double-monitoring.
|
|
1235
|
+
|
|
1236
|
+
Apply OBS mic filters to the Mic/Aux source in this exact order:
|
|
1237
|
+
|
|
1238
|
+
| Order | Filter | Settings |
|
|
1239
|
+
| ----- | ----------------- | ------------------------------------------------------------------------ |
|
|
1240
|
+
| 1 | Noise Suppression | RNNoise |
|
|
1241
|
+
| 2 | Noise Gate | Close -40 dB, Open -35 dB, Attack 10 ms, Hold 200 ms, Release 100 ms |
|
|
1242
|
+
| 3 | Compressor | Ratio 3:1, Threshold -18 dB, Attack 6 ms, Release 60 ms, Output Gain 6 dB |
|
|
1243
|
+
| 4 | Limiter | Threshold -3 dB, Release 60 ms |
|
|
1244
|
+
|
|
1245
|
+
This order removes steady noise first, gates silence-period noise second, evens speech dynamics third, and catches peaks last. Do not add a Gain filter unless the signal is still too quiet after setting the Scarlett gain.
|
|
1246
|
+
|
|
1247
|
+
Multi-Track Audio
|
|
1248
|
+
|
|
1249
|
+
Record mixed audio and isolated mic audio:
|
|
1250
|
+
|
|
1251
|
+
text
|
|
1252
|
+
Settings > Output > Advanced > Recording Tab:
|
|
1253
|
+
Audio Track: check 1 and 2
|
|
1254
|
+
|
|
1255
|
+
Route tracks in Audio Mixer > Advanced Audio Properties:
|
|
1256
|
+
|
|
1257
|
+
| Source | Track 1 | Track 2 |
|
|
1258
|
+
| ------------- | ------- | ------- |
|
|
1259
|
+
| Desktop Audio | checked | empty |
|
|
1260
|
+
| Mic/Aux | checked | checked |
|
|
1261
|
+
|
|
1262
|
+
Track 1 is YouTube-ready mixed audio. Track 2 is mic-only audio for cleanup or editing.
|
|
1263
|
+
|
|
1264
|
+
Scene Setup
|
|
1265
|
+
|
|
1266
|
+
Create two scenes.
|
|
1267
|
+
|
|
1268
|
+
Face + Screen
|
|
1269
|
+
|
|
1270
|
+
Use this scene for the intro and occasional commentary call-ins.
|
|
1271
|
+
|
|
1272
|
+
Sources from bottom to top:
|
|
1273
|
+
|
|
1274
|
+
1. Display Capture named Screen.
|
|
1275
|
+
2. Video Capture Device named Facecam.
|
|
1276
|
+
3. Optional image source for a circle border or glow.
|
|
1277
|
+
|
|
1278
|
+
Display Capture settings:
|
|
1279
|
+
|
|
1280
|
+
text
|
|
1281
|
+
Source: Display Capture
|
|
1282
|
+
Display: Primary monitor
|
|
1283
|
+
Capture Method: Windows 10 (1903 and later)
|
|
1284
|
+
Capture Cursor: checked
|
|
1285
|
+
|
|
1286
|
+
Apply the ultrawide crop to this source when recording from the 3440x1440 monitor.
|
|
1287
|
+
|
|
1288
|
+
Facecam settings:
|
|
1289
|
+
|
|
1290
|
+
text
|
|
1291
|
+
Device: Insta360 Link 2C
|
|
1292
|
+
Resolution: 1920x1080
|
|
1293
|
+
FPS: 60
|
|
1294
|
+
Video Format: MJPEG or default
|
|
1295
|
+
|
|
1296
|
+
Create a 512x512 PNG with a white circle on a black background and store it permanently, for example:
|
|
1297
|
+
|
|
1298
|
+
text
|
|
1299
|
+
E:\\OBS\\circle-mask.png
|
|
1300
|
+
|
|
1301
|
+
Apply it to the Facecam source:
|
|
1302
|
+
|
|
1303
|
+
text
|
|
1304
|
+
Filters > Image Mask/Blend:
|
|
1305
|
+
Type: Alpha Mask (Colour Channel)
|
|
1306
|
+
Path: E:\\OBS\\circle-mask.png
|
|
1307
|
+
|
|
1308
|
+
Resize the facecam source to roughly 300-400 px diameter and place it in a lower corner.
|
|
1309
|
+
|
|
1310
|
+
Screen Only
|
|
1311
|
+
|
|
1312
|
+
Use this scene for the main tutorial content.
|
|
1313
|
+
|
|
1314
|
+
Add the existing Screen source from the Face + Screen scene. Do not duplicate the display capture source.
|
|
1315
|
+
|
|
1316
|
+
Hotkeys:
|
|
1317
|
+
|
|
1318
|
+
text
|
|
1319
|
+
Settings > Hotkeys:
|
|
1320
|
+
Switch to Scene "Face + Screen": F5
|
|
1321
|
+
Switch to Scene "Screen Only": F6
|
|
1322
|
+
Start Recording: Ctrl+F9
|
|
1323
|
+
Stop Recording: Ctrl+F10
|
|
1324
|
+
|
|
1325
|
+
Avoid hotkeys that collide with the app being recorded. If using F5 inside a browser-heavy recording, choose a different key because F5 refreshes the page.
|
|
1326
|
+
|
|
1327
|
+
Recording flow:
|
|
1328
|
+
|
|
1329
|
+
1. Start on Face + Screen.
|
|
1330
|
+
2. Press Ctrl+F9.
|
|
1331
|
+
3. Record a 15-30 second face-camera intro.
|
|
1332
|
+
4. Press F6 for Screen Only.
|
|
1333
|
+
5. Record the screen walkthrough.
|
|
1334
|
+
6. Optionally press F5 to bring face-camera back for commentary.
|
|
1335
|
+
7. Press Ctrl+F10 to stop.
|
|
1336
|
+
|
|
1337
|
+
For a fade, set Scene Transitions to Fade with a 300 ms duration.
|
|
1338
|
+
|
|
1339
|
+
Windows 11 Checks
|
|
1340
|
+
|
|
1341
|
+
Before a recording session:
|
|
1342
|
+
|
|
1343
|
+
- Disable Xbox Game Bar.
|
|
1344
|
+
- Leave GPU scheduling enabled.
|
|
1345
|
+
- Run OBS as Administrator if frame drops or black-screen capture occur.
|
|
1346
|
+
- Set OBS process priority to Above Normal if the recording drops frames.
|
|
1347
|
+
- Use the High Performance power plan during recording.
|
|
1348
|
+
|
|
1349
|
+
Upload Quality
|
|
1350
|
+
|
|
1351
|
+
YouTube re-encodes every upload. The goal is to provide clean source material.
|
|
1352
|
+
|
|
1353
|
+
- Do not upload at YouTube's minimum recommended bitrate.
|
|
1354
|
+
- Do not run the recording through HandBrake or another extra encode just to save space.
|
|
1355
|
+
- Upload the OBS-remuxed MP4 directly unless the video was edited.
|
|
1356
|
+
- If editing in DaVinci Resolve or Premiere, render H.264 at 50 Mbps CBR for 1080p60 or use the YouTube preset.
|
|
1357
|
+
|
|
1358
|
+
The OBS output should match YouTube's expected upload shape: MP4 container, H.264 video, AAC-LC audio, 48 kHz stereo, Rec. 709 limited range.
|
|
1359
|
+
|
|
1360
|
+
Pre-Recording Checklist
|
|
1361
|
+
|
|
1362
|
+
- Scarlett 2i2 phantom power is on and voice peaks around -12 dB.
|
|
1363
|
+
- Correct OBS scene is selected, usually Face + Screen.
|
|
1364
|
+
- Insta360 Link Controller has AI tracking and HDR enabled when needed.
|
|
1365
|
+
- Door is closed, fan or AC is off, and the room is controlled.
|
|
1366
|
+
- OBS mic meter peaks in green or yellow, never red.
|
|
1367
|
+
- A 10-second test recording has been played back for audio, video quality, and facecam position.
|
|
1395
1368
|
- The 12-minute warm-up from knowledge.youtube-mental-prep is complete when recording on camera.`
|
|
1396
1369
|
},
|
|
1397
1370
|
{
|
|
1398
1371
|
id: "knowledge.finance-operations-playbook",
|
|
1399
1372
|
title: "Finance Operations Playbook",
|
|
1400
1373
|
summary: "Operating playbook for Elevasis finance: Xero as the system of record, Stripe payment collection and payout reconciliation, invoicing and AR cadence, tax estimates, deductions, 1099s, and annual filing prep.",
|
|
1401
|
-
bodyText: "Overview\
|
|
1374
|
+
bodyText: "Overview\n\nElevasis finance operations run through Xero, with Stripe handling payment collection. Xero is the single source of truth for financial records: business checking bank feeds, Stripe payouts, contractor payments, expenses, invoices, receivables, and year-end exports.\n\nThe finance loop has three connected parts:\n\n1. Invoicing captures client revenue through monthly retainers and Stripe Checkout.\n2. Accounting records and reconciles bank transactions, Stripe payouts, contractor payments, and operating expenses.\n3. Taxes use accurate Xero records for quarterly estimates, deductions, 1099s, and annual filing.\n\nAccounting and Reconciliation\n\nReconcile bank transactions in Xero weekly. Match each bank feed entry to its real-world source before month end.\n\n- Stripe payouts should match against Stripe bank feed activity.\n- Contractor payments should match checking account transfers.\n- Software subscriptions such as Railway, Vercel, Supabase, WorkOS, and OpenAI should be categorized as operating expenses.\n- Unmatched or ambiguous transactions should be flagged for manual review before monthly close.\n\nMaintain the core chart of accounts around revenue, cost of sales, operating expenses, and owner draws. Revenue includes client retainers and one-time project fees. Cost of sales covers contractor labor directly tied to client work. Operating expenses cover SaaS tools, hosting, banking fees, and professional services. Owner draws track business distributions.\n\nConfigure Xero with the connected business checking account, the default tax rate for the business jurisdiction, and the correct financial year end in organization settings.\n\nInvoicing and Accounts Receivable\n\nClient billing runs on a monthly retainer model. Create invoices in Xero at the start of each billing period, send them by Xero email or Stripe Checkout link, record payment after Stripe confirms checkout completion, and reconcile the Stripe payout in Xero.\n\nUse Xero repeating invoices for monthly retainers:\n\n- Frequency: monthly.\n- Start date: billing cycle start date.\n- Approval: automatic approval where the billing terms are stable.\n\nConfigure invoice reminders around the due date: a courtesy reminder 3 days before due date, an overdue notice 1 day after due date, and an escalation notice 7 days after due date.\n\nFor invoices more than 14 days overdue, contact the client directly through the active communication channel, pause active work pending payment confirmation, and resolve the balance before the next billing cycle.\n\nTaxes\n\nTax work depends on accurate Xero records throughout the year. As a pass-through entity, Elevasis business income flows to the owner personal return, so quarterly estimates reduce underpayment risk and year-end exports should be clean enough for a CPA or tax preparer.\n\nQuarterly estimated payment targets:\n\n- Q1: April 15.\n- Q2: June 15.\n- Q3: September 15.\n- Q4: January 15 of the following year.\n\nEstimate payments as roughly 25-30% of net profit for the quarter and pay via IRS Direct Pay or EFTPS.\n\nTrack deductible expenses in Xero during the year: SaaS subscriptions, contractor payments, home office expenses where applicable, professional development, courses, and business banking fees. Keep digital receipts organized by year in the business records folder.\n\nIssue 1099-NEC forms to US-based contractors paid more than $600 in a calendar year. Collect a W-9 before first payment, track annual contractor totals in Xero, file 1099-NEC forms by January 31 of the following year, and file the 1096 summary with the IRS when required.\n\nAt year end, export the Xero profit and loss statement and balance sheet. Provide them to the CPA or tax preparer with issued 1099s, bank statements for the business year, mileage logs if applicable, and home office documentation if applicable."
|
|
1402
1375
|
},
|
|
1403
1376
|
{
|
|
1404
1377
|
id: "knowledge.org-model-actions",
|
|
1405
1378
|
title: "Organization Model Actions",
|
|
1406
1379
|
summary: "Actions are the invokable semantic layer of the Organization Model -- they map to resources, affect entities, bind to knowledge, and expose four invocation types.",
|
|
1407
|
-
bodyText: `Overview
|
|
1408
|
-
|
|
1409
|
-
Actions are the invokable semantic layer of the Organization Model. They declare what an organization can do: what resources implement them, which entities they affect, and how they can be called
|
|
1410
|
-
|
|
1411
|
-
Actions are authored in the OM.actions domain map and projected as action graph nodes by buildOrganizationGraph(). Each action emits a contains edge from the organization root and optional mapsto, affects, and triggers edges based on its declared fields
|
|
1412
|
-
|
|
1413
|
-
Source schema: packages/core/src/organization-model/domains/actions.ts
|
|
1414
|
-
|
|
1415
|
-
What Actions Are
|
|
1416
|
-
|
|
1417
|
-
An action is a named, typed, invokable operation. It is not executable code -- it is a semantic declaration that says "this operation exists, it can be called this way, it affects these business objects, and it is implemented by this resource."
|
|
1418
|
-
|
|
1419
|
-
Actions answer questions like
|
|
1420
|
-
|
|
1421
|
-
- What operations does the sales.lead-gen system expose
|
|
1422
|
-
- Which workflow implements the lead-gen.company.qualify operation
|
|
1423
|
-
- What entities does this action modify
|
|
1424
|
-
- How can this action be invoked from the CLI, an API, or an MCP client
|
|
1425
|
-
|
|
1426
|
-
ActionInvocation Kinds
|
|
1427
|
-
|
|
1428
|
-
Each action can declare one or more invocations. An invocation describes how the action is called
|
|
1429
|
-
|
|
1430
|
-
| Kind | Fields | Description
|
|
1431
|
-
| ------------------ | ---------------------------------------------------------- | -----------------------------------------
|
|
1432
|
-
| slash-command | command (must start with /), optional toolFactory | Called from the CLI or agent tool surface
|
|
1433
|
-
| mcp-tool | server, name | Exposed as an MCP tool on a named server
|
|
1434
|
-
| api-endpoint | method (GET/POST/PATCH/DELETE), path, optional schemas | Called via HTTP API endpoint
|
|
1435
|
-
| script-execution | resourceId | Executed by running a script resource
|
|
1436
|
-
|
|
1437
|
-
Multiple invocations on one action mean the same semantic operation is reachable through multiple surfaces
|
|
1438
|
-
|
|
1439
|
-
Scope
|
|
1440
|
-
|
|
1441
|
-
Actions are either global or domain-scoped
|
|
1442
|
-
|
|
1443
|
-
- Global (scope: 'global'): available across all systems
|
|
1444
|
-
- Domain-scoped (scope: { domain: '<modelId>' }): associated with a specific OM domain such as sales
|
|
1445
|
-
|
|
1446
|
-
Systems reference actions through ActionRef entries on system.actions[], with an intent of exposes (the system owns the action) or consumes (the system calls the action). This relationship emits a uses edge from the system to the action in the graph
|
|
1447
|
-
|
|
1448
|
-
Affects and Knowledge Bindings
|
|
1449
|
-
|
|
1450
|
-
Actions can declare which entities they modify via the affects field (array of entity IDs). Each entry emits an affects edge from the action to the entity node
|
|
1451
|
-
|
|
1452
|
-
Actions can also declare knowledge bindings (array of knowledge node IDs) that reference relevant reference material. These bindings are not graph edges; they associate documentation with the action for surfacing in the Knowledge Base
|
|
1453
|
-
|
|
1454
|
-
Resource Mapping
|
|
1455
|
-
|
|
1456
|
-
The optional resourceId field links an action to its implementation resource. Setting resourceId emits a mapsto edge from the action node to the resource node. If the resource does not yet exist in OM.resources, the graph builder creates a stub resource node from the ID
|
|
1457
|
-
|
|
1458
|
-
Lifecycle States
|
|
1459
|
-
|
|
1380
|
+
bodyText: `Overview
|
|
1381
|
+
|
|
1382
|
+
Actions are the invokable semantic layer of the Organization Model. They declare what an organization can do: what resources implement them, which entities they affect, and how they can be called.
|
|
1383
|
+
|
|
1384
|
+
Actions are authored in the OM.actions domain map and projected as action graph nodes by buildOrganizationGraph(). Each action emits a contains edge from the organization root and optional mapsto, affects, and triggers edges based on its declared fields.
|
|
1385
|
+
|
|
1386
|
+
Source schema: packages/core/src/organization-model/domains/actions.ts
|
|
1387
|
+
|
|
1388
|
+
What Actions Are
|
|
1389
|
+
|
|
1390
|
+
An action is a named, typed, invokable operation. It is not executable code -- it is a semantic declaration that says "this operation exists, it can be called this way, it affects these business objects, and it is implemented by this resource."
|
|
1391
|
+
|
|
1392
|
+
Actions answer questions like:
|
|
1393
|
+
|
|
1394
|
+
- What operations does the sales.lead-gen system expose?
|
|
1395
|
+
- Which workflow implements the lead-gen.company.qualify operation?
|
|
1396
|
+
- What entities does this action modify?
|
|
1397
|
+
- How can this action be invoked from the CLI, an API, or an MCP client?
|
|
1398
|
+
|
|
1399
|
+
ActionInvocation Kinds
|
|
1400
|
+
|
|
1401
|
+
Each action can declare one or more invocations. An invocation describes how the action is called.
|
|
1402
|
+
|
|
1403
|
+
| Kind | Fields | Description |
|
|
1404
|
+
| ------------------ | ---------------------------------------------------------- | ----------------------------------------- |
|
|
1405
|
+
| slash-command | command (must start with /), optional toolFactory | Called from the CLI or agent tool surface |
|
|
1406
|
+
| mcp-tool | server, name | Exposed as an MCP tool on a named server |
|
|
1407
|
+
| api-endpoint | method (GET/POST/PATCH/DELETE), path, optional schemas | Called via HTTP API endpoint |
|
|
1408
|
+
| script-execution | resourceId | Executed by running a script resource |
|
|
1409
|
+
|
|
1410
|
+
Multiple invocations on one action mean the same semantic operation is reachable through multiple surfaces.
|
|
1411
|
+
|
|
1412
|
+
Scope
|
|
1413
|
+
|
|
1414
|
+
Actions are either global or domain-scoped.
|
|
1415
|
+
|
|
1416
|
+
- Global (scope: 'global'): available across all systems.
|
|
1417
|
+
- Domain-scoped (scope: { domain: '<modelId>' }): associated with a specific OM domain such as sales.
|
|
1418
|
+
|
|
1419
|
+
Systems reference actions through ActionRef entries on system.actions[], with an intent of exposes (the system owns the action) or consumes (the system calls the action). This relationship emits a uses edge from the system to the action in the graph.
|
|
1420
|
+
|
|
1421
|
+
Affects and Knowledge Bindings
|
|
1422
|
+
|
|
1423
|
+
Actions can declare which entities they modify via the affects field (array of entity IDs). Each entry emits an affects edge from the action to the entity node.
|
|
1424
|
+
|
|
1425
|
+
Actions can also declare knowledge bindings (array of knowledge node IDs) that reference relevant reference material. These bindings are not graph edges; they associate documentation with the action for surfacing in the Knowledge Base.
|
|
1426
|
+
|
|
1427
|
+
Resource Mapping
|
|
1428
|
+
|
|
1429
|
+
The optional resourceId field links an action to its implementation resource. Setting resourceId emits a mapsto edge from the action node to the resource node. If the resource does not yet exist in OM.resources, the graph builder creates a stub resource node from the ID.
|
|
1430
|
+
|
|
1431
|
+
Lifecycle States
|
|
1432
|
+
|
|
1460
1433
|
Actions follow a five-stage lifecycle: draft, beta, active, deprecated, archived. The default is active. Lifecycle state is authored on the action entry and is reflected in the graph node.`
|
|
1461
1434
|
},
|
|
1462
1435
|
{
|
|
1463
1436
|
id: "knowledge.org-model-entities",
|
|
1464
1437
|
title: "Organization Model Entities",
|
|
1465
1438
|
summary: "Entities model business objects owned by systems -- with table metadata, state catalogs, and typed entity links.",
|
|
1466
|
-
bodyText: "Overview\
|
|
1439
|
+
bodyText: "Overview\n\nEntities are the business objects of the Organization Model. Each entity is a named, typed object owned by a system -- it corresponds to a database table, optionally participates in a state catalog, and can declare typed relationships to other entities.\n\nEntities are authored in the OM.entities domain map and projected as entity graph nodes by buildOrganizationGraph(). Each entity emits a contains edge from its owning system node and optional links edges to related entities.\n\nSource schema: packages/core/src/organization-model/domains/entities.ts\n\nWhat Entities Are\n\nAn entity declaration answers questions like:\n\n- What business objects does the sales.crm system own?\n- Which database table backs the crm.deal entity?\n- What states can a leadgen.company pass through?\n- How are crm.deal and crm.contact related?\n\nEntities are not executable. They are semantic declarations that describe the shape of business data: who owns it, where it lives, what states it can be in, and how it connects to other objects.\n\nownedBySystemId\n\nEvery entity must declare ownedBySystemId -- the ID of the system responsible for it. The graph builder emits a contains edge from system:<ownedBySystemId> to the entity node. An entity can only be owned by one system.\n\nTable and Row Schema\n\nThe optional table field names the backing database table (e.g. crmdeals). The optional rowSchema field references a schema identifier that describes the row shape. These fields are informational references; they are not validated against the database at OM parse time.\n\nstateCatalogId\n\nThe optional stateCatalogId field links the entity to a state catalog. The graph builder uses this to project event nodes for each state transition:\n\n- For crm.pipeline, the builder walks pipeline catalog records via the pipeline migration helper.\n- For delivery.task, the builder walks project task status catalog records via the project-status helper.\n- For lead-gen.company and lead-gen.contact, the builder walks the lead-gen stage catalog.\n- General status catalogs live in System.ontology.catalogTypes; direct OM.statuses reads are legacy.\n\nEach matching status or stage generates an event node with an originatesfrom edge pointing back to the entity.\n\nTyped Entity Links\n\nThe links field declares typed relationships to other entities. Each link has:\n\n- toEntity -- the target entity ID.\n- kind -- one of belongs-to, has-many, has-one, or many-to-many.\n- via -- optional join key or junction table name.\n- label -- optional display label for the relationship.\n\nEach link emits a links edge from the entity node to the target entity node in the graph.\n\nExample Entity Shape\n\nA crm.deal entity owned by sales.crm, backed by the crmdeals table, in the crm.pipeline state catalog, with a has-many link to crm.contact via the dealcontacts junction:\n\n- id: crm.deal\n- ownedBySystemId: sales.crm\n- table: crmdeals\n- stateCatalogId: crm.pipeline\n- links: [{ toEntity: 'crm.contact', kind: 'has-many', via: 'dealcontacts' }]"
|
|
1467
1440
|
},
|
|
1468
1441
|
{
|
|
1469
1442
|
id: "knowledge.org-model-events",
|
|
1470
1443
|
title: "Organization Model Events",
|
|
1471
1444
|
summary: "Events are projected signals -- the OM has no authored event domain. They emit from resources and originate from entity state catalogs.",
|
|
1472
|
-
bodyText: "Overview\
|
|
1445
|
+
bodyText: "Overview\n\nEvents are projected graph nodes. The Organization Model has no OM.events domain map that authors edit directly. Instead, events are derived by buildOrganizationGraph() from two sources: EventEmissionDescriptor entries on workflow and agent resources, and state catalog entries on entities.\n\nEvery event node carries a unique ID formed as \\<ownerId\\>:\\<eventKey\\>, a human-readable label, and an edge that connects it back to the node that produced it.\n\nProjection logic: packages/core/src/organization-model/graph/build.ts\n\nAuthored vs. Projected\n\nThe distinction matters because it determines where you change event data.\n\nEvents are never edited in a standalone events file. To change an event you must change its source:\n\n- To change a resource-emitted event, update the emits array on the workflow or agent entry in OM.resources.\n- To change an entity state-transition event, update the entity's stateCatalogId or the underlying ontology status/stage catalog on the owning System.\n\nThe graph builder projects these into event graph nodes automatically on the next call to buildOrganizationGraph().\n\nEventEmissionDescriptor on Resources\n\nWorkflow and agent resource entries can declare an emits array. Each element is an EventEmissionDescriptor:\n\n| Field | Type | Description |\n| --------------- | --------------- | ------------------------------------------------------------- |\n| eventKey | ModelIdSchema | Short key scoped to the owner resource (e.g. enrolled) |\n| label | string | Human-readable label for the event |\n| payloadSchema | ModelIdSchema | Optional reference to a schema that describes the payload |\n| lifecycle | lifecycle enum | Optional: draft, beta, active, deprecated, archived |\n\nThe graph builder constructs the full EventDescriptor by combining ownerId (the resource ID), ownerKind: 'resource', and the emission descriptor fields. The resulting event ID is \\<resourceId\\>:\\<eventKey\\>.\n\nAn emits edge is then projected from the resource node to the event node.\n\nOnly workflow and agent resource kinds support emits. integration and script resources do not.\n\noriginatesfrom Edges from Entity State Catalogs\n\nWhen an entity declares a stateCatalogId, the graph builder projects one event node per state transition available to that entity. These events use ownerKind: 'entity' and the resulting event ID is \\<entityId\\>:\\<eventKey\\>.\n\nA reversed originatesfrom edge is projected from the event node pointing back to the entity node. This edge direction is the opposite of emits: it signals that the event represents a state change that originates from the entity, not that the entity actively fires the event.\n\nThe builder resolves state catalogs as follows:\n\n- General status catalogs: status data lives in System.ontology.catalogTypes; direct OM.statuses reads are legacy.\n- crm.pipeline: walks pipeline catalog records via the pipeline migration helper.\n- delivery.task: walks project task status catalog records via the project-status helper.\n- lead-gen.company and lead-gen.contact: walks the LEADGENSTAGECATALOG constant, filtering by entity type.\n\ntriggers Edges to Policies\n\nWhen a policy declares trigger.kind: 'event', the graph builder looks up the projected event node by event ID and emits a triggers edge from the event node to the policy node. This edge is only emitted if the event node was already projected by the time the policy loop runs.\n\nPolicy triggers are the primary way events connect to downstream behavior. No triggers edge is emitted for events that no policy references.\n\nEventDescriptor Full Shape\n\nEventDescriptor is the resolved type used internally by the graph builder. It extends EventEmissionDescriptor with identity fields:\n\n| Field | Type | Description |\n| --------------- | -------------------------- | ----------------------------------------------------- |\n| id | EventIdSchema | Composite: \\<ownerId\\>:\\<eventKey\\> |\n| ownerId | resource ID or model ID | ID of the resource or entity that is the event source |\n| ownerKind | 'resource' or 'entity' | Discriminates between the two projection paths |\n| eventKey | ModelIdSchema | Short key, unique within the owner |\n| label | string | Human-readable label |\n| payloadSchema | ModelIdSchema (opt) | Schema reference for payload shape |\n| lifecycle | lifecycle enum (opt) | Lifecycle state from the emission descriptor |\n\nEventDescriptor is not stored in the graph node itself -- it is used transiently during graph construction to build the node and emit edges. The graph node stores id, kind: 'event', label, and sourceId.\n\nGraph Summary\n\n| Edge kind | Direction | When emitted |\n| ----------------- | --------------------------- | -------------------------------------------- |\n| emits | resource node -> event node | Resource emits[] array is non-empty |\n| originatesfrom | event node -> entity node | Entity has a stateCatalogId |\n| triggers | event node -> policy node | Policy trigger.kind === 'event' matches ID |"
|
|
1473
1446
|
},
|
|
1474
1447
|
{
|
|
1475
1448
|
id: "knowledge.org-model-graph-contract",
|
|
1476
1449
|
title: "Organization Model Graph Contract",
|
|
1477
1450
|
summary: "The canonical graph node and edge contract -- authored and projected node kinds, edge kinds, and the resource-type overlay derived from the Organization Model.",
|
|
1478
|
-
bodyText: "Overview\
|
|
1451
|
+
bodyText: "Overview\n\nThe Organization Model graph contract defines the typed node and edge taxonomy emitted by buildOrganizationGraph(). Every surface that reads or visualizes the OM -- including Command View -- works against this contract.\n\nThe graph has two categories of nodes: authored nodes derived directly from OM domain maps, and projected nodes derived by the graph builder from authored content. Events and stages are projected; all other node kinds are authored.\n\nSource schema: packages/core/src/organization-model/graph/schema.ts\nProjection logic: packages/core/src/organization-model/graph/build.ts\n\nNode Kinds\n\nThe graph vocabulary includes authored semantic nodes and projected operational/navigation nodes.\n\n| Kind | Authored / Projected | Source |\n| -------------- | -------------------- | ------------------------------------------------------- |\n| organization | Projected | Root node; always present; id is organization-model |\n| system | Authored | OM.systems domain map |\n| role | Authored | OM.roles domain map |\n| action | Authored | OM.actions domain map |\n| entity | Authored | OM.entities domain map |\n| event | Projected | Derived from resource emits and entity state catalogs |\n| policy | Authored | OM.policies domain map |\n| stage | Projected | Derived from ontology-backed stage catalog helpers |\n| resource | Authored | OM.resources domain map |\n| knowledge | Authored | OM.knowledge id-keyed map |\n| customer-segment | Authored | OM.customers domain map |\n| offering | Authored | OM.offerings domain map |\n| goal | Authored | OM.goals domain map |\n| surface | Projected | Routeable leaves from OM.navigation.sidebar |\n| navigation-group | Projected | Groups from OM.navigation.sidebar |\n\nEdge Kinds\n\nTwelve edge kinds are valid in the graph.\n\n| Kind | Direction | Meaning |\n| ----------------- | ------------------------------------- | ------------------------------------------------------------- |\n| contains | parent -> child | Containment: organization to system, system to resource, etc. |\n| references | source -> target | Cross-reference: role reports-to, agent invokes action |\n| mapsto | action -> resource | Action is implemented by a resource |\n| uses | system -> action, stage -> action | System or stage uses an action |\n| governs | knowledge -> target, role -> system | Knowledge node or role governs a target |\n| links | entity -> entity | Typed entity relationship (belongs-to, has-many, etc.) |\n| affects | action -> entity | Action modifies or reads an entity |\n| emits | resource -> event | Resource produces an observable event |\n| originatesfrom | event -> entity | Event originates from an entity state transition |\n| triggers | event -> policy, action -> policy | Event or action invocation triggers a policy evaluation |\n| appliesto | policy -> system/action/resource/role | Policy governs the target |\n| effects | policy -> action/role | Policy effect invokes an action or notifies a role |\n\nResource Type Overlay\n\nResource nodes carry an optional resourceType field that is a separate enum from kind. It is set by the graph builder from the OM resource kind field or from Command View data.\n\n| Value | Description |\n| ------------------ | --------------------------------- |\n| workflow | Deterministic automation pipeline |\n| agent | LLM-driven reasoning resource |\n| trigger | Event-driven entry point |\n| integration | External service connector |\n| external | Third-party system reference |\n| humancheckpoint | Human-in-the-loop review gate |\n| script | One-shot executable script |\n\nAuthored vs. Projected Fields\n\nAuthored nodes\n\nSystem, role, action, entity, policy, resource, knowledge, customer-segment, offering, and goal nodes are authored in the OM domain maps. Ontology catalog nodes are authored inside System.ontology.catalogTypes and projected with ontology graph IDs. Their id, label, description, and domain-specific fields are set from OM source data.\n\nProjected nodes\n\n- Organization node: always present; id is always organization-model.\n- Event nodes: derived from two sources. Resource events come from resource.emits declarations on workflow and agent resources. Entity events come from the entity's stateCatalogId -- the builder walks compatible pipeline, project-status, or lead-gen stage helpers to generate one event node per transition.\n- Stage nodes: derived from ontology-backed prospecting and lead-gen stage helpers.\n- Surface and navigation-group nodes: derived from navigation.sidebar.\n\nProjected nodes are never authored directly. To add an event, declare emits on a resource or assign stateCatalogId to an entity.\n\nGraph Node Shape\n\nEach node has: id (graph-unique string), kind (one of the 10 kinds), label (display name), optional sourceId (OM domain ID), optional description, optional icon, optional enabled flag, and optional resourceType (resource nodes only).\n\nEach edge has: id (graph-unique string), kind (one of the 12 kinds), sourceId, targetId, optional label, and optional relationshipType (triggers, uses, or approval)."
|
|
1479
1452
|
},
|
|
1480
1453
|
{
|
|
1481
1454
|
id: "knowledge.org-model-policies",
|
|
1482
1455
|
title: "Organization Model Policies",
|
|
1483
1456
|
summary: "Policies govern systems, actions, resources, and roles -- with discriminated triggers, predicates, and effects.",
|
|
1484
|
-
bodyText: "Overview\
|
|
1457
|
+
bodyText: "Overview\n\nPolicies are cross-cutting governance rules in the Organization Model. They declare what should happen when a trigger fires, under what conditions, and with what effect. Policies are authored in the OM.policies domain map and projected as policy graph nodes by buildOrganizationGraph().\n\nEvery policy emits a contains edge from the organization root and appliesto edges to each system, action, resource, or role it governs. When the trigger is event-based or action-based, an additional triggers edge connects the source node to the policy.\n\nSource schema: packages/core/src/organization-model/domains/policies.ts\n\nPolicyTrigger\n\nThe trigger is a discriminated union on kind that defines what activates the policy.\n\n| Kind | Required fields | Description |\n| ------------------- | --------------- | --------------------------------------------------------- |\n| event | eventId | Fires when the referenced event is projected in the graph |\n| action-invocation | actionId | Fires when the referenced action is invoked |\n| schedule | cron | Fires on a cron schedule (max 120 chars) |\n| manual | none | Fires only when explicitly triggered by a user or process |\n\nFor event triggers, the graph builder looks up the projected event node by eventId and emits a triggers edge from that event node to the policy node. For action-invocation triggers, a triggers edge is emitted from the action node to the policy node. Schedule and manual triggers produce no additional graph edges.\n\nPolicyPredicate\n\nThe predicate is a discriminated union on kind that defines the condition under which the policy effect is applied.\n\n| Kind | Required fields | Description |\n| ------------ | ------------------------------- | ---------------------------------------------------------- |\n| always | none | Condition is unconditionally true; effect always fires |\n| expression | expression (string, max 2000) | Arbitrary expression evaluated at runtime |\n| threshold | metric, operator, value | Numeric threshold check: lt, lte, eq, gte, or gt |\n\nThe default predicate if not specified is { kind: 'always' }.\n\nPolicyEffect\n\nThe actions field holds an ordered array of effects (PolicyEffect[]). At least one effect is required. Effects are a discriminated union on kind.\n\n| Kind | Required fields | Description |\n| ------------------ | ------------------- | ----------------------------------------------------------- |\n| require-approval | roleId (optional) | Blocks execution until a human approves; routes to the role |\n| invoke-action | actionId | Invokes the referenced action as a consequence |\n| notify-role | roleId | Sends a notification to the specified role |\n| block | none | Stops execution entirely; no approval path |\n\nFor invoke-action effects, the graph builder emits an effects edge from the policy node to the referenced action node. For notify-role and require-approval effects that include a roleId, an effects edge is emitted from the policy node to the role node.\n\nappliesTo\n\nThe appliesTo field declares which OM entities the policy governs. It contains four ID arrays, all defaulting to empty:\n\n| Field | Target kind | Graph edge emitted |\n| ------------- | ----------- | ----------------------------------------- |\n| systemIds | system | appliesto from policy to system node |\n| actionIds | action | appliesto from policy to action node |\n| resourceIds | resource | appliesto from policy to resource node |\n| roleIds | role | appliesto from policy to role node |\n\nA policy can apply to any combination of these targets simultaneously. A policy with all four arrays empty is valid but produces no appliesto edges.\n\nLifecycle\n\nPolicies follow the same five-stage lifecycle as systems and actions: draft, beta, active, deprecated, archived. The default is active. Lifecycle is authored on the policy entry and is reflected in the graph node.\n\nThe order field controls domain-map iteration order. The convention is multiples of 10 (10, 20, 30, ...) to allow easy insertion between existing entries.\n\nGraph Summary\n\n| Edge kind | Direction | When emitted |\n| ------------ | ------------------------------------------ | ---------------------------------------------------------------------------------- |\n| contains | organization root -> policy node | Always; every policy is contained by the organization root |\n| appliesto | policy node -> system/action/resource/role | For each non-empty appliesTo.Ids entry |\n| triggers | event or action node -> policy node | When trigger.kind is event or action-invocation |\n| effects | policy node -> action or role node | For invoke-action, notify-role, and require-approval effects with a roleId |"
|
|
1485
1458
|
},
|
|
1486
1459
|
{
|
|
1487
1460
|
id: "knowledge.platform-command-view",
|
|
1488
1461
|
title: "Platform Command View",
|
|
1489
1462
|
summary: "Reference for Command View, the visual Organization Model graph surface that projects systems, resources, actions, entities, events, and policies into an explorable operational view.",
|
|
1490
|
-
bodyText: "Overview\r\n\r\nCommand View is the visual surface for the Organization Model graph. It projects the OM -- systems, resources, actions, entities, events, and policies -- into an explorable graph using the same node and edge taxonomy emitted by buildOrganizationGraph().\r\n\r\nIt answers operational questions such as:\r\n\r\n- What systems own which resources?\r\n- What does this agent map to in the OM?\r\n- Which actions affect which entities?\r\n- If a resource goes offline, what policies or actions reference it?\r\n- What events originate from this entity or resource?\r\n\r\nAccess Command View through the Knowledge area at /knowledge/command-view.\r\n\r\nHow Command View Works\r\n\r\nCommand View is a projection of the Organization Model graph, not a separate deployment manifest.\r\n\r\nThe OM resources domain is the single source of resource identity. The actions domain is the invokable semantic layer. The systems domain is the backbone. Command View merges the graph emitted by buildOrganizationGraph() with optional live Command View data (deployed resource metadata) to render a unified operational picture.\r\n\r\nGraph projection pipeline:\r\n\r\n1. Organization Model is authored in packages/elevasis-core/src/organization-model/.\r\n2. buildOrganizationGraph() projects the OM into typed nodes and edges.\r\n3. Command View data (deployed resource metadata) is optionally merged as an overlay.\r\n4. The merged graph is serialized and cached.\r\n5. The frontend visualizes the cached graph.\r\n\r\nCommand View does not own resource identity. It reads what the OM declares.\r\n\r\nNode Kinds\r\n\r\nCommand View renders the same node kinds as the OM graph:\r\n\r\n| Kind | Source | Description |\r\n| -------------- | -------------- | -------------------------------------------------------------------------- |\r\n| organization | Root | The organization-model root node |\r\n| system | OM.systems | Bounded contexts with dotted IDs and parentSystemId hierarchy |\r\n| role | OM.roles | Named roles with hierarchy and holder assignments |\r\n| action | OM.actions | Invokable operations with invocation type metadata |\r\n| entity | OM.entities | Business objects owned by systems |\r\n| event | Projected | Derived from resource emits declarations and entity state catalogs |\r\n| policy | OM.policies | Governance rules applied to systems, actions, resources, and roles |\r\n| stage | Projected | Derived from prospecting stage catalogs |\r\n| resource | OM.resources | Workflows, agents, integrations, triggers, scripts, and external resources |\r\n| knowledge | OM.knowledge | Knowledge nodes governed by systems |\r\n\r\nThe resourceType overlay on resource nodes is a separate enum: workflow, agent, trigger, integration, external, humancheckpoint, script.\r\n\r\nEdge Kinds\r\n\r\n| Kind | Meaning |\r\n| ----------------- | ------------------------------------------------------------------------------ |\r\n| contains | Parent-to-child containment (organization to system, system to resource, etc.) |\r\n| references | Cross-reference between nodes (role reports-to, agent invokes action) |\r\n| mapsto | Action mapped to a resource implementation |\r\n| uses | System or stage uses an action |\r\n| governs | Knowledge node or role governs a system or target |\r\n| links | Entity links to another entity |\r\n| affects | Action affects an entity |\r\n| emits | Resource or entity emits an event |\r\n| originatesfrom | Event originates from an entity |\r\n| triggers | Event or action triggers a policy |\r\n| appliesto | Policy applies to a system, action, resource, or role |\r\n| effects | Policy effect invokes an action or notifies a role |\r\n\r\nVisualization Modes\r\n\r\nCommand View uses Cytoscape graph modes:\r\n\r\n- Map: preserves organization structure and honors hidden-resource visibility.\r\n- Trace: resolves directed paths and reveals resources for the active trace.\r\n- Impact: pivots around the selected node and reveals related resources for impact review.\r\n\r\nFilter panel:\r\n\r\n- Search across nodes, relationships, and IDs.\r\n- Filter by node kind, resource type, environment, topology presence, integrations, and resource facets.\r\n- Toggle resource visibility and diagnostic/testing resource visibility.\r\n- Show visible and hidden resource counts in the same control surface.\r\n\r\nHidden resource behavior:\r\n\r\n- Resource nodes are hidden by default so the organization structure remains readable.\r\n- Structural nodes remain visible as the navigation skeleton.\r\n- Selecting a visible node can reveal directly connected hidden resources.\r\n- Diagnostic and testing resources are hidden by default and can be revealed from the filter panel.\r\n\r\nExpand Around behavior:\r\n\r\n- Select a node, open Details, and use Expand Around to preview nearby graph context before revealing it.\r\n- Semantic presets cover coverage, operational dependencies, organization context, and impact paths.\r\n- System and entity nodes default to Coverage.\r\n- Resource nodes default to Operational Dependencies.\r\n- Preview counts show hidden resources before Apply reveals the graph patch.\r\n\r\nRead-only constraints:\r\n\r\n- No drag and drop.\r\n- No connection editing.\r\n- No graph mutation from the visualization layer.\r\n\r\nOrganization Model as the Source of Truth\r\n\r\nResource identity lives in OM.resources, not in a separate manifest. To add a resource to Command View:\r\n\r\n1. Add the resource to OM.resources in the organization model.\r\n2. Link it to a system via systemPath.\r\n3. Optionally link actions to the resource via action.resourceId.\r\n4. Deploy the organization model. Command View reflects the new resource automatically.\r\n\r\nThere is no separate DeploymentSpec.relationships declaration required for OM-declared resources. The graph builder derives containment and relationship edges directly from the OM contract.\r\n\r\nLive resource metadata (deployed name, description, runtime status) can be overlaid from Command View data when available, but the OM contract is primary.\r\n\r\nUsing Command View\r\n\r\nSystem Understanding\r\n\r\nUseful exploration questions:\r\n\r\n- What systems own which resources and entities?\r\n- What actions does this system expose, and what do they map to?\r\n- Which knowledge nodes govern this system?\r\n- What policies apply to this system?\r\n- What events originate from this entity?\r\n- What roles are responsible for this system?\r\n\r\nVisual patterns:\r\n\r\n- Hub nodes with many edges indicate central resources or pivotal systems.\r\n- Linear chains show sequential workflow pipelines.\r\n- Branching shows conditional routing or multiple action paths.\r\n- Isolated nodes may indicate unused or draft resources.\r\n\r\nManifest Debugging\r\n\r\nUse Command View to verify:\r\n\r\n1. Resources appear as nodes under the correct system.\r\n2. Actions map to the expected resources.\r\n3. Entities link to the correct systems and each other.\r\n4. Policies apply to the correct systems, actions, or resources.\r\n5. Events appear for resources with emits declarations.\r\n6. Orphaned resources are intentional.\r\n\r\nCommon issues:\r\n\r\n- Resource declared in OM but assigned to the wrong systemPath.\r\n- Action resourceId points to a resource ID that does not exist.\r\n- Entity ownedBySystemId references an unknown system.\r\n- Policy appliesTo references a system, action, or resource that was removed.\r\n\r\nTroubleshooting\r\n\r\nEmpty Graph\r\n\r\nLikely causes:\r\n\r\n- Organization has no systems or resources defined.\r\n- Search, node kind, or resource type filters hide all graph elements.\r\n- Command View resources are hidden and no structural nodes match current filters.\r\n\r\nCheck:\r\n\r\n1. OM systems and resources domains have entries.\r\n2. Filter panel visibility and filter state.\r\n3. API response for the /api/command-view endpoint.\r\n\r\nFix:\r\n\r\n- Add systems and resources to the organization model.\r\n- Reveal resources or reset graph filters.\r\n\r\nMissing Nodes\r\n\r\nLikely causes:\r\n\r\n- Resource, action, or entity is defined in OM but omitted from the relevant domain map.\r\n- Node is hidden by visibility controls.\r\n- Status, resource type, or topology filters exclude the node.\r\n\r\nCheck:\r\n\r\n1. OM domain map includes the ID as a key and as id in the entry.\r\n2. Filter panel visibility and filter state.\r\n3. Node lifecycle or enabled field.\r\n\r\nFix by adding the entry to the correct domain map or revealing hidden nodes.\r\n\r\nMissing Edges\r\n\r\nLikely causes:\r\n\r\n- Action resourceId does not match any OM resource ID.\r\n- Entity ownedBySystemId references an unknown system.\r\n- Policy appliesTo references IDs that do not exist.\r\n- Knowledge node link uses a nodeId that has no matching OM node.\r\n\r\nCheck:\r\n\r\n1. Cross-reference IDs across OM domains.\r\n2. Run pnpm --filter @repo/core check-types to surface Zod validation errors.\r\n\r\nFix the OM entry to reference the correct ID.\r\n\r\nBest Practices\r\n\r\nKeep the OM up to date as systems and resources evolve:\r\n\r\n1. Add new resources to OM.resources with the correct systemPath.\r\n2. Map actions to resources via action.resourceId when the action calls a specific resource.\r\n3. Update entity.ownedBySystemId when entities move between systems.\r\n4. Update policy.appliesTo when systems, actions, or resources are renamed or removed.\r\n5. Declare resource.emits for workflows and agents that produce observable events.\r\n\r\nUse the OM graph as the authoritative reference for Command View structure. The graph builder derives the visualization from the OM contract -- do not expect Command View to show connections that are not declared in the OM.\r\n\r\nRelated References\r\n\r\n- /knowledge read knowledge.org-model-reference\r\n- /knowledge read knowledge.platform-composition-patterns\r\n- /knowledge read knowledge.platform-integration-patterns"
|
|
1463
|
+
bodyText: "Overview\n\nCommand View is the visual surface for the Organization Model graph. It projects the OM -- systems, resources, actions, entities, events, and policies -- into an explorable graph using the same node and edge taxonomy emitted by buildOrganizationGraph().\n\nIt answers operational questions such as:\n\n- What systems own which resources?\n- What does this agent map to in the OM?\n- Which actions affect which entities?\n- If a resource goes offline, what policies or actions reference it?\n- What events originate from this entity or resource?\n\nAccess Command View through the Knowledge area at /knowledge/command-view.\n\nHow Command View Works\n\nCommand View is a projection of the Organization Model graph, not a separate deployment manifest.\n\nThe OM resources domain is the single source of resource identity. The actions domain is the invokable semantic layer. The systems domain is the backbone. Command View merges the graph emitted by buildOrganizationGraph() with optional live Command View data (deployed resource metadata) to render a unified operational picture.\n\nGraph projection pipeline:\n\n1. Organization Model is authored in packages/elevasis-core/src/organization-model/.\n2. buildOrganizationGraph() projects the OM into typed nodes and edges.\n3. Command View data (deployed resource metadata) is optionally merged as an overlay.\n4. The merged graph is serialized and cached.\n5. The frontend visualizes the cached graph.\n\nCommand View does not own resource identity. It reads what the OM declares.\n\nNode Kinds\n\nCommand View renders the same node kinds as the OM graph:\n\n| Kind | Source | Description |\n| -------------- | -------------- | -------------------------------------------------------------------------- |\n| organization | Root | The organization-model root node |\n| system | OM.systems | Bounded contexts with dotted IDs and parentSystemId hierarchy |\n| role | OM.roles | Named roles with hierarchy and holder assignments |\n| action | OM.actions | Invokable operations with invocation type metadata |\n| entity | OM.entities | Business objects owned by systems |\n| event | Projected | Derived from resource emits declarations and entity state catalogs |\n| policy | OM.policies | Governance rules applied to systems, actions, resources, and roles |\n| stage | Projected | Derived from prospecting stage catalogs |\n| resource | OM.resources | Workflows, agents, integrations, triggers, scripts, and external resources |\n| knowledge | OM.knowledge | Knowledge nodes governed by systems |\n\nThe resourceType overlay on resource nodes is a separate enum: workflow, agent, trigger, integration, external, humancheckpoint, script.\n\nEdge Kinds\n\n| Kind | Meaning |\n| ----------------- | ------------------------------------------------------------------------------ |\n| contains | Parent-to-child containment (organization to system, system to resource, etc.) |\n| references | Cross-reference between nodes (role reports-to, agent invokes action) |\n| mapsto | Action mapped to a resource implementation |\n| uses | System or stage uses an action |\n| governs | Knowledge node or role governs a system or target |\n| links | Entity links to another entity |\n| affects | Action affects an entity |\n| emits | Resource or entity emits an event |\n| originatesfrom | Event originates from an entity |\n| triggers | Event or action triggers a policy |\n| appliesto | Policy applies to a system, action, resource, or role |\n| effects | Policy effect invokes an action or notifies a role |\n\nVisualization Modes\n\nCommand View uses Cytoscape graph modes:\n\n- Map: preserves organization structure and honors hidden-resource visibility.\n- Trace: resolves directed paths and reveals resources for the active trace.\n- Impact: pivots around the selected node and reveals related resources for impact review.\n\nFilter panel:\n\n- Search across nodes, relationships, and IDs.\n- Filter by node kind, resource type, environment, topology presence, integrations, and resource facets.\n- Toggle resource visibility and diagnostic/testing resource visibility.\n- Show visible and hidden resource counts in the same control surface.\n\nHidden resource behavior:\n\n- Resource nodes are hidden by default so the organization structure remains readable.\n- Structural nodes remain visible as the navigation skeleton.\n- Selecting a visible node can reveal directly connected hidden resources.\n- Diagnostic and testing resources are hidden by default and can be revealed from the filter panel.\n\nExpand Around behavior:\n\n- Select a node, open Details, and use Expand Around to preview nearby graph context before revealing it.\n- Semantic presets cover coverage, operational dependencies, organization context, and impact paths.\n- System and entity nodes default to Coverage.\n- Resource nodes default to Operational Dependencies.\n- Preview counts show hidden resources before Apply reveals the graph patch.\n\nRead-only constraints:\n\n- No drag and drop.\n- No connection editing.\n- No graph mutation from the visualization layer.\n\nOrganization Model as the Source of Truth\n\nResource identity lives in OM.resources, not in a separate manifest. To add a resource to Command View:\n\n1. Add the resource to OM.resources in the organization model.\n2. Link it to a system via systemPath.\n3. Optionally link actions to the resource via action.resourceId.\n4. Deploy the organization model. Command View reflects the new resource automatically.\n\nThere is no separate DeploymentSpec.relationships declaration required for OM-declared resources. The graph builder derives containment and relationship edges directly from the OM contract.\n\nLive resource metadata (deployed name, description, runtime status) can be overlaid from Command View data when available, but the OM contract is primary.\n\nUsing Command View\n\nSystem Understanding\n\nUseful exploration questions:\n\n- What systems own which resources and entities?\n- What actions does this system expose, and what do they map to?\n- Which knowledge nodes govern this system?\n- What policies apply to this system?\n- What events originate from this entity?\n- What roles are responsible for this system?\n\nVisual patterns:\n\n- Hub nodes with many edges indicate central resources or pivotal systems.\n- Linear chains show sequential workflow pipelines.\n- Branching shows conditional routing or multiple action paths.\n- Isolated nodes may indicate unused or draft resources.\n\nManifest Debugging\n\nUse Command View to verify:\n\n1. Resources appear as nodes under the correct system.\n2. Actions map to the expected resources.\n3. Entities link to the correct systems and each other.\n4. Policies apply to the correct systems, actions, or resources.\n5. Events appear for resources with emits declarations.\n6. Orphaned resources are intentional.\n\nCommon issues:\n\n- Resource declared in OM but assigned to the wrong systemPath.\n- Action resourceId points to a resource ID that does not exist.\n- Entity ownedBySystemId references an unknown system.\n- Policy appliesTo references a system, action, or resource that was removed.\n\nTroubleshooting\n\nEmpty Graph\n\nLikely causes:\n\n- Organization has no systems or resources defined.\n- Search, node kind, or resource type filters hide all graph elements.\n- Command View resources are hidden and no structural nodes match current filters.\n\nCheck:\n\n1. OM systems and resources domains have entries.\n2. Filter panel visibility and filter state.\n3. API response for the /api/command-view endpoint.\n\nFix:\n\n- Add systems and resources to the organization model.\n- Reveal resources or reset graph filters.\n\nMissing Nodes\n\nLikely causes:\n\n- Resource, action, or entity is defined in OM but omitted from the relevant domain map.\n- Node is hidden by visibility controls.\n- Status, resource type, or topology filters exclude the node.\n\nCheck:\n\n1. OM domain map includes the ID as a key and as id in the entry.\n2. Filter panel visibility and filter state.\n3. Node lifecycle or enabled field.\n\nFix by adding the entry to the correct domain map or revealing hidden nodes.\n\nMissing Edges\n\nLikely causes:\n\n- Action resourceId does not match any OM resource ID.\n- Entity ownedBySystemId references an unknown system.\n- Policy appliesTo references IDs that do not exist.\n- Knowledge node link uses a nodeId that has no matching OM node.\n\nCheck:\n\n1. Cross-reference IDs across OM domains.\n2. Run pnpm --filter @repo/core check-types to surface Zod validation errors.\n\nFix the OM entry to reference the correct ID.\n\nBest Practices\n\nKeep the OM up to date as systems and resources evolve:\n\n1. Add new resources to OM.resources with the correct systemPath.\n2. Map actions to resources via action.resourceId when the action calls a specific resource.\n3. Update entity.ownedBySystemId when entities move between systems.\n4. Update policy.appliesTo when systems, actions, or resources are renamed or removed.\n5. Declare resource.emits for workflows and agents that produce observable events.\n\nUse the OM graph as the authoritative reference for Command View structure. The graph builder derives the visualization from the OM contract -- do not expect Command View to show connections that are not declared in the OM.\n\nRelated References\n\n- /knowledge read knowledge.org-model-reference\n- /knowledge read knowledge.platform-composition-patterns\n- /knowledge read knowledge.platform-integration-patterns"
|
|
1491
1464
|
},
|
|
1492
1465
|
{
|
|
1493
1466
|
id: "knowledge.platform-composition-patterns",
|
|
1494
1467
|
title: "Platform Composition Patterns",
|
|
1495
1468
|
summary: "Reference for composing agents, workflows, integrations, tools, observability, scaling, error handling, and security into complete Elevasis automation systems.",
|
|
1496
|
-
bodyText: "Overview\
|
|
1469
|
+
bodyText: "Overview\n\nUse this reference to choose how Elevasis resources compose into complete systems. The core decision is whether reasoning, deterministic orchestration, or a hybrid of both should own the business flow.\n\nThree primary patterns exist:\n\n- Agent-centric: an agent is the primary orchestrator, and workflows or integrations are tools.\n- Workflow-centric: a workflow is the deterministic pipeline, and agents appear only as processing steps.\n- Hybrid: agents decide what should happen, and workflows execute reliable sequences.\n\nSystem Architecture Patterns\n\nAgent-Centric Systems\n\nPattern: Agent is the primary orchestrator; workflows and integrations are tools.\n\ntext\nTrigger to Agent\n |- Tool: Integration A\n |- Tool: Integration B\n |- Tool: Workflow 1 via resource invocation\n - Tool: Workflow 2 via resource invocation\n\nUse this pattern for ambiguous goals, dynamic decision-making, multi-turn conversations, and business logic that requires judgment.\n\nStrengths:\n\n- Flexible and adaptive.\n- Handles ambiguity well.\n- Can delegate to specialist resources.\n- Supports natural language interaction.\n\nWeaknesses:\n\n- Token cost per execution.\n- Non-deterministic LLM variance.\n- Requires strong observability for debugging.\n- Usually slower than deterministic workflows.\n\nWorkflow-Centric Systems\n\nPattern: Workflow is the pipeline; agents are processing steps.\n\ntext\nTrigger to Workflow\n |- Step 1: Integration A reads data\n |- Step 2: Agent processes or reasons\n |- Step 3: Integration B writes result\n - Step 4: Conditional routing\n\nUse this pattern for predictable sequences, data transformation pipelines, integration orchestration, and fixed business logic.\n\nStrengths:\n\n- Deterministic and reliable.\n- Fast execution.\n- Easy to debug step-by-step.\n- No token cost unless an agent step is included.\n\nWeaknesses:\n\n- Rigid, because steps are predefined.\n- Does not handle ambiguity well.\n- Requires code changes for logic updates.\n\nHybrid Systems\n\nPattern: Agents decide, workflows execute. This is the recommended default for complex automation.\n\ntext\nTrigger to Agent decides what to do\n |- Invokes: Workflow A\n |- Invokes: Workflow B\n - Uses: Integration C directly\n\nWorkflow A:\n |- Integration D reads\n |- Agent processes a specific subtask\n - Integration E writes\n\nUse this pattern when the system needs variable paths, reasoning, reliability, and a mix of predictable and unpredictable steps.\n\nStrengths:\n\n- Flexible where needed and reliable where possible.\n- Cost-efficient because workflows do not use tokens by default.\n- Good observability across agent reasoning and workflow steps.\n\nResource Composition Patterns\n\nAgent + Tools\n\nUse direct integration access for simple or frequent operations.\n\nTool categories:\n\n- Base tools: always available, high-frequency operations such as read queries or cached data access. Example: attiogetrecord.\n- Knowledge Map tools: lazy-loaded, low-frequency operations such as write operations or domain-specific capabilities. Examples: attiocreatecontact, dropboxuploadfile.\n- Resource invocation tools: delegate to workflows for deterministic sequences or call specialist agents.\n\nTool creation example:\n\ntypescript\nconst tool = createAttioCreateRecordTool('elevasis-attio')\n\nCredential names resolve to organization-scoped storage. RLS policies enforce organization isolation, credentials are encrypted at rest, and OAuth tokens can refresh automatically.\n\nAgent + Workflow\n\nUse an agent for reasoning and a workflow for deterministic execution.\n\ntext\nTrigger to Agent reasoning\n |- Direct tool: read integration\n |- Invoke tool: Workflow A\n - Invoke tool: Workflow B\n\nExecution flow:\n\n1. Agent analyzes the request.\n2. Agent invokes a workflow through a tool call.\n3. Workflow executes deterministic steps without token cost.\n4. Agent explains the result to the user.\n\nUse this pattern when the system needs both reasoning and reliability, has multiple execution paths, or should minimize token use by moving predictable work into workflows.\n\nWorkflow + Integration\n\nUse a workflow to orchestrate deterministic integration sequences.\n\ntext\nTrigger to Workflow\n |- Step 1: Integration A reads\n |- Step 2: Transform pure function\n |- Step 3: Integration B writes\n - Step 4: Notify\n\nUse this pattern for predictable step sequences, data transformation pipelines, integration orchestration, and cost-sensitive work that does not need LLM reasoning.\n\nPattern Selection Guide\n\n| Requirement | Pattern | Example |\n| --- | --- | --- |\n| Ambiguous goals | Agent-centric | Business orchestration with variable outcomes |\n| Predictable sequence | Workflow-centric | Shopify to CRM sync |\n| Hybrid needs | Agent + workflow | Support router where agent decides and workflow executes |\n| \\>10 tools | Knowledge Map | Agent with many domain capabilities |\n| High-frequency reads | Base tools | Attio read operations |\n| Low-frequency writes | Lazy-loaded tools | CRM updates or page creation |\n| External services | Integration tools | Attio, Gmail, Google Sheets |\n| Deterministic pipelines | Workflow + integration | Data transformation |\n\nComplexity guidelines:\n\n- Simple, 1-2 resources: agent with base tools, or workflow with 1-2 integrations.\n- Medium, 3-5 resources: agent plus Knowledge Map with 2-3 nodes, or workflow plus an agent step.\n- Complex, 6+ resources: agent plus Knowledge Map plus memory preload, or multi-integration workflows.\n\nCross-Cutting Concerns\n\nObservability\n\nTrack these surfaces:\n\n- Agent iterations, including reasoning and actions.\n- Workflow steps, including inputs and outputs.\n- Tool calls, including integration requests and responses.\n- Errors and retries.\n- Token usage and cost.\n\nPrimary tools:\n\n- Execution Logs for SSE-based debugging.\n- Activity Log for the real-time stream.\n- Execution Health for cost tracking and ROI review.\n- Command View for system architecture and dependency review.\n\nCost Tracking\n\nAgent cost comes from per-iteration token usage, model pricing, and tool execution cost. Workflow cost is usually zero token cost plus any external integration API fees.\n\nOptimization rules:\n\n- Use workflows for predictable tasks.\n- Lazy-load tools for 80-95% token savings.\n- Cache frequently accessed stable data.\n- Choose the appropriate model per task.\n\nScaling Strategies\n\nHorizontal scaling:\n\n- Keep agent execution stateless.\n- Store sessions in the database.\n- Let a load balancer distribute requests.\n\nVertical optimization:\n\n- Preload memory to reduce iteration count.\n- Lazy-load tools to reduce token usage.\n- Batch tool operations where possible.\n- Use parallel integration calls when the steps are independent.\n\nError Handling\n\nAgent error handling:\n\n- Tool errors are returned to the agent so it can reason about recovery.\n- Iteration limits prevent infinite loops.\n- Timeout protection constrains long-running tools and executions.\n- Graceful degradation explains what failed.\n\nWorkflow error handling:\n\n- Step retry logic uses exponential backoff, commonly 1, 4, and 9 minutes.\n- Conditional routing can send failures to an alternative step.\n- Manual intervention can route work to a human checkpoint.\n- Idempotent steps should be safe to retry.\n\nExample:\n\ntypescript\n{\n id: 'sync-to-crm',\n handler: async ({ input, context }) => {\n try {\n return await crmClient.createContact(input)\n } catch (error) {\n if (error.code === 'DUPLICATE') {\n return crmClient.updateContact(input)\n }\n\n throw error\n }\n },\n next: { type: 'linear', target: 'send-notification' }\n}\n\nSecurity\n\nCredential management:\n\n- Store credentials in the credentials table.\n- Encrypt values at rest.\n- Scope records by organization with RLS policies.\n- Refresh OAuth tokens automatically where supported.\n- Never store API keys in code.\n\nMulti-tenancy isolation layers:\n\n1. Database RLS on tenant-scoped tables.\n2. API middleware that requires organization context.\n3. Resource registry lookups scoped to the organization.\n4. Command View filtered by organization.\n\nBest Practices\n\n1. Start with a single agent or workflow, then add complexity only when needed.\n2. Build the working version before optimizing for caching or lazy loading.\n3. Put domain logic in agents and execution flow in workflows.\n4. Lazy-load large or low-frequency tool groups.\n5. Cache stable data, not fast-changing operational state.\n\nCommon mistakes:\n\n- Creating a Knowledge Map for fewer than five tools.\n- Using a workflow for one integration call when an agent tool would be simpler.\n- Loading more than ten tools as base tools.\n- Putting domain logic into workflows where it becomes hard to test and adapt.\n- Mixing unrelated concerns in one knowledge node.\n\nRelated References\n\n- /knowledge read knowledge.platform-integration-patterns\n- /knowledge read knowledge.platform-command-view"
|
|
1497
1470
|
},
|
|
1498
1471
|
{
|
|
1499
1472
|
id: "knowledge.platform-integration-patterns",
|
|
1500
1473
|
title: "Platform Integration Patterns",
|
|
1501
1474
|
summary: "Reference for connecting Elevasis agents and workflows to external services through adapters, OAuth, API keys, tenant-isolated credentials, retries, and tests.",
|
|
1502
|
-
bodyText: "Overview\
|
|
1475
|
+
bodyText: "Overview\n\nIntegration patterns define how Elevasis agents and workflows connect to external services such as Gmail, Attio, Google Sheets, and custom APIs. The platform uses a standardized adapter pattern with OAuth 2.0 and API key authentication backed by tenant-isolated credentials.\n\nCore patterns:\n\n- Direct integration, where a resource uses integration tools directly.\n- Integration workflow, where a workflow coordinates multiple integrations.\n- Shared integration, where multiple resources use the same credential set.\n- Multi-account integration, where the same provider has separate credentials for different contexts.\n\nDirect Integration Pattern\n\nPattern: Resource uses an integration tool.\n\nUse direct integration tools when an agent or workflow performs frequent operations against a provider.\n\nCharacteristics:\n\n- Tools are always available to the resource.\n- There is no additional navigation overhead.\n- The pattern is optimized for frequent read-heavy operations.\n\nTool factory location:\n\ntext\npackages/core/src/execution/engine/tools/integration/server/adapters/{provider}/{provider}-tools.ts\n\nTool factories use createIntegrationTool() with a credentialName parameter. Example: createAttioCreateRecordTool(credentialName).\n\nIntegration Workflow Pattern\n\nPattern: Agent invokes a workflow, and the workflow uses integrations.\n\nUse an integration workflow for complex multi-step operations that need deterministic orchestration.\n\nExample lead capture flow:\n\n1. Webhook trigger receives the event.\n2. Workflow creates an Attio contact.\n3. Workflow sends a Gmail notification.\n4. Workflow returns confirmation.\n\nCharacteristics:\n\n- Deterministic execution order.\n- Step-level error handling and retry.\n- Multiple integrations coordinated in one place.\n- Built-in audit trail through workflow execution.\n\nShared Integration Pattern\n\nPattern: Multiple resources share the same integration.\n\nUse shared integrations for organization-wide providers that should use one credential set.\n\nExample:\n\ntext\npackages/elevasis-operations/src/index.ts\n\nCharacteristics:\n\n- One credential per integration.\n- Centralized credential management.\n- Shared across agents and workflows.\n\nMulti-Account Pattern\n\nPattern: Same provider, different credentials.\n\nUse this pattern for department-specific provider instances or separate dev/prod environments.\n\nExample:\n\ntypescript\nconst salesTool = createAttioCreateRecordTool('attio-sales')\nconst supportTool = createAttioCreateRecordTool('attio-support')\n\nDisambiguate multi-account tools with explicit tool names:\n\ntypescript\nconst tool = createAttioToolNamed(\n 'attiosalescreaterecord',\n 'attio-sales',\n 'createRecord'\n)\n\nAuthentication Patterns\n\nOAuth 2.0 vs API Key\n\n| Aspect | OAuth 2.0 | API key |\n| --- | --- | --- |\n| Auth flow | Browser redirect plus token exchange | Direct API key |\n| Setup complexity | High: client ID, secret, redirect URL | Low: single API key |\n| Token refresh | Automatic refresh token rotation | Manual key rotation |\n| Scope control | Granular permission scopes | Full access or none |\n| User context | Per-user authorization | Service-level access |\n| Revocation | User can revoke anytime | Manual key deletion |\n\nOAuth 2.0 Pattern\n\nProviders include Gmail and Google Sheets.\n\nCredential format:\n\ntypescript\ninterface OAuthToken {\n provider: string\n accessToken: string\n refreshToken: string\n expiresAt: string\n tokenType: 'Bearer'\n scope?: string\n}\n\nexpiresAt is an ISO 8601 timestamp. The platform handles token refresh when supported by the provider and credential implementation.\n\nAPI Key Pattern\n\nProviders include Attio and custom APIs.\n\nCredential format:\n\ntypescript\ninterface APIKeyCredentials {\n apiKey: string\n}\n\nProvider-specific validation belongs in the adapter. For Attio, see:\n\ntext\npackages/core/src/execution/engine/tools/integration/server/adapters/attio/attio-adapter.ts\n\nCredential Management\n\nCredentials are stored in the credentials table.\n\nKey columns:\n\n- organizationid for tenant isolation.\n- name, such as elevasis-attio.\n- provider, such as gmail or attio.\n- encryptedvalue containing encrypted JSON.\n\nSecurity rules:\n\n- RLS policies enforce tenant isolation.\n- Values are encrypted at rest.\n- Credentials do not cross organization boundaries.\n\nBest practices:\n\n- Store credentials encrypted in the database.\n- Use tenant-isolated credential names.\n- Validate credentials before API calls.\n- Rotate API keys regularly.\n- Use least-privilege OAuth scopes.\n\nDo not:\n\n- Hardcode credentials in code.\n- Share credentials across organizations.\n- Log credential values.\n- Store provider API keys in environment variables for tenant integrations.\n- Reuse the same credential name for dev and prod.\n\nCredential resolution flow:\n\n1. Tool requests a credential by name.\n2. Platform queries credentials with the current organizationid.\n3. Platform decrypts the credential.\n4. Adapter validates the credential against the provider schema.\n5. Tool passes the credential to the provider adapter.\n6. Usage is logged without credential values.\n\nImplementation reference:\n\ntext\npackages/core/src/execution/engine/tools/integration/tool.ts\n\nError Handling Patterns\n\nAdapters should convert provider errors into platform tooling errors.\n\nCommon error categories:\n\n- credentialsinvalid for invalid or missing credentials.\n- apierror for provider API errors.\n- networkerror for network or timeout failures.\n- validationerror for invalid parameters.\n- methodnotfound for unknown adapter methods.\n\nRetry strategy:\n\n- Network errors: retry with exponential backoff, commonly 1, 2, and 4 seconds.\n- Auth errors: fail immediately because the credential needs attention.\n- Validation errors: fail immediately because the input needs correction.\n- Rate limits: retry after reset when the provider exposes a reset time.\n- Workflow-level retries: commonly 3 attempts with 1, 4, and 9 minute delays.\n\nAdapter Development\n\nAdapter class location:\n\ntext\npackages/core/src/execution/engine/tools/integration/server/adapters/{provider}/{provider}-adapter.ts\n\nAdapter classes implement BaseIntegrationAdapter and contain call() and validateCredentials() methods.\n\nTool factory location:\n\ntext\npackages/core/src/execution/engine/tools/integration/server/adapters/{provider}/{provider}-tools.ts\n\nTool factories export create{Provider}{Operation}Tool(credentialName) functions.\n\nTests belong under:\n\ntext\npackages/core/src/execution/engine/tools/integration/server/adapters/{provider}/tests/\n\nRegistration happens in:\n\ntext\npackages/core/src/execution/engine/tools/integration/server/index.ts\n\nTesting Strategies\n\nUnit testing:\n\n- Mock external APIs.\n- Cover credential validation.\n- Cover API call construction.\n- Cover response parsing.\n- Cover error handling.\n\nIntegration testing:\n\n- Use real API calls only with test accounts or test workspaces.\n- Clean up test data after tests.\n- Run in CI only when secret credentials are available.\n- Keep provider behavior mocked in unit tests.\n\nAgent testing:\n\n- Test agents using integration tools at the resource boundary.\n- Tenant project agent tests normally live under external/{org}/src/agents/{agent}/tests/.\n\nRelated References\n\n- /knowledge read knowledge.platform-composition-patterns\n- /knowledge read knowledge.platform-command-view\n- /knowledge read knowledge.platform-systems-overview"
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
id: "knowledge.system-building",
|
|
1479
|
+
title: "System Building Guidance",
|
|
1480
|
+
summary: "Reference for authoring a complete Organization Model System end to end -- shell, ontology, resources, topology, knowledge nodes, UI manifest, and apiInterface readiness. Points to the intent-to-abstraction map, the ordered build runbook, and the permanent guide.",
|
|
1481
|
+
bodyText: `Overview
|
|
1482
|
+
|
|
1483
|
+
Use this reference when building a new System or extending an existing one inside the Organization Model. The intent-to-abstraction map, the ordered build runbook, and the permanent guide together form the complete guidance chain.
|
|
1484
|
+
|
|
1485
|
+
The Organization Model is the single join point across runtime resources, UI manifests, topology wiring, and agent knowledge. System authoring starts here -- not in deployment files, UI registries, or hand-written constants.
|
|
1486
|
+
|
|
1487
|
+
Entry Points
|
|
1488
|
+
|
|
1489
|
+
Three entry points exist depending on context:
|
|
1490
|
+
|
|
1491
|
+
- Intent-triggered (primary): describe what the system should do in free text. The /om skill's prompt-signals route build intent to the runbook automatically -- no subcommand required.
|
|
1492
|
+
- Manual trigger (secondary): invoke /om build directly to walk the sequenced runbook.
|
|
1493
|
+
- Copy-address: use /om read-folder group:systems in the Knowledge Tree to browse all System nodes and their governing knowledge.
|
|
1494
|
+
|
|
1495
|
+
Intent to Abstraction Map
|
|
1496
|
+
|
|
1497
|
+
The intent-to-abstraction rule lives at .claude/rules/system-building.md. It auto-injects when editing any OM domain file and maps each user intent phrase to the exact System slot it fills, the canonical authoring file, and the define helper to call.
|
|
1498
|
+
|
|
1499
|
+
Representative mappings:
|
|
1500
|
+
|
|
1501
|
+
- "react to incoming email" -- trigger (webhook) + topology.triggers edge + handler workflow
|
|
1502
|
+
- "store deal data" -- system.ontology object with scope: { system: '<id>' }
|
|
1503
|
+
- "expose to other systems" -- system.apiInterface marker + scoped topology grant
|
|
1504
|
+
- "show in the dashboard" -- system.ui.surfaces + SystemModule keyed to systemId
|
|
1505
|
+
- "track with a status" -- system.ontology catalog + usesCatalogs resource binding
|
|
1506
|
+
|
|
1507
|
+
See .claude/rules/system-building.md for the full 13-row table covering all System slots.
|
|
1508
|
+
|
|
1509
|
+
Ordered Build Runbook
|
|
1510
|
+
|
|
1511
|
+
The sequenced build journey (once available at /om build) walks:
|
|
1512
|
+
|
|
1513
|
+
1. Define the System shell (defineSystem in the tenant OM)
|
|
1514
|
+
2. Author system.ontology (objects, links, actions, catalogs, events, interfaces, value types, properties, groups, endpoints)
|
|
1515
|
+
3. Author resources + ontology bindings (systemPath, reads/writes/actions/usesCatalogs/emits)
|
|
1516
|
+
4. Wire topology (triggers/uses/approval) and cross-system grants
|
|
1517
|
+
5. Author knowledge nodes (governs: system:<id> via links frontmatter)
|
|
1518
|
+
6. Register the UI manifest (SystemModule keyed to systemId)
|
|
1519
|
+
7. Mark system.apiInterface when the system is ready for cross-system use
|
|
1520
|
+
8. Run pnpm exec elevasis om:doctor to verify coherence
|
|
1521
|
+
|
|
1522
|
+
Permanent Guide
|
|
1523
|
+
|
|
1524
|
+
The full narrative guide with worked cross-system patterns, OM Spine producer/consumer examples, and apiInterface readiness troubleshooting lives at:
|
|
1525
|
+
|
|
1526
|
+
apps/docs/content/docs/technical/development/guides/building-systems/index.mdx
|
|
1527
|
+
|
|
1528
|
+
Read it for step-by-step authoring instructions, code examples, and common mistake patterns.
|
|
1529
|
+
|
|
1530
|
+
Key Source Files
|
|
1531
|
+
|
|
1532
|
+
- packages/elevasis-core/src/organization-model/systems.ts -- SystemEntry master abstraction; every buildable slot lives here
|
|
1533
|
+
- packages/core/src/organization-model/ontology.ts -- ontology ID scheme (system.path:kind/local-id)
|
|
1534
|
+
- packages/core/src/organization-model/helpers.ts -- getSystem / getResourcesForSystem / listAllSystems
|
|
1535
|
+
- packages/core/src/organization-model/domains/resources.ts -- ResourceEntry, systemPath, ontology bindings
|
|
1536
|
+
- packages/core/src/organization-model/domains/topology.ts -- triggers/uses/approval wiring + system interface grants
|
|
1537
|
+
|
|
1538
|
+
Related References
|
|
1539
|
+
|
|
1540
|
+
- /om read knowledge.platform-composition-patterns
|
|
1541
|
+
- /om read knowledge.org-model-graph-contract`
|
|
1503
1542
|
}
|
|
1504
1543
|
];
|
|
1505
1544
|
|