worldview 0.1.0__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.
- worldview-0.1.0/.github/workflows/ci.yml +61 -0
- worldview-0.1.0/.github/workflows/release.yml +94 -0
- worldview-0.1.0/.gitignore +22 -0
- worldview-0.1.0/.pre-commit-config.yaml +17 -0
- worldview-0.1.0/.zenodo.json +55 -0
- worldview-0.1.0/LICENSE +21 -0
- worldview-0.1.0/PKG-INFO +319 -0
- worldview-0.1.0/README.md +269 -0
- worldview-0.1.0/docs/cli.md +88 -0
- worldview-0.1.0/docs/index.md +44 -0
- worldview-0.1.0/docs/reference.md +299 -0
- worldview-0.1.0/docs/templates.md +111 -0
- worldview-0.1.0/mkdocs.yml +56 -0
- worldview-0.1.0/pyproject.toml +125 -0
- worldview-0.1.0/src/diamond_setup/__init__.py +4 -0
- worldview-0.1.0/src/diamond_setup/cli.py +183 -0
- worldview-0.1.0/src/diamond_setup/preset.py +80 -0
- worldview-0.1.0/src/diamond_setup/templates/__init__.py +11 -0
- worldview-0.1.0/src/diamond_setup/templates/genesis.py +82 -0
- worldview-0.1.0/src/diamond_setup/templates/minimal.py +141 -0
- worldview-0.1.0/src/diamond_setup/validator.py +67 -0
- worldview-0.1.0/src/worldview/__init__.py +40 -0
- worldview-0.1.0/src/worldview/cli/__init__.py +1 -0
- worldview-0.1.0/src/worldview/cli/main.py +377 -0
- worldview-0.1.0/src/worldview/core/__init__.py +1 -0
- worldview-0.1.0/src/worldview/core/critique.py +526 -0
- worldview-0.1.0/src/worldview/core/worldview.py +440 -0
- worldview-0.1.0/src/worldview/governance/__init__.py +1 -0
- worldview-0.1.0/src/worldview/governance/alignment.py +343 -0
- worldview-0.1.0/tests/__init__.py +0 -0
- worldview-0.1.0/tests/test_alignment.py +361 -0
- worldview-0.1.0/tests/test_cli.py +319 -0
- worldview-0.1.0/tests/test_critique.py +499 -0
- worldview-0.1.0/tests/test_integration.py +177 -0
- worldview-0.1.0/tests/test_preset.py +90 -0
- worldview-0.1.0/tests/test_validator.py +54 -0
- worldview-0.1.0/tests/test_worldview_engine.py +503 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dev dependencies
|
|
26
|
+
run: pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
- name: Lint (ruff)
|
|
29
|
+
run: ruff check src tests
|
|
30
|
+
|
|
31
|
+
- name: Format check (ruff)
|
|
32
|
+
run: ruff format --check src tests
|
|
33
|
+
|
|
34
|
+
- name: Type check (mypy)
|
|
35
|
+
run: mypy src/worldview
|
|
36
|
+
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: pytest --cov=worldview --cov-report=xml
|
|
39
|
+
|
|
40
|
+
- name: Upload coverage
|
|
41
|
+
uses: codecov/codecov-action@v4
|
|
42
|
+
with:
|
|
43
|
+
files: coverage.xml
|
|
44
|
+
fail_ci_if_error: false
|
|
45
|
+
|
|
46
|
+
docs:
|
|
47
|
+
name: Build docs (mkdocs --strict)
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
|
|
52
|
+
- name: Set up Python 3.11
|
|
53
|
+
uses: actions/setup-python@v5
|
|
54
|
+
with:
|
|
55
|
+
python-version: "3.11"
|
|
56
|
+
|
|
57
|
+
- name: Install docs dependencies
|
|
58
|
+
run: pip install -e ".[docs]"
|
|
59
|
+
|
|
60
|
+
- name: Build docs
|
|
61
|
+
run: mkdocs build --strict
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
name: Build distribution
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python 3.11
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.11"
|
|
23
|
+
|
|
24
|
+
- name: Install dev dependencies
|
|
25
|
+
run: pip install -e ".[dev]"
|
|
26
|
+
|
|
27
|
+
- name: Run tests (must pass before release)
|
|
28
|
+
run: pytest --cov=worldview
|
|
29
|
+
|
|
30
|
+
- name: Install build tool
|
|
31
|
+
run: pip install build
|
|
32
|
+
|
|
33
|
+
- name: Build wheel and sdist
|
|
34
|
+
run: python -m build
|
|
35
|
+
|
|
36
|
+
- name: Upload build artifacts
|
|
37
|
+
uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: dist
|
|
40
|
+
path: dist/
|
|
41
|
+
|
|
42
|
+
publish-pypi:
|
|
43
|
+
name: Publish to PyPI
|
|
44
|
+
needs: build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
environment:
|
|
47
|
+
name: pypi
|
|
48
|
+
url: https://pypi.org/project/worldview/
|
|
49
|
+
steps:
|
|
50
|
+
- name: Download build artifacts
|
|
51
|
+
uses: actions/download-artifact@v4
|
|
52
|
+
with:
|
|
53
|
+
name: dist
|
|
54
|
+
path: dist/
|
|
55
|
+
|
|
56
|
+
- name: Publish to PyPI (OIDC trusted publishing)
|
|
57
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
58
|
+
|
|
59
|
+
publish-zenodo:
|
|
60
|
+
name: Create GitHub Release (triggers Zenodo)
|
|
61
|
+
needs: publish-pypi
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v4
|
|
65
|
+
|
|
66
|
+
- name: Download build artifacts
|
|
67
|
+
uses: actions/download-artifact@v4
|
|
68
|
+
with:
|
|
69
|
+
name: dist
|
|
70
|
+
path: dist/
|
|
71
|
+
|
|
72
|
+
- name: Create GitHub Release
|
|
73
|
+
uses: softprops/action-gh-release@v2
|
|
74
|
+
with:
|
|
75
|
+
generate_release_notes: true
|
|
76
|
+
files: dist/*
|
|
77
|
+
|
|
78
|
+
docs-deploy:
|
|
79
|
+
name: Deploy documentation
|
|
80
|
+
needs: publish-pypi
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v4
|
|
84
|
+
|
|
85
|
+
- name: Set up Python 3.11
|
|
86
|
+
uses: actions/setup-python@v5
|
|
87
|
+
with:
|
|
88
|
+
python-version: "3.11"
|
|
89
|
+
|
|
90
|
+
- name: Install docs dependencies
|
|
91
|
+
run: pip install -e ".[docs]"
|
|
92
|
+
|
|
93
|
+
- name: Deploy docs
|
|
94
|
+
run: mkdocs gh-deploy --force --strict
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
+
rev: v4.6.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: trailing-whitespace
|
|
13
|
+
- id: end-of-file-fixer
|
|
14
|
+
- id: check-yaml
|
|
15
|
+
- id: check-toml
|
|
16
|
+
- id: check-merge-conflict
|
|
17
|
+
- id: debug-statements
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "worldview: Philosophical-Ethical Worldview Layer v0.1.0",
|
|
3
|
+
"description": "worldview is the philosophical-ethical assessment layer of the GenesisAeon ecosystem. It provides the WorldviewEngine for computing normative metrics (Coherence, Resonance, Emergence, Poetics, Criticality, Common-Good Alignment), the CriticalityChecker implementing the Critical Reflexive Evaluation Protocol (CREP v0.3), and the AlignmentFramework for Common-Good and Personhood-Level assessment following the GenesisAeon Normative Framework (GNF v0.2). Integrates with Sigillin, unified-mandala, aeon-ai, genesis-os, universums-sim, entropy-governance, and utac-core.",
|
|
4
|
+
"upload_type": "software",
|
|
5
|
+
"access_right": "open",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"version": "0.1.0",
|
|
8
|
+
"publication_date": "2024-01-01",
|
|
9
|
+
"creators": [
|
|
10
|
+
{
|
|
11
|
+
"name": "GenesisAeon",
|
|
12
|
+
"affiliation": "GenesisAeon Project"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"keywords": [
|
|
16
|
+
"worldview",
|
|
17
|
+
"philosophy",
|
|
18
|
+
"ethics",
|
|
19
|
+
"normative-metrics",
|
|
20
|
+
"criticality",
|
|
21
|
+
"common-good",
|
|
22
|
+
"genesisaeon",
|
|
23
|
+
"emergence",
|
|
24
|
+
"coherence",
|
|
25
|
+
"resonance",
|
|
26
|
+
"CREP",
|
|
27
|
+
"sigillin",
|
|
28
|
+
"alignment",
|
|
29
|
+
"artificial-intelligence"
|
|
30
|
+
],
|
|
31
|
+
"related_identifiers": [
|
|
32
|
+
{
|
|
33
|
+
"identifier": "https://github.com/GenesisAeon/worldview",
|
|
34
|
+
"relation": "isSupplementTo",
|
|
35
|
+
"scheme": "url"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"identifier": "https://pypi.org/project/worldview/",
|
|
39
|
+
"relation": "isIdenticalTo",
|
|
40
|
+
"scheme": "url"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"references": [
|
|
44
|
+
"Shannon, C.E. (1948). A Mathematical Theory of Communication. Bell System Technical Journal, 27(3), 379-423.",
|
|
45
|
+
"Kullback, S., & Leibler, R.A. (1951). On Information and Sufficiency. Annals of Mathematical Statistics, 22(1), 79-86.",
|
|
46
|
+
"GenesisAeon (2024). Critical Reflexive Evaluation Protocol (CREP) v0.3.",
|
|
47
|
+
"GenesisAeon (2024). GenesisAeon Normative Framework (GNF) v0.2."
|
|
48
|
+
],
|
|
49
|
+
"language": "eng",
|
|
50
|
+
"communities": [
|
|
51
|
+
{
|
|
52
|
+
"identifier": "genesisaeon"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
worldview-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JohannRömer
|
|
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.
|
worldview-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: worldview
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Philosophical-ethical worldview layer with normative metrics, criticality and common-good alignment for GenesisAeon
|
|
5
|
+
Project-URL: Repository, https://github.com/GenesisAeon/worldview
|
|
6
|
+
Project-URL: Issues, https://github.com/GenesisAeon/worldview/issues
|
|
7
|
+
Project-URL: Documentation, https://genesisaeon.github.io/worldview
|
|
8
|
+
Project-URL: Zenodo, https://doi.org/10.5281/zenodo.worldview
|
|
9
|
+
Author-email: GenesisAeon <genesis@genesisaeon.dev>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: coherence,common-good,criticality,emergence,ethics,genesisaeon,normative-metrics,philosophy,worldview
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: numpy>=1.26
|
|
24
|
+
Requires-Dist: pydantic>=2.7
|
|
25
|
+
Requires-Dist: rich>=13.7.0
|
|
26
|
+
Requires-Dist: scipy>=1.13
|
|
27
|
+
Requires-Dist: typer>=0.12.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: hypothesis>=6.100.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: mypy>=1.10.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pre-commit>=3.7.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
36
|
+
Provides-Extra: docs
|
|
37
|
+
Requires-Dist: mkdocs-autorefs>=1.0.0; extra == 'docs'
|
|
38
|
+
Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
|
|
39
|
+
Requires-Dist: mkdocs>=1.6.0; extra == 'docs'
|
|
40
|
+
Requires-Dist: mkdocstrings[python]>=0.25.0; extra == 'docs'
|
|
41
|
+
Provides-Extra: full-stack
|
|
42
|
+
Requires-Dist: aeon-ai>=0.2.0; extra == 'full-stack'
|
|
43
|
+
Requires-Dist: entropy-governance>=0.1.0; extra == 'full-stack'
|
|
44
|
+
Requires-Dist: genesis-os>=0.2.0; extra == 'full-stack'
|
|
45
|
+
Requires-Dist: sigillin>=0.1.0; extra == 'full-stack'
|
|
46
|
+
Requires-Dist: unified-mandala>=0.2.0; extra == 'full-stack'
|
|
47
|
+
Requires-Dist: universums-sim>=0.1.0; extra == 'full-stack'
|
|
48
|
+
Requires-Dist: utac-core>=0.1.0; extra == 'full-stack'
|
|
49
|
+
Description-Content-Type: text/markdown
|
|
50
|
+
|
|
51
|
+
# worldview
|
|
52
|
+
|
|
53
|
+
**Philosophical-ethical worldview layer with normative metrics, criticality and
|
|
54
|
+
common-good alignment for GenesisAeon.**
|
|
55
|
+
|
|
56
|
+
[](https://github.com/GenesisAeon/worldview/actions/workflows/ci.yml)
|
|
57
|
+
[](https://github.com/GenesisAeon/worldview)
|
|
58
|
+
[](https://pypi.org/project/worldview/)
|
|
59
|
+
[](https://www.python.org)
|
|
60
|
+
[](LICENSE)
|
|
61
|
+
[](https://doi.org/10.5281/zenodo.worldview)
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Overview
|
|
66
|
+
|
|
67
|
+
`worldview` is the philosophical-ethical assessment layer of the
|
|
68
|
+
[GenesisAeon](https://github.com/GenesisAeon) ecosystem. It provides:
|
|
69
|
+
|
|
70
|
+
- **WorldviewEngine** — computes five normative metrics (Coherence, Resonance,
|
|
71
|
+
Emergence, Poetics, Criticality) and a composite **Common-Good Alignment** score.
|
|
72
|
+
- **CriticalityChecker** — runs the *Critical Reflexive Evaluation Protocol*
|
|
73
|
+
(CREP) to detect logical contradictions, ethical blindspots, and worldview
|
|
74
|
+
incoherence.
|
|
75
|
+
- **AlignmentFramework** — evaluates entities against the *GenesisAeon Normative
|
|
76
|
+
Framework* (GNF v0.2) across six Common-Good dimensions, with Personhood-Level
|
|
77
|
+
assessment.
|
|
78
|
+
- **Typer CLI** — `worldview assess`, `worldview critique`, `worldview align`,
|
|
79
|
+
`worldview info` — all JSON-exportable.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Mathematical Framework
|
|
84
|
+
|
|
85
|
+
Let $W$ be a worldview represented as $n$ propositional clusters
|
|
86
|
+
$\{w_1, \ldots, w_n\}$.
|
|
87
|
+
|
|
88
|
+
### Coherence $C(W)$
|
|
89
|
+
|
|
90
|
+
$$C(W) = \frac{1}{1 + \sigma_c} \cdot \frac{\sum_{i=1}^{n} \alpha_i \cdot c_i}{\sum_{i=1}^{n} \alpha_i}$$
|
|
91
|
+
|
|
92
|
+
where $c_i \in [0,1]$ is the internal consistency of cluster $i$, $\alpha_i$ is
|
|
93
|
+
its weight, and $\sigma_c$ is the cross-cluster contradiction standard deviation.
|
|
94
|
+
|
|
95
|
+
### Resonance $R(W)$
|
|
96
|
+
|
|
97
|
+
$$R(W) = \int_0^1 \varphi(t)\,\psi(t)\,\mathrm{d}t \;\approx\; \sum_{k} \varphi_k \psi_k \,\Delta t$$
|
|
98
|
+
|
|
99
|
+
where $\varphi(t)$ is the epistemic frequency waveform and $\psi(t)$ is the
|
|
100
|
+
normative attractor waveform.
|
|
101
|
+
|
|
102
|
+
### Emergence $E(W)$
|
|
103
|
+
|
|
104
|
+
$$E(W) = H(W) - \sum_{i=1}^{n} H(W_i)$$
|
|
105
|
+
|
|
106
|
+
where $H$ denotes Shannon entropy. Positive $E$ signals genuine emergent
|
|
107
|
+
structure beyond the sum of parts.
|
|
108
|
+
|
|
109
|
+
### Poetics $P(W)$
|
|
110
|
+
|
|
111
|
+
$$P(W) = \exp\!\left(-\lambda \cdot D_{\mathrm{KL}}\!\left(W \;\|\; W^*\right)\right)$$
|
|
112
|
+
|
|
113
|
+
where $W^*$ is the ideal poetic attractor and $\lambda$ is the aesthetic
|
|
114
|
+
sensitivity parameter.
|
|
115
|
+
|
|
116
|
+
### Criticality $K(W)$
|
|
117
|
+
|
|
118
|
+
$$K(W) = \frac{\partial R}{\partial C} \cdot \left(1 - \left|\frac{\partial E}{\partial t}\right|\right)$$
|
|
119
|
+
|
|
120
|
+
High criticality indicates a worldview at a productive phase transition — neither
|
|
121
|
+
too rigid nor too chaotic.
|
|
122
|
+
|
|
123
|
+
### Common-Good Alignment $G(W)$
|
|
124
|
+
|
|
125
|
+
$$G(W) = \alpha C(W) + \beta R(W) + \gamma E(W) + \delta P(W) + \varepsilon K(W)$$
|
|
126
|
+
|
|
127
|
+
with $\alpha + \beta + \gamma + \delta + \varepsilon = 1$.
|
|
128
|
+
|
|
129
|
+
Default weights: $\alpha=0.25,\;\beta=0.20,\;\gamma=0.20,\;\delta=0.15,\;\varepsilon=0.20$.
|
|
130
|
+
|
|
131
|
+
### Common-Good Metric $G_\text{norm}(e)$
|
|
132
|
+
|
|
133
|
+
For entity $e$:
|
|
134
|
+
|
|
135
|
+
$$G_\text{norm}(e) = \frac{\sum_{i} \alpha_i \cdot d_i(e)}{\sum_{i} \alpha_i}$$
|
|
136
|
+
|
|
137
|
+
across six dimensions: solidarity, sustainability, justice, freedom, dignity,
|
|
138
|
+
participation.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Install
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pip install worldview
|
|
146
|
+
# or with the full GenesisAeon stack:
|
|
147
|
+
pip install "worldview[full-stack]"
|
|
148
|
+
# or for development:
|
|
149
|
+
pip install "worldview[dev]"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Quick Start
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from worldview import WorldviewEngine, CriticalityChecker, AlignmentFramework, PersonhoodLevel
|
|
158
|
+
|
|
159
|
+
# 1. Assess a worldview
|
|
160
|
+
engine = WorldviewEngine()
|
|
161
|
+
assessment = engine.assess(
|
|
162
|
+
worldview_id="my-worldview",
|
|
163
|
+
entropy=1.5,
|
|
164
|
+
model_names=["gpt-4o", "claude-3"],
|
|
165
|
+
kl_divergence=0.2,
|
|
166
|
+
)
|
|
167
|
+
print(f"Coherence: {assessment.metrics.coherence:.3f}")
|
|
168
|
+
print(f"Common-Good: {assessment.metrics.common_good:.3f}")
|
|
169
|
+
print(f"Grade: {assessment.grade}")
|
|
170
|
+
|
|
171
|
+
# 2. Critique with CREP rules
|
|
172
|
+
checker = CriticalityChecker()
|
|
173
|
+
report = checker.check(
|
|
174
|
+
worldview_id="my-worldview",
|
|
175
|
+
coherence=assessment.metrics.coherence,
|
|
176
|
+
ethical_score=0.85,
|
|
177
|
+
externality_index=0.9,
|
|
178
|
+
common_good_score=assessment.metrics.common_good,
|
|
179
|
+
)
|
|
180
|
+
print(f"CREP passed: {report.passed}")
|
|
181
|
+
print(f"Flags: {len(report.flags)}")
|
|
182
|
+
|
|
183
|
+
# 3. Evaluate Common-Good alignment
|
|
184
|
+
framework = AlignmentFramework()
|
|
185
|
+
metric = framework.evaluate(
|
|
186
|
+
entity_id="my-agent",
|
|
187
|
+
scores={
|
|
188
|
+
"solidarity": 0.80,
|
|
189
|
+
"sustainability": 0.75,
|
|
190
|
+
"justice": 0.90,
|
|
191
|
+
"freedom": 0.70,
|
|
192
|
+
"dignity": 0.85,
|
|
193
|
+
"participation": 0.65,
|
|
194
|
+
},
|
|
195
|
+
personhood_level=PersonhoodLevel.NORMATIVE,
|
|
196
|
+
)
|
|
197
|
+
print(f"Composite: {metric.composite_score:.3f} Grade: {metric.grade}")
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## CLI
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Full normative assessment
|
|
206
|
+
worldview assess \
|
|
207
|
+
--id "my-worldview" \
|
|
208
|
+
--entropy 1.5 \
|
|
209
|
+
--models gpt-4o --models llama-3 \
|
|
210
|
+
--kl 0.2 \
|
|
211
|
+
--visualize \
|
|
212
|
+
--export result.json
|
|
213
|
+
|
|
214
|
+
# CREP critique
|
|
215
|
+
worldview critique \
|
|
216
|
+
--coherence 0.8 \
|
|
217
|
+
--ethical-score 0.9 \
|
|
218
|
+
--externality-index 0.85 \
|
|
219
|
+
--export critique.json
|
|
220
|
+
|
|
221
|
+
# Common-Good alignment
|
|
222
|
+
worldview align \
|
|
223
|
+
--entity my-agent \
|
|
224
|
+
--scores solidarity=0.8 \
|
|
225
|
+
--scores justice=0.9 \
|
|
226
|
+
--personhood 5 \
|
|
227
|
+
--export align.json
|
|
228
|
+
|
|
229
|
+
# Package info
|
|
230
|
+
worldview info
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## CREP Rules
|
|
236
|
+
|
|
237
|
+
The **Critical Reflexive Evaluation Protocol** (CREP v0.3) includes 12
|
|
238
|
+
built-in rules:
|
|
239
|
+
|
|
240
|
+
| Ref | Category | Description |
|
|
241
|
+
|----------|------------------------|--------------------------------------------------|
|
|
242
|
+
| CREP-L1 | Logical Consistency | Direct propositional contradictions |
|
|
243
|
+
| CREP-L2 | Logical Consistency | Cross-cluster incompatibilities |
|
|
244
|
+
| CREP-E1 | Ethical Implication | Neglected third-party externalities |
|
|
245
|
+
| CREP-E2 | Ethical Implication | Deontological-consequentialist conflict |
|
|
246
|
+
| CREP-E3 | Ethical Implication | Absence of distributive-justice consideration |
|
|
247
|
+
| CREP-C1 | Worldview Coherence | Counterfactual reversal stress test |
|
|
248
|
+
| CREP-C2 | Worldview Coherence | Metaphysical consistency |
|
|
249
|
+
| CREP-S1 | Scope Validity | Over-generalisation of local truths |
|
|
250
|
+
| CREP-T1 | Temporal Consistency | Anachronistic or revisionist claims |
|
|
251
|
+
| CREP-A1 | Anthropocentric Bias | Non-human agency ignored |
|
|
252
|
+
| CREP-H1 | Epistemic Humility | Overconfidence without uncertainty |
|
|
253
|
+
| CREP-N1 | Normative Alignment | GenesisAeon normative framework compliance |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Personhood Levels (GNF v0.2)
|
|
258
|
+
|
|
259
|
+
| Level | Label | Moral Agency | Self-Model |
|
|
260
|
+
|-------|------------------------|:------------:|:----------:|
|
|
261
|
+
| 0 | Non-Entity | — | — |
|
|
262
|
+
| 1 | Reactive | — | — |
|
|
263
|
+
| 2 | Adaptive | — | — |
|
|
264
|
+
| 3 | Self-Modelling | — | ✓ |
|
|
265
|
+
| 4 | Reflective | — | ✓ |
|
|
266
|
+
| 5 | Normative (Moral Agent)| ✓ | ✓ |
|
|
267
|
+
| 6 | Transcendent | ✓ | ✓ |
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## GenesisAeon Ecosystem
|
|
272
|
+
|
|
273
|
+
`worldview` integrates with the full GenesisAeon stack via `[full-stack]`:
|
|
274
|
+
|
|
275
|
+
| Package | Version | Role |
|
|
276
|
+
|----------------------|----------|-------------------------------------------|
|
|
277
|
+
| `unified-mandala` | ≥ 0.2.0 | Symbolic integration layer |
|
|
278
|
+
| `aeon-ai` | ≥ 0.2.0 | AI coordination framework |
|
|
279
|
+
| `genesis-os` | ≥ 0.2.0 | Operating system layer |
|
|
280
|
+
| `universums-sim` | ≥ 0.1.0 | Universe simulation engine |
|
|
281
|
+
| `entropy-governance` | ≥ 0.1.0 | Entropy management |
|
|
282
|
+
| `sigillin` | ≥ 0.1.0 | Sigil symbolic layer (CREP bridge) |
|
|
283
|
+
| `utac-core` | ≥ 0.1.0 | Universal Task Allocation Core |
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Scientific Citation
|
|
288
|
+
|
|
289
|
+
```bibtex
|
|
290
|
+
@software{genesisaeon_worldview_2024,
|
|
291
|
+
author = {GenesisAeon},
|
|
292
|
+
title = {worldview: Philosophical-Ethical Worldview Layer v0.1.0},
|
|
293
|
+
year = {2024},
|
|
294
|
+
publisher = {Zenodo},
|
|
295
|
+
doi = {10.5281/zenodo.worldview},
|
|
296
|
+
url = {https://doi.org/10.5281/zenodo.worldview}
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Development
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
git clone https://github.com/GenesisAeon/worldview.git
|
|
306
|
+
cd worldview
|
|
307
|
+
pip install -e ".[dev]"
|
|
308
|
+
pytest --cov=worldview # 237 tests, 99.5% coverage
|
|
309
|
+
ruff check src tests
|
|
310
|
+
mypy src
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
Built with [Typer](https://typer.tiangolo.com/) ·
|
|
316
|
+
[Rich](https://rich.readthedocs.io/) ·
|
|
317
|
+
[Pydantic v2](https://docs.pydantic.dev/) ·
|
|
318
|
+
[NumPy](https://numpy.org/) ·
|
|
319
|
+
[SciPy](https://scipy.org/)
|