# second-perspective **Repository Path**: nohn-ecosystem/second-perspective ## Basic Information - **Project Name**: second-perspective - **Description**: 决策前理性审计工具,离线、中立、不替代决策。AI治理 · 因果推理 · 决策审计 · 可解释AI · 合规审计 · 责任追溯 · 大模型安全 · 企业级AI应用 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: Intelligent-Decision-Hub--Nomos - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-07-06 - **Last Updated**: 2026-09-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: accountability, llm-safety, explainable-ai, ai-governance, compliance ## README
NOMOS · v0.3.0 — The Intelligent Decision Hub
NOMOS is an intelligent decision hub with a built-in auditable deterministic core. It scored 95/100 in Singapore's IMDA AI Verify compliance assessment. The engine unifies structured evaluation, fine-grained algorithmic auditing, causal counterfactual re-selection, declared-scenario stress testing, structured cognitive challenge, information prioritization, and human governance into a single report.
It never invents missing facts, weights, thresholds, responsible parties, evidence, or probabilities. It produces candidates under declared inputs and always keeps the final verdict outside the algorithm.
— ✦ —
## ✦ Built-in Universal Audit EngineNOMOS ships a universal audit engine — not a bolt-on patch. The audit trail is built into the deterministic core: every decision, assumption, constraint, and causal step is recorded, hash-linked, and independently verifiable by design.
It scored 95/100 in the causal-audit track of Singapore's IMDA AI Verify. The full compliance report is included as IMDA_AI_Verify_Causal_Audit_Report.pdf.
— ✦ —
## ✦ What's New in v0.3 - Hash-chained audit events for every major deterministic operation - Explicit operands and outputs for constraint and criterion calculations - True candidate re-selection after transmitted assumption failures - Stress scenarios declared by the user (failed assumptions, metric overrides) - Deterministic cognitive-risk challenge layer that infers no mental states - Prioritized information acquisition and review queue - An `IntelligentDecisionHub` orchestrator and a sealed `HubReport` - Full audit ledger inside both baseline and scenario runs - New `POST /v1/hub/analyze`, while retaining every v0.2 endpoint - v0.3 package, CLI demos, generated OpenAPI, and CI coverage gate Architecture and boundaries: [`docs/INTELLIGENT_DECISION_HUB_V0_3.md`](docs/INTELLIGENT_DECISION_HUB_V0_3.md). Base v0.2 design: [`docs/DECISION_FOUNDATION_V0_2.md`](docs/DECISION_FOUNDATION_V0_2.md). ## ✦ Three-Layer Causal Reconstruction (Bounded Convergence + Human Gate) New in `hub/session.py` (`ReconstructionSessionEngine`) and `decision/reconstruction.py` (`reconstruct_with_delta`): the previously one-shot causal reconstruction is upgraded into a **bounded, hash-chained, human-gated iterative process**. Each round runs the three causal operators: 1. **Forward invalidation propagation** — `invalidation_closure` propagates a declared assumption failure forward, dropping alternatives that lose that assumption's support. 2. **Backward root-cause tracing** — the existing reverse BFS traces deviation signals back to a candidate set of root-cause hypotheses. 3. **Delta reconstruction** — declared correction variables (`DeltaVar`) are applied to a copy of the request, the deterministic evaluator is re-run, and convergence of the leading candidate set is judged. Design invariants (aligned with the NOMOS core): - **No guessing** — every hypothesis is a candidate; a human decides. The engine never auto-loops. - **Deterministic** — each round derives exclusively from declared inputs. - **Auditable** — every round is hash-linked to the previous one; the whole session forms a `session_root_hash`. - **Bounded** — capped by `max_iterations` and `max_evidence_requests`. - **Human gate** — `advance()` performs exactly one round and then stops at `AWAITING_HUMAN`; only a human decision (`approve` / supply evidence / reject) may move to the next round. Stop conditions: fixed point (candidate set stops changing), no gain (no unresolved branches and all assumptions settled), or budget exhausted. ```python from second_perspective.models import DecisionRequest, DeviationSignal, DeltaVar from second_perspective.hub.session import ReconstructionSessionEngine engine = ReconstructionSessionEngine() session = engine.start(request, signals, max_iterations=5) session = engine.advance(session) # round 1: three-layer reconstruction session = engine.advance(session, [ # inject a declared correction DeltaVar(path="A2", value=None, reason="...", responsibility="..."), ]) session = engine.human_decision(session, approved=True) # human seal print(session.session_root_hash) ``` A `DeltaVar` path may take three forms: `"A2"` (falsify an assumption, propagated through the dependency graph), `"criteria.K1.weight"` (rewrite a criterion weight), or `"alternatives.S1.metrics.cost"` (rewrite an alternative metric). The engine mirrors each declared `DeltaVar` verbatim and never invents corrections. ## ✦ Architecture ```text HubAnalysisRequest -> Decision Core -> Structure / Evidence Audit -> Hard + Soft Constraint Evaluation -> Normalized Scoring -> Causal Invalidation -> Counterfactual Re-selection -> Pareto + Weight Sensitivity -> Hash-Chained Algorithm Audit -> Declared-Scenario Stress Runs -> Structured Cognitive Risk Challenge -> Information Prioritization Queue -> Append-only DecisionRecord -> Sealed HubReport -> Human Approve / Reject ``` ## ✦ Install & Test ```bash python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -e ".[dev]" pytest ``` ## ✦ Run the Demos Core decision core: ```bash nomos-demo ``` Prints a human-readable decision summary. Use `--decision— ✦ —
## ✦ Ecosystem NOMOS is a member of the NOHN AI ecosystem — a family of projects built around second-perspective causal auditing and deterministic execution: | Project | Repository | Role | |---|---|---| | **Second-Perspective (GCAE)** | [nohn3043-arch/second-perspective](https://github.com/nohn3043-arch/second-perspective) | Global cognitive audit engine — five-operator causal audit kernel (IMDA 95/100) | | **NOMOS** | [nohn3043-arch/second-perspective](https://github.com/nohn3043-arch/second-perspective) (`Intelligent-Decision-Hub--Nomos` branch) | Auditable deterministic decision hub (IMDA 95/100) | | **SPL-G1** | [nohn3043-arch/SPL-G1](https://github.com/nohn3043-arch/SPL-G1) | Hardware causal-audit trusted compute unit (TCU) | | **SPL-Virtual-World-Base** | [nohn3043-arch/Second-Reality](https://github.com/nohn3043-arch/Second-Reality) | Virtual-world and metaverse infrastructure (constitution / law / bridge) | | **Story-Engine** | [nohn3043-arch/story-engine](https://github.com/nohn3043-arch/story-engine) | Long-form narrative consistency engine | | **Antares** | [nohn3043-arch/Antares](https://github.com/nohn3043-arch/Antares) | GFSIP v1.0 — causally-audited federated stable-interop protocol | | **Anthropomorphic-Agent-Engine** | [nohn3043-arch/Anthropomorphic-Agent-Engine](https://github.com/nohn3043-arch/Anthropomorphic-Agent-Engine) | Deterministic anthropomorphic psychology engine (SPL Pure Core V8.0) | | **PAGES** | [nohn3043-arch/pages](https://github.com/nohn3043-arch/pages) | Official NOHN AI ecosystem landing page |— ✦ —
## ✦ License & Authorization This repository is **not open source**. Dual-track: free for personal non-commercial research; government / enterprise requires a paid commercial license. See [LICENSE](./LICENSE) — the licensor and applicable law depend on the user's location (within China → Shanghai Linming Junhua Technology Co., Ltd., PRC law; outside → NOHN AI TECHNOLOGY PTE. LTD., Singapore law + SIAC arbitration). - **Request a license**: International / Global — [ai@nohnlins.com](mailto:ai@nohnlins.com) · China — [lin@secondai.top](mailto:lin@secondai.top) Compliance documents: China (PRC): - [Shanghai compliance note](./docs/COMPLIANCE_SHANGHAI.md) - [Privacy policy (CN)](./docs/PRIVACY_POLICY_CN.md) - [Data processing agreement (CN)](./docs/DATA_PROCESSING_AGREEMENT_CN.md) International / Global: - [EU AI Act compliance note](./docs/COMPLIANCE_EU_AI_ACT.md) - [Privacy policy (International · GDPR)](./docs/PRIVACY_POLICY_INTL.md) - [Data processing agreement (International · GDPR)](./docs/DATA_PROCESSING_AGREEMENT_INTL.md) - [Privacy policy (Singapore · PDPA)](./docs/PRIVACY_POLICY_SG_PDPA.md) Framework alignment (non-binding references): - [NIST AI RMF 1.0 mapping](./docs/COMPLIANCE_NIST_AI_RMF.md) - [ISO/IEC 42001:2023 alignment](./docs/COMPLIANCE_ISO_42001.md)GitHub · Website · ai@nohnlins.com
NOHN AI · NOMOS