A domain-agnostic instrument for measuring how node-removal impact changes as alternatives become available over an adaptation horizon in systems with AND/OR dependencies.
Project description
Criticality Spectrometer
Measure node criticality as a curve across adaptation horizons in AND/OR dependency systems.
Most network rankings assign one importance score per node. Criticality Spectrometer instead removes each node, sweeps the time at which substitutes become available, and records mission loss at every horizon. The result distinguishes a node that must be protected now and later from one whose risk can be reduced by enabling alternatives.
Run it in 60 seconds
git clone https://github.com/AMBRA7592/criticality-spectrometer.git
cd criticality-spectrometer
python -m pip install -e .
criticality-spectrometer run examples/canonical/model.json
The canonical model is a seven-node, hand-verifiable fixture. Its bottleneck has impact 1 at tau=0 and 0 after its backup activates at tau=12:
node impact shape OR gap
bottleneck [1, 0, 0] fully_adaptable [1, 0, 0]
Use JSON output for a reproducible artifact:
criticality-spectrometer run examples/canonical/model.json --format json > result.json
JSON reports identify the instrument and schema versions, model SHA-256,
horizons, and run configuration. The contract is
schema/result.schema.json.
Prefer the Python API?
from criticality_spectrometer import load_model, run_sweep
model = load_model("examples/tutorial/model.json")
result = run_sweep(model)
print(result.curves["runner_primary"].impact)
# [1, 0]
The narrated model-your-first-system tutorial builds that ten-node CI pipeline from scratch.
CLI exit codes are stable: 0 means success, 2 means invalid CLI input or an
invalid model, and 3 means the model failed the positive, constant-baseline
requirement. criticality-spectrometer --version prints the installed version.
What the instrument returns
For every node, the sweep reports an impact curve and a conservative shape class:
| shape | curve behavior | interpretation |
|---|---|---|
persistent |
positive and unchanged | alternatives do not reduce measured loss |
fully_adaptable |
falls to zero | available alternatives eventually restore the mission |
partially_adaptable |
declines but stays positive | adaptation helps without eliminating loss |
none |
zero at every horizon | removal does not reduce the selected mission outcome |
These labels describe model output. They are not policy recommendations or empirical claims by themselves.
Model contract
A model contains:
- nodes;
- identified requirement groups with
ANDorORlogic; - substitutes targeted to a specific requirement group and activation time;
- one mission outcome:
served_sinksorordered_served_sinks.
The machine-readable contract is in schema/model.schema.json. The formal cascade, outcome, baseline, and comparison semantics are in docs/method.md.
Worked example: AI compute supply chain
The repository includes a 52-node worked example expressed entirely as model data; the engine contains no semiconductor-specific entities. Three missions separate topology, an advanced-fab path, and the primary ordered frontier stack.
The primary stack reproduces the prior case study's seven named acceptance tests at the shape level. For example, the modeled EUV corridor is persistent, TSMC is fully adaptable over the specified horizons, and germanium has no impact on that mission. The example is an application, not cross-domain validation.
- Parity analysis and divergences
- Evidence ledger
- Frozen source manifest
- Non-claims and empirical boundaries
Rebuild and verify the example:
python examples/ai_compute/build_ai_case.py
pytest -q tests/test_ai_case.py
How it differs from common network measures
| method | represents | answer type |
|---|---|---|
| Centrality | position in a graph | scalar score |
| Critical-node detection | disconnection caused by removal | scalar or set |
| Criticality Spectrometer | mission loss across adaptation horizons under explicit requirements | curve and shape class |
Scope of v0.1
This is an alpha research instrument with one canonical fixture and one empirical domain. It does not infer dependencies, estimate activation times, prove causal claims, or turn shape classes into policy prescriptions. The current model contract also lacks connectivity-only edges; the worked example logs where that boundary matters.
See docs/nonclaims.md for the full boundary and CHANGELOG.md for release history.
Development
python -m pip install -e ".[test]"
pytest -q
Contributions are welcome, especially independent examples that exercise the frozen model contract without adding domain logic to the engine. See CONTRIBUTING.md.
Citation and license
Citation metadata is provided in CITATION.cff. Released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file criticality_spectrometer-0.1.1.tar.gz.
File metadata
- Download URL: criticality_spectrometer-0.1.1.tar.gz
- Upload date:
- Size: 61.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90799fcf68d8a44872e2448794e9b9fbe858881ccc1fe16f724108e78b16fc05
|
|
| MD5 |
ad20ea6cc5df0c50e846851c1a076a48
|
|
| BLAKE2b-256 |
4bf0ba43b6290242d3e618ed400b6373c7dae6cb8eb765e24e34858921392549
|
Provenance
The following attestation bundles were made for criticality_spectrometer-0.1.1.tar.gz:
Publisher:
release.yml on AMBRA7592/criticality-spectrometer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
criticality_spectrometer-0.1.1.tar.gz -
Subject digest:
90799fcf68d8a44872e2448794e9b9fbe858881ccc1fe16f724108e78b16fc05 - Sigstore transparency entry: 2175377410
- Sigstore integration time:
-
Permalink:
AMBRA7592/criticality-spectrometer@fa9a3e1dbdd26d1e56f39304e53606ae445b8aca -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/AMBRA7592
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fa9a3e1dbdd26d1e56f39304e53606ae445b8aca -
Trigger Event:
release
-
Statement type:
File details
Details for the file criticality_spectrometer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: criticality_spectrometer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aeccde2565042e8f0d1275649e98678f1a241dbc564daf2b4f10e744cc0eae9
|
|
| MD5 |
0f257ac0af71c39c2d5d6d7a3766a9b9
|
|
| BLAKE2b-256 |
cf2fd2fe5650cd7d8125a4dfacc5b66df22a3550cb38744e095c5c0664116fdb
|
Provenance
The following attestation bundles were made for criticality_spectrometer-0.1.1-py3-none-any.whl:
Publisher:
release.yml on AMBRA7592/criticality-spectrometer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
criticality_spectrometer-0.1.1-py3-none-any.whl -
Subject digest:
9aeccde2565042e8f0d1275649e98678f1a241dbc564daf2b4f10e744cc0eae9 - Sigstore transparency entry: 2175377505
- Sigstore integration time:
-
Permalink:
AMBRA7592/criticality-spectrometer@fa9a3e1dbdd26d1e56f39304e53606ae445b8aca -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/AMBRA7592
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fa9a3e1dbdd26d1e56f39304e53606ae445b8aca -
Trigger Event:
release
-
Statement type: