stemseal 0.1.6__tar.gz

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.
Files changed (58) hide show
  1. stemseal-0.1.6/LICENSE +21 -0
  2. stemseal-0.1.6/PKG-INFO +104 -0
  3. stemseal-0.1.6/README.md +94 -0
  4. stemseal-0.1.6/pyproject.toml +22 -0
  5. stemseal-0.1.6/setup.cfg +4 -0
  6. stemseal-0.1.6/stemseal/__init__.py +2 -0
  7. stemseal-0.1.6/stemseal/__main__.py +3 -0
  8. stemseal-0.1.6/stemseal/_runner.py +13 -0
  9. stemseal-0.1.6/stemseal/cells/annual_leave_days/1.0/cell.py +11 -0
  10. stemseal-0.1.6/stemseal/cells/annual_leave_days/1.0/contract.json +27 -0
  11. stemseal-0.1.6/stemseal/cells/annual_leave_days/1.0/gt_cases.json +1 -0
  12. stemseal-0.1.6/stemseal/cells/annual_leave_days/1.0/lock.json +10 -0
  13. stemseal-0.1.6/stemseal/cells/currency_convert/1.0/cell.py +14 -0
  14. stemseal-0.1.6/stemseal/cells/currency_convert/1.0/contract.json +30 -0
  15. stemseal-0.1.6/stemseal/cells/currency_convert/1.0/gt_cases.json +1 -0
  16. stemseal-0.1.6/stemseal/cells/currency_convert/1.0/lock.json +10 -0
  17. stemseal-0.1.6/stemseal/cells/food_calories/1.0/cell.py +5 -0
  18. stemseal-0.1.6/stemseal/cells/food_calories/1.0/contract.json +28 -0
  19. stemseal-0.1.6/stemseal/cells/food_calories/1.0/gt_cases.json +1 -0
  20. stemseal-0.1.6/stemseal/cells/food_calories/1.0/lock.json +10 -0
  21. stemseal-0.1.6/stemseal/cells/geometric_mean_growth/1.0/cell.py +11 -0
  22. stemseal-0.1.6/stemseal/cells/geometric_mean_growth/1.0/contract.json +27 -0
  23. stemseal-0.1.6/stemseal/cells/geometric_mean_growth/1.0/gt_cases.json +1 -0
  24. stemseal-0.1.6/stemseal/cells/geometric_mean_growth/1.0/lock.json +10 -0
  25. stemseal-0.1.6/stemseal/cells/monthly_wage_from_hourly/1.0/cell.py +17 -0
  26. stemseal-0.1.6/stemseal/cells/monthly_wage_from_hourly/1.0/contract.json +35 -0
  27. stemseal-0.1.6/stemseal/cells/monthly_wage_from_hourly/1.0/gt_cases.json +1 -0
  28. stemseal-0.1.6/stemseal/cells/monthly_wage_from_hourly/1.0/lock.json +10 -0
  29. stemseal-0.1.6/stemseal/cells/percentage_point_diff/1.0/cell.py +5 -0
  30. stemseal-0.1.6/stemseal/cells/percentage_point_diff/1.0/contract.json +29 -0
  31. stemseal-0.1.6/stemseal/cells/percentage_point_diff/1.0/gt_cases.json +1 -0
  32. stemseal-0.1.6/stemseal/cells/percentage_point_diff/1.0/lock.json +10 -0
  33. stemseal-0.1.6/stemseal/cells/percentile_rank/1.0/cell.py +28 -0
  34. stemseal-0.1.6/stemseal/cells/percentile_rank/1.0/contract.json +30 -0
  35. stemseal-0.1.6/stemseal/cells/percentile_rank/1.0/gt_cases.json +1 -0
  36. stemseal-0.1.6/stemseal/cells/percentile_rank/1.0/lock.json +10 -0
  37. stemseal-0.1.6/stemseal/cells/price_for_target_margin/1.0/cell.py +7 -0
  38. stemseal-0.1.6/stemseal/cells/price_for_target_margin/1.0/contract.json +29 -0
  39. stemseal-0.1.6/stemseal/cells/price_for_target_margin/1.0/gt_cases.json +1 -0
  40. stemseal-0.1.6/stemseal/cells/price_for_target_margin/1.0/lock.json +10 -0
  41. stemseal-0.1.6/stemseal/cli.py +34 -0
  42. stemseal-0.1.6/stemseal/guides/_default.json +45 -0
  43. stemseal-0.1.6/stemseal/guides/exaone3.5.json +67 -0
  44. stemseal-0.1.6/stemseal/guides/gemma.json +46 -0
  45. stemseal-0.1.6/stemseal/guides/llama3.json +140 -0
  46. stemseal-0.1.6/stemseal/guides/mistral.json +45 -0
  47. stemseal-0.1.6/stemseal/guides/phi.json +44 -0
  48. stemseal-0.1.6/stemseal/guides/qwen2.5.json +55 -0
  49. stemseal-0.1.6/stemseal/guides/qwen3.json +49 -0
  50. stemseal-0.1.6/stemseal/guides/tiny.json +48 -0
  51. stemseal-0.1.6/stemseal/guides.py +122 -0
  52. stemseal-0.1.6/stemseal/hub.py +252 -0
  53. stemseal-0.1.6/stemseal/mcp.py +91 -0
  54. stemseal-0.1.6/stemseal.egg-info/PKG-INFO +104 -0
  55. stemseal-0.1.6/stemseal.egg-info/SOURCES.txt +56 -0
  56. stemseal-0.1.6/stemseal.egg-info/dependency_links.txt +1 -0
  57. stemseal-0.1.6/stemseal.egg-info/entry_points.txt +3 -0
  58. stemseal-0.1.6/stemseal.egg-info/top_level.txt +1 -0
stemseal-0.1.6/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 roarose
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.
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: stemseal
3
+ Version: 0.1.6
4
+ Summary: Verified, locked calculation cells that small LLMs call instead of guessing. Local, no server, no dependencies.
5
+ License: MIT
6
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Dynamic: license-file
10
+
11
+ # stemseal (lite)
12
+
13
+ **Small LLMs guess at calculations. stemseal gives them verified cells to call instead.**
14
+ 작은 LLM은 계산을 어림짐작합니다. stemseal은 그 대신 부를 수 있는 검증된 세포를 줍니다.
15
+
16
+ A *cell* is one small, deterministic function. It enters the bank only after it passes a purity check (no I/O, no clock, no randomness) and at least 20 ground-truth cases. Then it is locked by sha256. A locked cell never changes. A fix becomes a new version. If no cell fits, the model gets an honest "not available" instead of an invented answer.
17
+
18
+ 세포는 작고 결정적인 함수 하나입니다. 순수성 검사와 정답 사례 20개 이상을 통과해야 들어오고, sha256으로 잠깁니다. 잠긴 세포는 바뀌지 않으며, 고치면 새 버전이 됩니다. 맞는 세포가 없으면 지어낸 답 대신 "없음"을 정직하게 돌려줍니다.
19
+
20
+ This lite version runs entirely on your machine. There is no server, no account, no dependencies, and no telemetry.
21
+ 이 판은 전부 내 컴퓨터에서 돕니다. 서버, 계정, 의존성, 원격 수집이 없습니다.
22
+
23
+ ## What we measured / 측정 결과
24
+
25
+ 52 held-out tasks, 3 runs each (156), local models through Ollama:
26
+
27
+ | Model | Alone | With stemseal + model guide |
28
+ |---|---|---|
29
+ | EXAONE 3.5 7.8B | 23% | 78% |
30
+ | qwen2.5:3b | 11% | 66% |
31
+ | llama3.2:3b | 7% | 50% |
32
+
33
+ Caveats, honestly / 솔직한 한계:
34
+ - One test set, written by us, mostly Korean business arithmetic. Your tasks will differ.
35
+ - 우리가 만든 시험 하나, 주로 한국어 업무 계산입니다. 여러분의 일과는 다를 수 있습니다.
36
+ - Cells help only where a cell exists. Writing, translation and judgment stay with the model.
37
+ - 세포가 있는 계산에서만 돕습니다. 글쓰기, 번역, 판단은 모델 몫입니다.
38
+
39
+ ## Install / 설치
40
+
41
+ ```
42
+ pip install git+https://github.com/roarose/stemseal
43
+ stemseal verify # re-checks every lock and ground-truth case
44
+ ```
45
+
46
+ ## Connect to your model (MCP) / 모델에 연결
47
+
48
+ Any MCP client (LM Studio, Claude Desktop, Ollama front-ends that speak MCP, ...):
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "stemseal": {
54
+ "command": "stemseal-mcp",
55
+ "env": { "STEMSEAL_MODEL": "qwen2.5:3b" }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ `STEMSEAL_MODEL` is optional. When set, `find_cell` returns a short selection guide written for that model family's known weak spots (too many candidates, wrapped arguments, renamed keys), and `call_cell` repairs those input mistakes before running the cell.
62
+ `STEMSEAL_MODEL`을 넣으면 그 모델 계열의 약점에 맞춘 고르기 안내가 함께 오고, 흔한 입력 실수를 고친 뒤 실행합니다.
63
+
64
+ Tools: `find_cell`, `call_cell`, `list_cells`, `request_cell`.
65
+
66
+ Language: guides answer in Korean when the request contains Hangul and in English otherwise. Set `STEMSEAL_LANG=ko` or `en` to fix it. The numbers above were measured with the Korean wording; the English wording is a translation and has not been re-measured yet.
67
+ 안내 문구는 요청에 한글이 있으면 한국어, 없으면 영어로 나갑니다. 위 수치는 한국어 문구로 잰 것이고, 영어 문구는 아직 따로 재지 않았습니다.
68
+
69
+ ## Command line
70
+
71
+ ```
72
+ stemseal list
73
+ stemseal find 연평균 성장률
74
+ stemseal call currency_convert '{"amount": 100, "rate": 1385.5}'
75
+ stemseal request 대출 원리금 균등상환 월 납입액
76
+ stemseal demand
77
+ ```
78
+
79
+ ## Cells
80
+
81
+ | cell | computes | inputs |
82
+ |---|---|---|
83
+ | annual_leave_days | 근속 연수로 연차 일수 (15일, 2년마다 +1, 최대 25) | years |
84
+ | currency_convert | 외화를 원화로 환산 (원 미만 버림) | amount, rate |
85
+ | food_calories | 100g당 열량과 먹은 양으로 섭취 열량 | kcal_per_100g, grams |
86
+ | geometric_mean_growth | 기간별 성장률의 기하평균 성장률 (%) | rates |
87
+ | monthly_wage_from_hourly | 시급을 월 209시간 기준 월급으로 | hourly_wage |
88
+ | percentage_point_diff | 두 비율의 차이 (%p) | before_pct, after_pct |
89
+ | percentile_rank | 값이 목록에서 몇 % 위치인지 | values, value |
90
+ | price_for_target_margin | 원가와 목표 마진율로 판매가 | cost, margin_pct |
91
+
92
+ ## Need a cell that isn't here? / 필요한 세포가 없나요?
93
+
94
+ When `find_cell` comes back empty, the model can call `request_cell`. The need is saved only on your machine (`~/.stemseal/ledger.jsonl`), and the reply carries a link to open a GitHub issue. Nothing is sent unless you open it. Requested cells are built as demand gathers and ship in the next version.
95
+
96
+ `request_cell`은 필요를 내 컴퓨터에만 기록하고, GitHub 이슈를 여는 링크를 돌려줍니다. 링크를 직접 열기 전에는 아무것도 보내지 않습니다. 요청이 모이는 순서대로 세포를 만들어 다음 버전에 담습니다.
97
+
98
+ ## Safety
99
+
100
+ Cells run in a separate `python -I` process with a timeout, and only after the purity gate. This is process isolation, not an OS sandbox. Every cell here was reviewed before locking, and `stemseal verify` lets you check that none changed.
101
+
102
+ ## License
103
+
104
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,94 @@
1
+ # stemseal (lite)
2
+
3
+ **Small LLMs guess at calculations. stemseal gives them verified cells to call instead.**
4
+ 작은 LLM은 계산을 어림짐작합니다. stemseal은 그 대신 부를 수 있는 검증된 세포를 줍니다.
5
+
6
+ A *cell* is one small, deterministic function. It enters the bank only after it passes a purity check (no I/O, no clock, no randomness) and at least 20 ground-truth cases. Then it is locked by sha256. A locked cell never changes. A fix becomes a new version. If no cell fits, the model gets an honest "not available" instead of an invented answer.
7
+
8
+ 세포는 작고 결정적인 함수 하나입니다. 순수성 검사와 정답 사례 20개 이상을 통과해야 들어오고, sha256으로 잠깁니다. 잠긴 세포는 바뀌지 않으며, 고치면 새 버전이 됩니다. 맞는 세포가 없으면 지어낸 답 대신 "없음"을 정직하게 돌려줍니다.
9
+
10
+ This lite version runs entirely on your machine. There is no server, no account, no dependencies, and no telemetry.
11
+ 이 판은 전부 내 컴퓨터에서 돕니다. 서버, 계정, 의존성, 원격 수집이 없습니다.
12
+
13
+ ## What we measured / 측정 결과
14
+
15
+ 52 held-out tasks, 3 runs each (156), local models through Ollama:
16
+
17
+ | Model | Alone | With stemseal + model guide |
18
+ |---|---|---|
19
+ | EXAONE 3.5 7.8B | 23% | 78% |
20
+ | qwen2.5:3b | 11% | 66% |
21
+ | llama3.2:3b | 7% | 50% |
22
+
23
+ Caveats, honestly / 솔직한 한계:
24
+ - One test set, written by us, mostly Korean business arithmetic. Your tasks will differ.
25
+ - 우리가 만든 시험 하나, 주로 한국어 업무 계산입니다. 여러분의 일과는 다를 수 있습니다.
26
+ - Cells help only where a cell exists. Writing, translation and judgment stay with the model.
27
+ - 세포가 있는 계산에서만 돕습니다. 글쓰기, 번역, 판단은 모델 몫입니다.
28
+
29
+ ## Install / 설치
30
+
31
+ ```
32
+ pip install git+https://github.com/roarose/stemseal
33
+ stemseal verify # re-checks every lock and ground-truth case
34
+ ```
35
+
36
+ ## Connect to your model (MCP) / 모델에 연결
37
+
38
+ Any MCP client (LM Studio, Claude Desktop, Ollama front-ends that speak MCP, ...):
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "stemseal": {
44
+ "command": "stemseal-mcp",
45
+ "env": { "STEMSEAL_MODEL": "qwen2.5:3b" }
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ `STEMSEAL_MODEL` is optional. When set, `find_cell` returns a short selection guide written for that model family's known weak spots (too many candidates, wrapped arguments, renamed keys), and `call_cell` repairs those input mistakes before running the cell.
52
+ `STEMSEAL_MODEL`을 넣으면 그 모델 계열의 약점에 맞춘 고르기 안내가 함께 오고, 흔한 입력 실수를 고친 뒤 실행합니다.
53
+
54
+ Tools: `find_cell`, `call_cell`, `list_cells`, `request_cell`.
55
+
56
+ Language: guides answer in Korean when the request contains Hangul and in English otherwise. Set `STEMSEAL_LANG=ko` or `en` to fix it. The numbers above were measured with the Korean wording; the English wording is a translation and has not been re-measured yet.
57
+ 안내 문구는 요청에 한글이 있으면 한국어, 없으면 영어로 나갑니다. 위 수치는 한국어 문구로 잰 것이고, 영어 문구는 아직 따로 재지 않았습니다.
58
+
59
+ ## Command line
60
+
61
+ ```
62
+ stemseal list
63
+ stemseal find 연평균 성장률
64
+ stemseal call currency_convert '{"amount": 100, "rate": 1385.5}'
65
+ stemseal request 대출 원리금 균등상환 월 납입액
66
+ stemseal demand
67
+ ```
68
+
69
+ ## Cells
70
+
71
+ | cell | computes | inputs |
72
+ |---|---|---|
73
+ | annual_leave_days | 근속 연수로 연차 일수 (15일, 2년마다 +1, 최대 25) | years |
74
+ | currency_convert | 외화를 원화로 환산 (원 미만 버림) | amount, rate |
75
+ | food_calories | 100g당 열량과 먹은 양으로 섭취 열량 | kcal_per_100g, grams |
76
+ | geometric_mean_growth | 기간별 성장률의 기하평균 성장률 (%) | rates |
77
+ | monthly_wage_from_hourly | 시급을 월 209시간 기준 월급으로 | hourly_wage |
78
+ | percentage_point_diff | 두 비율의 차이 (%p) | before_pct, after_pct |
79
+ | percentile_rank | 값이 목록에서 몇 % 위치인지 | values, value |
80
+ | price_for_target_margin | 원가와 목표 마진율로 판매가 | cost, margin_pct |
81
+
82
+ ## Need a cell that isn't here? / 필요한 세포가 없나요?
83
+
84
+ When `find_cell` comes back empty, the model can call `request_cell`. The need is saved only on your machine (`~/.stemseal/ledger.jsonl`), and the reply carries a link to open a GitHub issue. Nothing is sent unless you open it. Requested cells are built as demand gathers and ship in the next version.
85
+
86
+ `request_cell`은 필요를 내 컴퓨터에만 기록하고, GitHub 이슈를 여는 링크를 돌려줍니다. 링크를 직접 열기 전에는 아무것도 보내지 않습니다. 요청이 모이는 순서대로 세포를 만들어 다음 버전에 담습니다.
87
+
88
+ ## Safety
89
+
90
+ Cells run in a separate `python -I` process with a timeout, and only after the purity gate. This is process isolation, not an OS sandbox. Every cell here was reviewed before locking, and `stemseal verify` lets you check that none changed.
91
+
92
+ ## License
93
+
94
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1,22 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "stemseal"
7
+ version = "0.1.6"
8
+ description = "Verified, locked calculation cells that small LLMs call instead of guessing. Local, no server, no dependencies."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ dependencies = []
12
+ license = { text = "MIT" }
13
+
14
+ [project.scripts]
15
+ stemseal = "stemseal.cli:main"
16
+ stemseal-mcp = "stemseal.mcp:main"
17
+
18
+ [tool.setuptools]
19
+ packages = ["stemseal"]
20
+
21
+ [tool.setuptools.package-data]
22
+ stemseal = ["guides/*.json", "cells/*/*/*.py", "cells/*/*/*.json"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ """stemseal: verified, locked calculation cells that small LLMs can call instead of guessing."""
2
+ __version__ = "0.1.6"
@@ -0,0 +1,3 @@
1
+ import sys
2
+ from .cli import main
3
+ sys.exit(main())
@@ -0,0 +1,13 @@
1
+ import json, sys
2
+ src = open(sys.argv[1], encoding="utf-8").read()
3
+ ns = {"__name__": "cell"}
4
+ exec(compile(src, "cell.py", "exec"), ns)
5
+ out = []
6
+ for x in json.load(sys.stdin):
7
+ try:
8
+ r = ns["cell_executor"](x)
9
+ json.dumps(r)
10
+ out.append({"ok": isinstance(r, dict), "out": r} if isinstance(r, dict) else {"ok": False, "err": "result is not an object"})
11
+ except Exception as e:
12
+ out.append({"ok": False, "err": "%s: %s" % (type(e).__name__, str(e)[:200])})
13
+ sys.stdout.write(json.dumps(out, ensure_ascii=False))
@@ -0,0 +1,11 @@
1
+ from decimal import Decimal
2
+
3
+ def cell_executor(input_data: dict) -> dict:
4
+ years = input_data.get('years')
5
+ if not isinstance(years, int) or years < 0:
6
+ raise ValueError("Years must be a non-negative integer.")
7
+
8
+ # 연차 일수 계산 로직 수정
9
+ leave_days = min(25, 15 + (years - 1) // 2) if years > 0 else 0
10
+
11
+ return {"leave_days": leave_days}
@@ -0,0 +1,27 @@
1
+ {
2
+ "description": "근속 연수로 연차 일수(1년 이상 15일, 이후 2년마다 1일, 최대 25일).",
3
+ "when_to_use": "직원 연차 휴가 일수를 정할 때.",
4
+ "keywords": [
5
+ "연차",
6
+ "연차 일수",
7
+ "근속",
8
+ "휴가 일수",
9
+ "annual leave",
10
+ "paid leave days",
11
+ "vacation days",
12
+ "years of service"
13
+ ],
14
+ "input_schema": {
15
+ "required": [
16
+ "years"
17
+ ],
18
+ "properties": {
19
+ "years": "int >= 0"
20
+ }
21
+ },
22
+ "output_keys": [
23
+ "leave_days"
24
+ ],
25
+ "description_en": "Annual paid leave days from years of service (Korean labor law: 15 days after 1 year, +1 every 2 years, max 25).",
26
+ "when_to_use_en": "When deciding an employee's annual leave days."
27
+ }
@@ -0,0 +1 @@
1
+ [{"input": {"years": 14}, "expected": {"leave_days": 21}}, {"input": {"years": 6}, "expected": {"leave_days": 17}}, {"input": {"years": 3}, "expected": {"leave_days": 16}}, {"input": {"years": 1}, "expected": {"leave_days": 15}}, {"input": {"years": 17}, "expected": {"leave_days": 23}}, {"input": {"years": 10}, "expected": {"leave_days": 19}}, {"input": {"years": 9}, "expected": {"leave_days": 19}}, {"input": {"years": 15}, "expected": {"leave_days": 22}}, {"input": {"years": 25}, "expected": {"leave_days": 25}}, {"input": {"years": 24}, "expected": {"leave_days": 25}}, {"input": {"years": 10}, "expected": {"leave_days": 19}}, {"input": {"years": 21}, "expected": {"leave_days": 25}}, {"input": {"years": 17}, "expected": {"leave_days": 23}}, {"input": {"years": 3}, "expected": {"leave_days": 16}}, {"input": {"years": 23}, "expected": {"leave_days": 25}}, {"input": {"years": 18}, "expected": {"leave_days": 23}}, {"input": {"years": 28}, "expected": {"leave_days": 25}}, {"input": {"years": 19}, "expected": {"leave_days": 24}}, {"input": {"years": 1}, "expected": {"leave_days": 15}}, {"input": {"years": 29}, "expected": {"leave_days": 25}}, {"input": {"years": 7}, "expected": {"leave_days": 18}}, {"input": {"years": 18}, "expected": {"leave_days": 23}}, {"input": {"years": 15}, "expected": {"leave_days": 22}}, {"input": {"years": 27}, "expected": {"leave_days": 25}}]
@@ -0,0 +1,10 @@
1
+ {
2
+ "cell": "annual_leave_days",
3
+ "version": "1.0",
4
+ "sha256": "2cf7029ba701c8fb927fd724b57a547e897fca9adb06e66979a5faa5d95d0f46",
5
+ "gt_total": 24,
6
+ "gt_passed": 24,
7
+ "deterministic": true,
8
+ "locked_at": "2026-11-18T06:59:09+00:00",
9
+ "locked_by": "exp11-demand (boss 2026-11-18)"
10
+ }
@@ -0,0 +1,14 @@
1
+ from math import floor
2
+
3
+ def cell_executor(input_data: dict) -> dict:
4
+ if 'amount' not in input_data or 'rate' not in input_data:
5
+ raise ValueError("Input must contain 'amount' and 'rate' keys.")
6
+
7
+ amount = input_data['amount']
8
+ rate = input_data['rate']
9
+
10
+ if amount < 0 or rate <= 0:
11
+ raise ValueError("Amount must be non-negative and rate must be greater than zero.")
12
+
13
+ krw = floor(amount * rate)
14
+ return {"krw": krw}
@@ -0,0 +1,30 @@
1
+ {
2
+ "description": "외화 금액을 환율(1단위당 원)로 원화 환산, 원 미만 버림.",
3
+ "when_to_use": "달러·엔·유로 등 외화를 원화로 바꿀 때.",
4
+ "keywords": [
5
+ "환율",
6
+ "환전",
7
+ "원화 환산",
8
+ "달러",
9
+ "외화",
10
+ "exchange rate",
11
+ "currency conversion",
12
+ "convert to won",
13
+ "usd to krw"
14
+ ],
15
+ "input_schema": {
16
+ "required": [
17
+ "amount",
18
+ "rate"
19
+ ],
20
+ "properties": {
21
+ "amount": "number >= 0",
22
+ "rate": "number > 0 (won per unit)"
23
+ }
24
+ },
25
+ "output_keys": [
26
+ "krw"
27
+ ],
28
+ "description_en": "Convert a foreign currency amount to Korean won at a given rate (won per unit), truncating below 1 won.",
29
+ "when_to_use_en": "When converting dollars, yen, euros or other currencies to won."
30
+ }
@@ -0,0 +1 @@
1
+ [{"input": {"amount": 1200.0, "rate": 1544.2}, "expected": {"krw": 1853040}}, {"input": {"amount": 3474.3, "rate": 1247.8}, "expected": {"krw": 4335231}}, {"input": {"amount": 1630.0, "rate": 98.9}, "expected": {"krw": 161207}}, {"input": {"amount": 1157.96, "rate": 1357.37}, "expected": {"krw": 1571780}}, {"input": {"amount": 2276.2, "rate": 1424.4}, "expected": {"krw": 3242219}}, {"input": {"amount": 3479.19, "rate": 208.9}, "expected": {"krw": 726802}}, {"input": {"amount": 353.0, "rate": 96.3}, "expected": {"krw": 33993}}, {"input": {"amount": 3701.0, "rate": 910.49}, "expected": {"krw": 3369723}}, {"input": {"amount": 2572.18, "rate": 889.52}, "expected": {"krw": 2288005}}, {"input": {"amount": 2879.7, "rate": 1223.85}, "expected": {"krw": 3524320}}, {"input": {"amount": 3984.9, "rate": 1039.7}, "expected": {"krw": 4143100}}, {"input": {"amount": 652.0, "rate": 1543.57}, "expected": {"krw": 1006407}}, {"input": {"amount": 2524.3, "rate": 1404.6}, "expected": {"krw": 3545631}}, {"input": {"amount": 1593.4, "rate": 378.4}, "expected": {"krw": 602942}}, {"input": {"amount": 584.61, "rate": 780.63}, "expected": {"krw": 456364}}, {"input": {"amount": 3074.63, "rate": 1212.9}, "expected": {"krw": 3729218}}, {"input": {"amount": 2014.0, "rate": 645.6}, "expected": {"krw": 1300238}}, {"input": {"amount": 3030.0, "rate": 200.6}, "expected": {"krw": 607818}}, {"input": {"amount": 3533.1, "rate": 475.46}, "expected": {"krw": 1679847}}, {"input": {"amount": 2487.0, "rate": 1216.12}, "expected": {"krw": 3024490}}, {"input": {"amount": 414.3, "rate": 1176.44}, "expected": {"krw": 487399}}, {"input": {"amount": 748.35, "rate": 862.8}, "expected": {"krw": 645676}}, {"input": {"amount": 4843.0, "rate": 882.3}, "expected": {"krw": 4272978}}, {"input": {"amount": 4853.0, "rate": 58.59}, "expected": {"krw": 284337}}]
@@ -0,0 +1,10 @@
1
+ {
2
+ "cell": "currency_convert",
3
+ "version": "1.0",
4
+ "sha256": "8b9085b6ea582216759bbad400fa4d45b88210a36785dd365dc279580b440bd5",
5
+ "gt_total": 24,
6
+ "gt_passed": 24,
7
+ "deterministic": true,
8
+ "locked_at": "2026-11-18T06:59:08+00:00",
9
+ "locked_by": "exp11-demand (boss 2026-11-18)"
10
+ }
@@ -0,0 +1,5 @@
1
+ def cell_executor(input_data):
2
+ k = input_data.get("kcal_per_100g"); g = input_data.get("grams")
3
+ if not isinstance(k, (int, float)) or not isinstance(g, (int, float)) or k < 0 or g < 0:
4
+ raise ValueError("kcal_per_100g and grams must be numbers >= 0")
5
+ return {"kcal": round(k * g / 100, 1)}
@@ -0,0 +1,28 @@
1
+ {
2
+ "description": "100g당 열량과 먹은 양(g)으로 섭취 열량(kcal).",
3
+ "when_to_use": "음식 칼로리, 먹은 양의 열량을 계산할 때.",
4
+ "keywords": [
5
+ "열량",
6
+ "칼로리",
7
+ "kcal",
8
+ "100g당",
9
+ "calories",
10
+ "per 100g",
11
+ "portion calories"
12
+ ],
13
+ "input_schema": {
14
+ "required": [
15
+ "kcal_per_100g",
16
+ "grams"
17
+ ],
18
+ "properties": {
19
+ "kcal_per_100g": "number >= 0",
20
+ "grams": "number >= 0"
21
+ }
22
+ },
23
+ "output_keys": [
24
+ "kcal"
25
+ ],
26
+ "description_en": "Calories eaten (kcal) from kcal per 100 g and grams eaten.",
27
+ "when_to_use_en": "When computing the calories of a portion of food."
28
+ }
@@ -0,0 +1 @@
1
+ [{"input": {"kcal_per_100g": 130, "grams": 29}, "expected": {"kcal": 37.7}}, {"input": {"kcal_per_100g": 898, "grams": 25}, "expected": {"kcal": 224.5}}, {"input": {"kcal_per_100g": 639, "grams": 533}, "expected": {"kcal": 3405.9}}, {"input": {"kcal_per_100g": 541, "grams": 101}, "expected": {"kcal": 546.4}}, {"input": {"kcal_per_100g": 125, "grams": 214}, "expected": {"kcal": 267.5}}, {"input": {"kcal_per_100g": 288, "grams": 91.1}, "expected": {"kcal": 262.4}}, {"input": {"kcal_per_100g": 186, "grams": 677.0}, "expected": {"kcal": 1259.2}}, {"input": {"kcal_per_100g": 453, "grams": 690.4}, "expected": {"kcal": 3127.5}}, {"input": {"kcal_per_100g": 755, "grams": 30}, "expected": {"kcal": 226.5}}, {"input": {"kcal_per_100g": 645, "grams": 115.2}, "expected": {"kcal": 743.0}}, {"input": {"kcal_per_100g": 97, "grams": 798.6}, "expected": {"kcal": 774.6}}, {"input": {"kcal_per_100g": 232, "grams": 644}, "expected": {"kcal": 1494.1}}, {"input": {"kcal_per_100g": 357, "grams": 347.6}, "expected": {"kcal": 1240.9}}, {"input": {"kcal_per_100g": 484, "grams": 597.6}, "expected": {"kcal": 2892.4}}, {"input": {"kcal_per_100g": 253, "grams": 774}, "expected": {"kcal": 1958.2}}, {"input": {"kcal_per_100g": 407, "grams": 12}, "expected": {"kcal": 48.8}}, {"input": {"kcal_per_100g": 140, "grams": 461.5}, "expected": {"kcal": 646.1}}, {"input": {"kcal_per_100g": 857, "grams": 318.8}, "expected": {"kcal": 2732.1}}, {"input": {"kcal_per_100g": 48, "grams": 457.4}, "expected": {"kcal": 219.6}}, {"input": {"kcal_per_100g": 109, "grams": 675}, "expected": {"kcal": 735.8}}, {"input": {"kcal_per_100g": 364, "grams": 565.6}, "expected": {"kcal": 2058.8}}, {"input": {"kcal_per_100g": 840, "grams": 440.4}, "expected": {"kcal": 3699.4}}, {"input": {"kcal_per_100g": 436, "grams": 538.4}, "expected": {"kcal": 2347.4}}, {"input": {"kcal_per_100g": 139, "grams": 509}, "expected": {"kcal": 707.5}}]
@@ -0,0 +1,10 @@
1
+ {
2
+ "cell": "food_calories",
3
+ "version": "1.0",
4
+ "sha256": "f6303f34c4f034a531fa71aa2f75076158e0b0d095c8abbb1586d9bce961c805",
5
+ "gt_total": 24,
6
+ "gt_passed": 24,
7
+ "deterministic": true,
8
+ "locked_at": "2026-11-18T06:59:09+00:00",
9
+ "locked_by": "exp11-demand (boss 2026-11-18)"
10
+ }
@@ -0,0 +1,11 @@
1
+ def cell_executor(input_data):
2
+ rates = input_data.get("rates")
3
+ if not isinstance(rates, list) or not rates:
4
+ raise ValueError("rates must be a non-empty list")
5
+ prod = 1.0
6
+ for r in rates:
7
+ f = 1 + float(r)
8
+ if f <= 0:
9
+ raise ValueError("1 + rate must be > 0")
10
+ prod *= f
11
+ return {"geo_mean_pct": round((prod ** (1 / len(rates)) - 1) * 100, 2)}
@@ -0,0 +1,27 @@
1
+ {
2
+ "description": "성장률 목록(소수)의 기하평균 성장률(%).",
3
+ "when_to_use": "여러 기간 성장률을 하나의 평균 성장률로 합칠 때(기하평균).",
4
+ "keywords": [
5
+ "기하평균",
6
+ "평균 성장률",
7
+ "geometric mean",
8
+ "분기 성장률",
9
+ "average growth rate",
10
+ "compound growth",
11
+ "cagr",
12
+ "growth rate"
13
+ ],
14
+ "input_schema": {
15
+ "required": [
16
+ "rates"
17
+ ],
18
+ "properties": {
19
+ "rates": "list of number (0.05 = 5%)"
20
+ }
21
+ },
22
+ "output_keys": [
23
+ "geo_mean_pct"
24
+ ],
25
+ "description_en": "Geometric mean growth rate (%) of a list of period growth rates (decimals).",
26
+ "when_to_use_en": "When combining several periods' growth rates into one average growth rate."
27
+ }
@@ -0,0 +1 @@
1
+ [{"input": {"rates": [-0.011, -0.111, 0.067, 0.124, 0.05]}, "expected": {"geo_mean_pct": 2.06}}, {"input": {"rates": [-0.118, 0.247, -0.012, 0.138]}, "expected": {"geo_mean_pct": 5.45}}, {"input": {"rates": [0.211, -0.168, 0.075]}, "expected": {"geo_mean_pct": 2.7}}, {"input": {"rates": [-0.186, 0.273]}, "expected": {"geo_mean_pct": 1.79}}, {"input": {"rates": [-0.103]}, "expected": {"geo_mean_pct": -10.3}}, {"input": {"rates": [0.164, -0.051, 0.186, -0.042, -0.039]}, "expected": {"geo_mean_pct": 3.82}}, {"input": {"rates": [-0.005, 0.124, -0.088, 0.035, -0.087]}, "expected": {"geo_mean_pct": -0.73}}, {"input": {"rates": [-0.084, -0.042, 0.229]}, "expected": {"geo_mean_pct": 2.55}}, {"input": {"rates": [0.217, 0.102, 0.151]}, "expected": {"geo_mean_pct": 15.57}}, {"input": {"rates": [-0.058, 0.241, 0.185, 0.293, -0.107, 0.193, -0.092]}, "expected": {"geo_mean_pct": 8.17}}, {"input": {"rates": [0.061, -0.119, -0.041, -0.021, 0.24, 0.238]}, "expected": {"geo_mean_pct": 5.09}}, {"input": {"rates": [0.128, 0.108, -0.026]}, "expected": {"geo_mean_pct": 6.77}}, {"input": {"rates": [-0.068, 0.255, -0.001, 0.069]}, "expected": {"geo_mean_pct": 5.72}}, {"input": {"rates": [-0.17, 0.256, 0.167, 0.264]}, "expected": {"geo_mean_pct": 11.36}}, {"input": {"rates": [0.116, 0.026, 0.044, 0.25, 0.124]}, "expected": {"geo_mean_pct": 10.93}}, {"input": {"rates": [-0.098, 0.151]}, "expected": {"geo_mean_pct": 1.89}}, {"input": {"rates": [-0.084, -0.063, -0.178, 0.287]}, "expected": {"geo_mean_pct": -2.38}}, {"input": {"rates": [0.134, -0.046]}, "expected": {"geo_mean_pct": 4.01}}, {"input": {"rates": [0.012, 0.193, 0.06, 0.142, 0.27]}, "expected": {"geo_mean_pct": 13.17}}, {"input": {"rates": [0.107, 0.123, -0.109, 0.206, -0.143, -0.008, 0.247]}, "expected": {"geo_mean_pct": 5.1}}, {"input": {"rates": [-0.149, 0.157, -0.156]}, "expected": {"geo_mean_pct": -5.98}}, {"input": {"rates": [-0.082, 0.178, 0.027, -0.135, 0.107, 0.1]}, "expected": {"geo_mean_pct": 2.65}}, {"input": {"rates": [0.197, 0.158, 0.189, -0.006]}, "expected": {"geo_mean_pct": 13.13}}, {"input": {"rates": [0.162, -0.126, 0.09, -0.001, 0.275, -0.179]}, "expected": {"geo_mean_pct": 2.47}}]
@@ -0,0 +1,10 @@
1
+ {
2
+ "cell": "geometric_mean_growth",
3
+ "version": "1.0",
4
+ "sha256": "6cab69e643547e7606ace91786dc1c1dc832e8b99565ccabc2fe03c121c1105a",
5
+ "gt_total": 24,
6
+ "gt_passed": 24,
7
+ "deterministic": true,
8
+ "locked_at": "2026-11-18T06:59:07+00:00",
9
+ "locked_by": "exp11-demand (boss 2026-11-18)"
10
+ }
@@ -0,0 +1,17 @@
1
+ from decimal import Decimal
2
+
3
+ def cell_executor(input_data: dict) -> dict:
4
+ if 'hourly_wage' not in input_data or input_data['hourly_wage'] <= 0:
5
+ raise ValueError("hourly_wage must be greater than 0")
6
+
7
+ hourly_wage = Decimal(input_data['hourly_wage'])
8
+ hours = input_data.get('hours', Decimal(209))
9
+
10
+ if not isinstance(hours, Decimal) and not isinstance(hours, int):
11
+ raise ValueError("hours must be an integer or Decimal")
12
+
13
+ if not isinstance(hours, Decimal):
14
+ hours = Decimal(hours)
15
+
16
+ monthly_wage = hourly_wage * hours
17
+ return {"monthly_wage": int(monthly_wage.quantize(Decimal('0.01')))}
@@ -0,0 +1,35 @@
1
+ {
2
+ "description": "시급을 월 209시간(주휴 포함) 기준 월급(원)으로 환산.",
3
+ "when_to_use": "시급을 월급으로, 최저임금 월 환산액을 볼 때.",
4
+ "keywords": [
5
+ "월급 환산",
6
+ "209시간",
7
+ "시급 월급",
8
+ "최저임금 월급",
9
+ "monthly wage",
10
+ "hourly to monthly",
11
+ "minimum wage monthly",
12
+ "salary"
13
+ ],
14
+ "input_schema": {
15
+ "required": [
16
+ "hourly_wage"
17
+ ],
18
+ "properties": {
19
+ "hourly_wage": "number > 0 (won)",
20
+ "hours": "optional: paid hours per MONTH (default 209 = 40 h/week incl. paid weekly rest). Leave it out for a standard full-time job; it is not hours per week."
21
+ }
22
+ },
23
+ "output_keys": [
24
+ "monthly_wage"
25
+ ],
26
+ "description_en": "Monthly wage (won) from an hourly wage at 209 hours a month (Korean standard, paid weekly rest included).",
27
+ "when_to_use_en": "When converting an hourly wage, or the minimum wage, to a monthly wage.",
28
+ "input_sanity": {
29
+ "hours": {
30
+ "min": 100,
31
+ "action": "drop",
32
+ "why": "hours is paid hours per month; a value under 100 is almost always hours per week, so the standard 209 is used"
33
+ }
34
+ }
35
+ }
@@ -0,0 +1 @@
1
+ [{"input": {"hourly_wage": 15027}, "expected": {"monthly_wage": 3140643}}, {"input": {"hourly_wage": 10320}, "expected": {"monthly_wage": 2156880}}, {"input": {"hourly_wage": 11000, "hours": 209}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 11000}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 9860}, "expected": {"monthly_wage": 2060740}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 10320}, "expected": {"monthly_wage": 2156880}}, {"input": {"hourly_wage": 11000, "hours": 209}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 10030, "hours": 209}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 11000, "hours": 209}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 11000}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 10320, "hours": 209}, "expected": {"monthly_wage": 2156880}}, {"input": {"hourly_wage": 9860}, "expected": {"monthly_wage": 2060740}}, {"input": {"hourly_wage": 12500, "hours": 174}, "expected": {"monthly_wage": 2175000}}, {"input": {"hourly_wage": 12500, "hours": 209}, "expected": {"monthly_wage": 2612500}}, {"input": {"hourly_wage": 18166}, "expected": {"monthly_wage": 3796694}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 12500}, "expected": {"monthly_wage": 2612500}}, {"input": {"hourly_wage": 17329}, "expected": {"monthly_wage": 3621761}}, {"input": {"hourly_wage": 11000, "hours": 226}, "expected": {"monthly_wage": 2486000}}, {"input": {"hourly_wage": 11000, "hours": 174}, "expected": {"monthly_wage": 1914000}}, {"input": {"hourly_wage": 10030, "hours": 226}, "expected": {"monthly_wage": 2266780}}]
@@ -0,0 +1,10 @@
1
+ {
2
+ "cell": "monthly_wage_from_hourly",
3
+ "version": "1.0",
4
+ "sha256": "a9f14c93b48a6f243b9730fdaa1d2efde7d51f82537dd3ea5459aaac97c89ac3",
5
+ "gt_total": 24,
6
+ "gt_passed": 24,
7
+ "deterministic": true,
8
+ "locked_at": "2026-11-18T06:59:08+00:00",
9
+ "locked_by": "exp11-demand (boss 2026-11-18)"
10
+ }
@@ -0,0 +1,5 @@
1
+ def cell_executor(input_data):
2
+ b = input_data.get("before_pct"); a = input_data.get("after_pct")
3
+ if not isinstance(b, (int, float)) or not isinstance(a, (int, float)):
4
+ raise ValueError("before_pct and after_pct must be numbers")
5
+ return {"pp_diff": round(a - b, 2)}
@@ -0,0 +1,29 @@
1
+ {
2
+ "description": "두 비율(%)의 차이를 퍼센트포인트(%p)로.",
3
+ "when_to_use": "재방문율·전환율처럼 비율끼리의 차이를 %p 로 볼 때(증가율 % 가 아니라).",
4
+ "keywords": [
5
+ "퍼센트포인트",
6
+ "%p",
7
+ "비율 차이",
8
+ "포인트 차이",
9
+ "percentage point",
10
+ "pp difference",
11
+ "rate difference",
12
+ "points"
13
+ ],
14
+ "input_schema": {
15
+ "required": [
16
+ "before_pct",
17
+ "after_pct"
18
+ ],
19
+ "properties": {
20
+ "before_pct": "number (%)",
21
+ "after_pct": "number (%)"
22
+ }
23
+ },
24
+ "output_keys": [
25
+ "pp_diff"
26
+ ],
27
+ "description_en": "Difference between two rates (%) in percentage points.",
28
+ "when_to_use_en": "When comparing two rates such as conversion or return rates, in points rather than percent growth."
29
+ }
@@ -0,0 +1 @@
1
+ [{"input": {"before_pct": 7.8, "after_pct": 9.7}, "expected": {"pp_diff": 1.9}}, {"input": {"before_pct": 49.9, "after_pct": 56.6}, "expected": {"pp_diff": 6.7}}, {"input": {"before_pct": 30.0, "after_pct": 21.0}, "expected": {"pp_diff": -9.0}}, {"input": {"before_pct": 88.3, "after_pct": 41.4}, "expected": {"pp_diff": -46.9}}, {"input": {"before_pct": 7.2, "after_pct": 50.1}, "expected": {"pp_diff": 42.9}}, {"input": {"before_pct": 24.9, "after_pct": 79.1}, "expected": {"pp_diff": 54.2}}, {"input": {"before_pct": 57.0, "after_pct": 11.7}, "expected": {"pp_diff": -45.3}}, {"input": {"before_pct": 72.0, "after_pct": 35.6}, "expected": {"pp_diff": -36.4}}, {"input": {"before_pct": 28.6, "after_pct": 16.3}, "expected": {"pp_diff": -12.3}}, {"input": {"before_pct": 72.6, "after_pct": 12.2}, "expected": {"pp_diff": -60.4}}, {"input": {"before_pct": 68.8, "after_pct": 1.1}, "expected": {"pp_diff": -67.7}}, {"input": {"before_pct": 65.1, "after_pct": 86.5}, "expected": {"pp_diff": 21.4}}, {"input": {"before_pct": 15.5, "after_pct": 29.7}, "expected": {"pp_diff": 14.2}}, {"input": {"before_pct": 85.0, "after_pct": 69.3}, "expected": {"pp_diff": -15.7}}, {"input": {"before_pct": 9.0, "after_pct": 10.4}, "expected": {"pp_diff": 1.4}}, {"input": {"before_pct": 60.8, "after_pct": 4.8}, "expected": {"pp_diff": -56.0}}, {"input": {"before_pct": 85.1, "after_pct": 3.5}, "expected": {"pp_diff": -81.6}}, {"input": {"before_pct": 31.1, "after_pct": 7.7}, "expected": {"pp_diff": -23.4}}, {"input": {"before_pct": 67.2, "after_pct": 11.0}, "expected": {"pp_diff": -56.2}}, {"input": {"before_pct": 90.6, "after_pct": 3.9}, "expected": {"pp_diff": -86.7}}, {"input": {"before_pct": 31.9, "after_pct": 65.0}, "expected": {"pp_diff": 33.1}}, {"input": {"before_pct": 51.5, "after_pct": 11.0}, "expected": {"pp_diff": -40.5}}, {"input": {"before_pct": 28.1, "after_pct": 46.3}, "expected": {"pp_diff": 18.2}}, {"input": {"before_pct": 10.4, "after_pct": 81.6}, "expected": {"pp_diff": 71.2}}]