create-contextkit 0.1.1 → 0.2.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eric Kittelson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -55,11 +55,6 @@ function main() {
55
55
  fs.mkdirSync(projectDir, { recursive: true });
56
56
  const createdFiles = [];
57
57
  copyDir(templatesDir, projectDir, createdFiles, projectDir, projectName, displayName);
58
- const emptyDirs = ["context/entities", "context/terms"];
59
- for (const dir of emptyDirs) {
60
- const dirPath = path.join(projectDir, dir);
61
- fs.mkdirSync(dirPath, { recursive: true });
62
- }
63
58
  for (const file of createdFiles) {
64
59
  console.log(` Created ${file}`);
65
60
  }
@@ -68,5 +63,6 @@ function main() {
68
63
  console.log(` cd ${projectName}`);
69
64
  console.log(" pnpm add -D @runcontext/cli");
70
65
  console.log(" npx context lint");
66
+ console.log(" npx context tier");
71
67
  }
72
68
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-contextkit",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Scaffold a new ContextKit project",
5
5
  "license": "MIT",
6
6
  "author": "Eric Kittelson",
@@ -10,16 +10,27 @@
10
10
  "url": "https://github.com/erickittelson/ContextKit.git",
11
11
  "directory": "create-contextkit"
12
12
  },
13
- "keywords": ["contextkit", "scaffolder", "create", "init"],
13
+ "keywords": [
14
+ "contextkit",
15
+ "scaffolder",
16
+ "create",
17
+ "init"
18
+ ],
14
19
  "type": "module",
15
- "bin": { "create-contextkit": "./dist/index.js" },
16
- "files": ["dist", "templates"],
17
- "scripts": {
18
- "build": "tsup",
19
- "clean": "rm -rf dist"
20
+ "bin": {
21
+ "create-contextkit": "./dist/index.js"
20
22
  },
23
+ "files": [
24
+ "dist",
25
+ "templates"
26
+ ],
21
27
  "devDependencies": {
28
+ "@types/node": "^25.3.3",
22
29
  "tsup": "^8.4.0",
23
30
  "typescript": "^5.7.0"
31
+ },
32
+ "scripts": {
33
+ "build": "tsup",
34
+ "clean": "rm -rf dist"
24
35
  }
25
- }
36
+ }
@@ -0,0 +1,5 @@
1
+ id: revenue
2
+ definition: "Total value of completed orders before refunds"
3
+ synonyms: [sales, order revenue]
4
+ owner: example-team
5
+ tags: [finance]
@@ -0,0 +1,23 @@
1
+ model: example-model
2
+ owner: example-team
3
+ trust: endorsed
4
+ security: internal
5
+ tags: [orders, revenue]
6
+
7
+ datasets:
8
+ orders:
9
+ grain: "One row per order"
10
+ refresh: daily
11
+ table_type: fact
12
+
13
+ fields:
14
+ orders.amount:
15
+ semantic_role: metric
16
+ default_aggregation: SUM
17
+ additive: true
18
+ orders.order_id:
19
+ semantic_role: identifier
20
+ orders.customer_id:
21
+ semantic_role: identifier
22
+ orders.order_date:
23
+ semantic_role: date
@@ -0,0 +1,12 @@
1
+ model: example-model
2
+
3
+ upstream:
4
+ - source: source-system.raw-data
5
+ type: pipeline
6
+ refresh: daily
7
+ notes: Raw data ingested daily via ETL pipeline
8
+
9
+ downstream:
10
+ - target: analytics-dashboard
11
+ type: dashboard
12
+ notes: Executive KPI dashboard
@@ -0,0 +1,51 @@
1
+ version: "1.0"
2
+
3
+ semantic_model:
4
+ - name: example-model
5
+ description: Example orders analytics model
6
+ ai_context:
7
+ instructions: "Use for order and revenue analysis"
8
+ synonyms: ["orders model"]
9
+
10
+ datasets:
11
+ - name: orders
12
+ source: warehouse.public.orders
13
+ primary_key: [order_id]
14
+ description: "Orders fact table"
15
+ fields:
16
+ - name: order_id
17
+ expression:
18
+ dialects:
19
+ - dialect: ANSI_SQL
20
+ expression: order_id
21
+ description: Unique order identifier
22
+ - name: customer_id
23
+ expression:
24
+ dialects:
25
+ - dialect: ANSI_SQL
26
+ expression: customer_id
27
+ description: Foreign key to customers
28
+ dimension:
29
+ is_time: false
30
+ - name: amount
31
+ expression:
32
+ dialects:
33
+ - dialect: ANSI_SQL
34
+ expression: amount
35
+ description: Order amount in USD
36
+ - name: order_date
37
+ expression:
38
+ dialects:
39
+ - dialect: ANSI_SQL
40
+ expression: order_date
41
+ description: Date the order was placed
42
+ dimension:
43
+ is_time: true
44
+
45
+ metrics:
46
+ - name: total_revenue
47
+ expression:
48
+ dialects:
49
+ - dialect: ANSI_SQL
50
+ expression: "SUM(orders.amount)"
51
+ description: Total revenue across all orders
@@ -1,3 +1,4 @@
1
1
  id: example-team
2
2
  display_name: Example Team
3
3
  email: team@example.com
4
+ description: "Responsible for data and analytics"
@@ -0,0 +1,19 @@
1
+ model: example-model
2
+
3
+ golden_queries:
4
+ - question: "What is total revenue?"
5
+ sql: |
6
+ SELECT SUM(amount) AS total_revenue
7
+ FROM orders
8
+ dialect: ANSI_SQL
9
+ tags: [revenue]
10
+
11
+ business_rules:
12
+ - name: positive-amounts
13
+ definition: "Only include orders with positive amounts in revenue calculations"
14
+ enforcement:
15
+ - "Filter to amount > 0 when calculating revenue"
16
+ avoid:
17
+ - "Do not include negative or zero amounts in revenue totals"
18
+ tables: [orders]
19
+ applied_always: true
@@ -1,4 +1,3 @@
1
- project:
2
- id: {{PROJECT_NAME}}
3
- displayName: "{{PROJECT_DISPLAY_NAME}}"
4
- version: "0.1.0"
1
+ context_dir: context
2
+ output_dir: dist
3
+ minimum_tier: bronze
@@ -1,5 +0,0 @@
1
- id: example-concept
2
- definition: An example concept to get you started.
3
- owner: example-team
4
- status: draft
5
- tags: [example]
@@ -1,8 +0,0 @@
1
- id: example-policy
2
- description: An example policy.
3
- rules:
4
- - priority: 100
5
- when:
6
- tags_any: [sensitive]
7
- then:
8
- require_role: admin
@@ -1,4 +0,0 @@
1
- id: example-product
2
- description: An example product to get you started.
3
- owner: example-team
4
- tags: [example]