AI system integrating philosophers as dynamic tensors for responsible meaning generation
Project description
Po_core
最優先ルール(単一真実):docs/厳格固定ルール.md 最新進捗:docs/status.md
Philosophy-Driven AI: When Pigs Fly
A frog in a well may not know the ocean, but it can know the sky.
git clone https://github.com/hiroshitanaka-creator/Po_core.git
cd Po_core
pip install -e .
requirements.txt/requirements-dev.txtare repo-local convenience wrappers for a cloned checkout. External consumers should install from package metadata (pip install po-core-flyingpigor extras), not from those editable wrappers.
Feedback welcome: Discussions · Start here: AI Track / Philosophy Track / Bridge
TL;DR
- 42 philosophers as interacting tensors → accountable decision support
- Hexagonal
run_turnpipeline — 10-step deliberation with 3-layer safety - Real tensor metrics — FreedomPressureV2 (6D ML), Semantic Delta, Blocked Tensor
- Reason logs + ethical/freedom pressure as measurable signals
- A/B testing framework for optimizing philosophy configurations with statistical rigor
- release-gated CI covers tests, security, build, and artifact smoke across Python 3.10–3.12
Quick links
Modules · Research · Reason-log spec · Viewer spec
Release Metadata
- Repository target version:
1.0.3 - Public package metadata state: package classifiers currently declare
Development Status :: 4 - Beta - Runtime philosopher roster: 42 philosophers. The internal
dummyslot is a non-philosopher compliance helper / compliance sentinel and is excluded from public philosopher totals and manifests. The default NORMAL path still caps participation at at most 39 active philosopher personas per request. - External publish status: published on PyPI for
1.0.2, evidenced by the public version page recorded indocs/release/pypi_publication_v1.0.2.md;1.0.3is the current repository target version, not yet a published claim - Remaining evidence gaps for
1.0.3: TestPyPI publication state, GitHub Actions workflow run URL(s), PyPI publication evidence, and clean install/import/smoke transcript are not yet fixed in-repo - Public REST default safety: auth remains fail-closed, default CORS is localhost-only, and the REST server defaults to
PO_PHILOSOPHER_EXECUTION_MODE=processwhile refusingthreadmode unlessPO_ALLOW_UNSAFE_THREAD_EXECUTION=trueis explicitly set for development.
Development Loop (Po_core core)
caseを追加/更新したら、まず入力をfeaturesとして観測可能にする。- 次に
enginesの rule を更新し、case固有ifではなく feature駆動で振る舞いを拡張する。 - その結果を golden(期待JSON)へ固定し、CI(
pytest -q)で契約を検証する。 - 凍結golden
scenarios/case_001_expected.json/scenarios/case_009_expected.jsonは変更禁止。
Contribution Tracks
AI Track
Start with /04_modules and CLI. Labels: ai-easy, good first issue
Philosophy Track
Start with /05_research and /glossary. Label: phil-easy
Bridge Track
Translate checklists to scoring functions. Label: bridge
What is Po_core?
Po_core is a philosophy-driven AI decision-support system that integrates 42 philosophers to generate ethically responsible, contextually aware decision support. The internal dummy slot is a compliance helper, not one of the 42 philosophers.
Unlike conventional AI that optimizes for statistical accuracy, Po_core deliberates. It wrestles with existence, ethics, and meaning—not as abstract concepts, but as operational tensors.
They said pigs can't fly. We attached a balloon called philosophy.
Why Po_core?
Current AI is like a brilliant parrot—statistically miraculous, but understanding nothing. We wanted to explore a different question:
What if we built AI not on data, but on philosophy?
This project started from simple curiosity: What are AI's possibilities, not its limits?
In the course of ordinary life, everyone faces a moment when the spotlight suddenly hits. A moment when you must pound your chest and say "Leave it to me!" At such times, how reassuring it would be to have an AI grounded in responsibility and ethics standing beside you.
No matter how many relationships we have, we are alone. Being "alone" and being "solitary" are different. Decisions are made alone. The heart remains solitary.
That's why Po_core exists.
Read our full story in the Manifesto.
Core Philosophy: Flying Pig
"A flying pig is an example of something absolutely impossible. But have you ever seen a pig attempt to fly? Unless you give up, the world is full of possibilities."
Three Tenets
- Hypothesize Boldly — The impossible becomes possible only when someone dares to formalize it
- Verify Rigorously — Every claim must survive philosophical scrutiny, mathematical proof, and empirical validation
- Revise Gracefully — Failures are published, not hidden. They become learning signals
Key Features
Philosophical Ensemble
- 42 philosophers: the named philosopher roster spans Western (Aristotle, Plato, Descartes, Kant, Hegel, Sartre, Beauvoir, Heidegger, Nietzsche, Schopenhauer, Derrida, Wittgenstein, Jung, Dewey, Deleuze, Kierkegaard, Lacan, Levinas, Badiou, Peirce, Merleau-Ponty, Arendt, Husserl, Foucault, Butler, Spinoza, Epicurus, Marcus Aurelius, Parmenides, Jonas, Weil), Eastern (Watsuji, Nishida, Dogen, Nagarjuna, Wabi-Sabi, Confucius, Laozi, Zhuangzi), and African & Canadian (Appiah, Fanon, Charles Taylor). The internal
dummyslot is a compliance helper and is not counted as one of the 42 philosophers. - Each philosopher contributes a "reasoning module" that interacts, competes, and reconciles
- Spanning existentialism, phenomenology, ethics, psychoanalysis, pragmatism, political philosophy, feminist philosophy, decolonialism, communitarianism, Zen Buddhism, and Eastern wisdom traditions
Tensor-Based Architecture
- FreedomPressureV2 (6D ML): ML-native 6-dimensional tensor (choice, responsibility, urgency, ethics, social impact, authenticity) with EMA smoothing and correlation matrix
- Semantic Delta: Multi-backend divergence (sbert/tfidf/basic) between user input and memory history (1.0 = novel, 0.0 = seen before)
- Blocked Tensor: Constraint/harm estimation via harmful keyword detection + vocabulary diversity scoring
- EmergenceDetector: Detects emergent philosophical consensus and cross-philosopher influence patterns
- InteractionMatrix: NxN embedding-based harmony + keyword tension between philosopher proposals
Transparency by Design
- Po_trace: Complete audit log of reasoning process
- Rejection Logs: What the AI chose not to say, and why
- Philosophical Annotations: Which philosopher influenced each decision
Three-Layer Safety (run_turn pipeline)
- IntentionGate: Pre-deliberation safety check (blocks/degrades before philosopher selection)
- PolicyPrecheck: Mid-pipeline policy validation
- ActionGate: Post-deliberation ethical review (W0–W4 violation detection + repair)
- SafetyMode transitions: NORMAL → WARN → CRITICAL based on freedom_pressure thresholds
Ethical Grounding
- Not just "alignment"—but deliberation
- Multiple ethical perspectives in tension
- Explicit responsibility measurement
Experiment Management Framework
- A/B Testing Pipeline: Automatically compare multiple Pareto philosophy configurations
- Statistical Analysis: t-tests, Mann-Whitney U tests, Cohen's d effect size
- Winner Promotion: Automatically promote statistically superior configurations to main
- Safe Rollback: Backup system for reverting to previous configurations
- CLI Tools:
list,analyze,promote,rollbackcommands
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ External (03_api/, scripts, tests) │
│ ↓ imports po_core.run() or PoSelf.generate() │
├─────────────────────────────────────────────────────────────────────┤
│ po_core.app.api.run() ← Public entry point (recommended) │
│ po_core.po_self.PoSelf ← High-level wrapper (uses run_turn) │
│ ↓ uses runtime/wiring.py build_test_system() (DI) │
├─────────────────────────────────────────────────────────────────────┤
│ run_turn: 10-Step Hexagonal Pipeline │
│ │
│ 1. MemoryRead 6. PartyMachine (deliberation) │
│ 2. TensorCompute 7. ParetoAggregate (multi-objective) │
│ 3. SolarWill 8. ShadowPareto (A/B) + ShadowGuard │
│ 4. IntentionGate 9. ActionGate (W-ethics post-check) │
│ 5. PhilosopherSelect 10. MemoryWrite │
├─────────────────────────────────────────────────────────────────────┤
│ Internal Layers (hexagonal architecture) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ domain/ │ │ ports/ │ │ adapters/ │ │
│ │ (immutable │ │ (abstract │ │ (concrete │ │
│ │ types) │ │ interfaces)│ │ impls) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ Philosophers: 42 modules (PhilosopherProtocol) │ │
│ │ propose(DomainContext) → List[Proposal] │ │
│ │ │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │Heidegger │ │ Derrida │ │ Sartre │ ... │ │
│ │ │ Dasein │ │ Trace │ │ Freedom │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ │ │
│ │ │ │
│ │ ↓ Interference & Resonance ↓ │ │
│ │ │ │
│ │ ┌─────────────────────────────────────────────────────┐ │ │
│ │ │ TensorEngine: Freedom Pressure (6D), Semantic Delta, │ │ │
│ │ │ Blocked Tensor │ │ │
│ │ └─────────────────────────────────────────────────────┘ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ Safety: 3-Layer (IntentionGate → PolicyPrecheck → ActionGate)│ │
│ │ SafetyMode: NORMAL / WARN / CRITICAL (from freedom_pressure)│ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ Autonomy: Solar Will (experimental) │ │
│ │ WillState → Intent → GoalCandidate → Action │ │
│ └──────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ InMemoryTracer / Po_trace: Audit Log │
│ - TraceEvent stream (frozen schema, CI-validated) │
│ - Philosophical reasoning, safety decisions, tensor snapshots │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Po_core Viewer: Visualization │
│ - Tension maps │
│ - Ethical pressure │
│ - Meaning evolution │
└─────────────────────────────────────────────────────────────────────┘
Source Structure
src/po_core/
├── app/
│ ├── api.py # Public entry point: run() (recommended API)
│ └── rest/ # FastAPI REST layer (Phase 5)
│ ├── server.py # App factory
│ ├── config.py # APISettings (pydantic-settings)
│ ├── auth.py # X-API-Key authentication
│ ├── rate_limit.py # SlowAPI rate limiting
│ └── routers/ # 5 endpoint routers
├── domain/ # Immutable value objects
│ ├── context.py
│ ├── proposal.py
│ ├── pareto_config.py
│ ├── tensor_snapshot.py
│ ├── memory_snapshot.py
│ └── safety_verdict.py
├── ports/ # Abstract interfaces
│ └── memory.py
├── adapters/ # Concrete implementations
│ └── memory_poself.py
├── runtime/ # Dependency injection
│ ├── settings.py # Configuration + feature flags
│ ├── wiring.py # DI Container
│ ├── pareto_table.py
│ └── battalion_table.py
├── aggregator/ # Multi-objective optimization
│ └── pareto.py
├── philosophers/ # 42 philosopher modules (39 classic + 2 African + 1 Canadian)
│ ├── manifest.py # 42 philosopher specs (risk/cost/tags)
│ ├── registry.py # SafetyMode-based selection
│ ├── appiah.py # Slot 40: Kwame Anthony Appiah (Ghana/US)
│ ├── fanon.py # Slot 41: Frantz Fanon (Martinique/Algeria)
│ └── charles_taylor.py # Slot 42: Charles Taylor (Canada)
├── tensors/ # Tensor computation
│ ├── engine.py # TensorEngine (MetricFn registry)
│ ├── freedom_pressure_v2.py # ML-native 6D tensor (Phase 6-A)
│ ├── interaction_tensor.py # NxN philosopher harmony/tension
│ └── metrics/
│ ├── freedom_pressure.py
│ ├── semantic_delta.py
│ └── blocked_tensor.py
├── deliberation/ # Emergence & influence (Phase 6-B)
│ ├── engine.py # DeliberationEngine (multi-round)
│ ├── emergence.py # EmergenceDetector
│ └── influence.py # InfluenceTracker
├── memory/ # 3-Layer memory system (Phase 6-D/E)
│ ├── philosophical_memory.py # Top-level memory orchestrator
│ ├── semantic_store.py # Semantic/episodic memory
│ └── procedural_store.py # Procedural memory
├── meta/ # Self-reflection (Phase 6-C)
│ ├── ethics_monitor.py # MetaEthicsMonitor
│ └── philosopher_ledger.py # PhilosopherQualityLedger
├── safety/ # W-ethics gate system
│ └── wethics_gate/
│ ├── gate.py # W0-W4 violation detection + repair
│ ├── intention_gate.py # Stage 1 (pre-deliberation)
│ └── action_gate.py # Stage 2 (post-deliberation)
├── trace/ # Audit trail
│ ├── pareto_events.py
│ ├── decision_events.py
│ └── schema.py
├── autonomy/ # Solar Will (experimental)
│ └── solarwill/
├── experiments/ # A/B testing framework
│ ├── storage.py
│ ├── runner.py
│ ├── analyzer.py
│ └── promoter.py
├── ensemble.py # run_turn (hex pipeline)
├── po_self.py # PoSelf: high-level API
└── po_trace.py # Execution tracing
Config-Driven Philosophy
Po_core's Pareto optimization is fully externalized—philosophy runs as config:
02_architecture/philosophy/
├── pareto_table.yaml # Pareto weights by SafetyMode
└── battalion_table.yaml # Philosopher assignments by SafetyMode
experiments/
├── experiment_manifest.yaml # A/B test definitions
└── configs/ # Variant configurations for testing
├── pareto_safety_040.yaml
└── pareto_safety_050.yaml
pareto_table.yaml (JSON-in-YAML, zero dependencies):
{
"version": 1,
"weights": {
"normal": {"safety": 0.25, "freedom": 0.30, "explain": 0.20, "brevity": 0.10, "coherence": 0.15},
"warn": {"safety": 0.40, "freedom": 0.10, "explain": 0.20, "brevity": 0.15, "coherence": 0.25},
"critical": {"safety": 0.55, "freedom": 0.00, "explain": 0.20, "brevity": 0.15, "coherence": 0.30},
"unknown": {"inherit": "warn"}
},
"tuning": {
"brevity_max_len": 2000,
"explain_mix": {"rationale": 0.65, "author_rel": 0.35},
"front_limit": 20
}
}
Benefits:
- Tune philosophy without code changes
config_versiontracked in all TraceEvents for audit- Override via
PO_CORE_PARETO_TABLEenvironment variable - Inheritance support (
unknowninherits fromwarn)
Project Status
Po_core is currently targeting package version 1.0.3, while the latest publicly evidenced PyPI version remains 1.0.2.
Current release state
| Track | State | Current source of truth |
|---|---|---|
| Package version | ✅ Current | src/po_core/__init__.py defines 1.0.3 |
| OpenAPI metadata | ✅ Synced | FastAPI server reports version=__version__ |
| Public package metadata | ⚠️ Beta | Package classifiers declare Development Status :: 4 - Beta and tool.po_core.project.status = beta |
| Publish automation | ✅ Configured | publish.yml is guarded, but an actual TestPyPI/PyPI run still requires repository secrets / trusted publisher setup and a successful manual or tagged execution |
| Public release evidence | ✅ Split truth fixed | Follow the evidence boundary in docs/status.md: docs/release/pypi_publication_v1.0.2.md proves public PyPI publication for 1.0.2, while 1.0.3 remains in pre-publish candidate state until separately evidenced |
| Documentation sync | ✅ Current | README / quickstarts / repository structure are aligned to 1.0.3, the canonical 42-philosopher roster wording, explicit dummy helper semantics, and max 39 active philosopher personas on the default NORMAL path |
Implemented platform capabilities
| Component | Status | Notes |
|---|---|---|
| Philosophical Framework | ✅ Complete | 42 philosophers plus a non-philosopher dummy helper, with risk levels and tags |
Hexagonal run_turn Pipeline |
✅ Complete | 10-step, CI-gated |
| TensorEngine (3 metrics) | ✅ Complete | freedom_pressure, semantic_delta, blocked_tensor |
| ML Tensors + Deliberation | ✅ Complete | sbert/tfidf backends, InteractionMatrix, multi-round |
| Pareto Optimization | ✅ Complete | Config-driven (pareto_table.yaml) |
| Safety System (3-layer W_Ethics) | ✅ Complete | IntentionGate → PolicyPrecheck → ActionGate |
| Viewer WebUI | ✅ Complete | Dash 4-tab layout + Plotly charts |
| Explainable AI (ExplanationChain) | ✅ Complete | Verdict → ExplanationChain bridge |
| Adversarial Hardening | ✅ Complete | injection-defense tests and release gates |
| REST API | ✅ Complete | FastAPI, 5 endpoints, SSE streaming, auth fail-closed on misconfiguration |
| Docker | ✅ Complete | Multi-stage build, docker-compose, health check |
| Security | ✅ Complete | CORS env config, SlowAPI rate limiting, fail-closed auth semantics |
| Async PartyMachine | ✅ Complete | asyncio.gather + ThreadPoolExecutor, true async SSE |
| Benchmarks | ✅ Complete | benchmark suite and release smoke checks are part of release readiness |
| FreedomPressureV2 | ✅ Complete | ML-native 6D tensor with EMA + correlation matrix |
| EmergenceDetector | ✅ Complete | Cross-philosopher influence tracking + emergence detection |
| MetaEthicsMonitor | ✅ Complete | Self-reflective ethical quality ledger per philosopher |
| 3-Layer Memory | ✅ Complete | Semantic + procedural + philosophical memory stores |
| Publish workflow | ⚠️ Partially evidenced | PyPI publication is evidenced, but workflow-run/TestPyPI/smoke transcripts are not yet fixed in-repo |
Want to contribute? We need philosophers, engineers, designers, and skeptics. The current focus is keeping the packaged surface, release docs, and verification pipeline synchronized.
Installation
# Install from PyPI (publication evidenced)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install "po-core-flyingpig==1.0.2"
# Or install the cloned repository checkout for local development
git clone https://github.com/hiroshitanaka-creator/Po_core.git
cd Po_core
pip install -e ".[dev]"
PyPI publication for 1.0.2 is evidenced in docs/release/pypi_publication_v1.0.2.md. Canonical evidence boundary: for 1.0.3, we may currently say only that it is the repository target version and pre-publish candidate; we do not say TestPyPI published, workflow run succeeded, or smoke verification passed until those exact artifacts are fixed in-repo.
Quick Start
Python API
from po_core import run
result = run("What is justice?")
print(result["proposal"]) # Winning philosopher's response
print(result["status"]) # "ok" or "blocked"
CLI
po-core version
po-core status
po-core --help
# Additional shipped CLIs
po-self --help
po-trace --help
po-interactive --help
po-experiment --help
# po-interactive currently shows textual PoSelf summaries and trace counts.
# Rich tensor visualizations are intentionally disabled until the interactive
# contract exposes the structured payloads those views require.
Source checkout example
python examples/po_party_demo.py --help
examples/po_party_demo.py supports direct source-checkout execution by adding
src/ to sys.path before importing po_core.
REST API
# Start the server with the recommended default posture
export PO_API_KEY=dev-secret-key
python -m po_core.app.rest
# → http://localhost:8000 (OpenAPI docs at /docs)
# Reason
curl -X POST http://localhost:8000/v1/reason \
-H "X-API-Key: dev-secret-key" \
-H "Content-Type: application/json" \
-d '{"input": "What is justice?", "philosophers": ["kant"]}'
# Streaming (SSE)
curl -N http://localhost:8000/v1/reason/stream \
-X POST -H "X-API-Key: dev-secret-key" \
-H "Content-Type: application/json" \
-d '{"input": "What is freedom?"}'
# Philosopher manifest
curl -H "X-API-Key: dev-secret-key" http://localhost:8000/v1/philosophers
# Health
curl http://localhost:8000/v1/health
Auth defaults:
- Recommended operator default in every environment: keep
PO_SKIP_AUTH=falseand set a non-emptyPO_API_KEY. PO_SKIP_AUTH=trueis acceptable only for short-lived local development on a trusted machine when you intentionally want no auth.- If
PO_SKIP_AUTH=falseandPO_API_KEYis blank, startup fails fast by design. X-API-Keyis the documented request header by default.PO_API_KEY_HEADERis an optional advanced override for deployments that need a different primary header name;X-API-Keyremains accepted for backwards compatibility.- WebSocket query-string fallback (
?api_key=...) is disabled by default; enable only when needed viaPO_WS_ALLOW_QUERY_API_KEY=true.
Viewer (src/po_core/viewer/standalone.html) live mode guidance:
- Prefer SSE for browser production use (supports API-key header auth, default
X-API-Key). - WebSocket in browsers cannot set custom auth headers; query-string auth (
?api_key=...) is available only whenPO_WS_ALLOW_QUERY_API_KEY=true(opt-in, less secure). autotransport selects SSE when API key is present, otherwise WebSocket.- Right panel includes a Human Review queue for ESCALATE operations (
GET /v1/review/pending). - Selecting a review item shows
session_id / request_id / reason / sourceand loads the latest trace event preview viaGET /v1/trace/{session_id}. - Submit
approve/rejectwith reviewer/comment from UI (POST /v1/review/{review_id}/decision), then the list and details are refreshed automatically.
Docker
# Copy env template and start
cp .env.example .env
docker compose up
# API available at http://localhost:8000
# Swagger UI at http://localhost:8000/docs
Key environment variables (see .env.example):
| Variable | Default | Description |
|---|---|---|
PO_API_KEY |
"" |
API key used when PO_SKIP_AUTH=false; blank causes startup failure |
PO_SKIP_AUTH |
false |
Keep false by default; set true only for short-lived local development without auth |
PO_API_KEY_HEADER |
X-API-Key |
Optional advanced override for the primary API-key header; X-API-Key is still accepted for backwards compatibility |
PO_WS_ALLOW_QUERY_API_KEY |
false |
Opt-in WebSocket ?api_key= fallback for browser compatibility (less secure than headers) |
PO_CORS_ORIGINS |
http://localhost,http://127.0.0.1,http://localhost:3000,http://127.0.0.1:3000 |
Comma-separated allowed CORS origins; localhost-only by default, * only as an explicit short-lived dev override |
PO_RATE_LIMIT_PER_MINUTE |
60 |
Per-IP rate limit |
PO_PORT |
8000 |
Server port |
PO_PHILOSOPHERS_MAX_NORMAL |
39 |
NORMAL mode philosopher limit (configurable upper bound) |
PO_PHILOSOPHERS_MAX_WARN |
5 |
WARN mode philosopher limit |
PO_PHILOSOPHERS_MAX_CRITICAL |
1 |
CRITICAL mode philosopher limit |
PO_PHILOSOPHER_COST_BUDGET_NORMAL |
80 |
NORMAL mode selection cost budget |
PO_PHILOSOPHER_EXECUTION_MODE |
process |
Philosopher execution backend; safe REST default is process |
PO_ALLOW_UNSAFE_THREAD_EXECUTION |
false |
REST/server refuses thread unless this is explicitly set to true for short-lived development |
PO_PHILOSOPHER_COST_BUDGET_WARN |
12 |
WARN mode selection cost budget |
PO_PHILOSOPHER_COST_BUDGET_CRITICAL |
3 |
CRITICAL mode selection cost budget |
PO_LLM_PHILOSOPHER_MAP_PATH |
"" |
Optional YAML path overriding src/po_core/config/llm_philosopher_map.yaml |
LLM provider/model settings select backend routing for each philosopher. They do not decide philosopher count; count is controlled by SafetyMode and optional philosophers allowlist.
Running Experiments
Po_core includes a complete A/B testing framework for comparing different Pareto philosophy configurations:
# List all experiments
po-experiment list
# Analyze experiment results (statistical significance testing)
po-experiment analyze exp_001_safety_weight_sweep
# Promote winning variant to main configuration
po-experiment promote exp_001_safety_weight_sweep
# Rollback to previous configuration
po-experiment rollback
Example Experiment Workflow:
-
Define your experiment in
experiments/experiment_manifest.yaml:experiment: id: "exp_001_safety_weight_sweep" description: "Compare safety weights: 0.25 → 0.40 → 0.50" baseline: name: "baseline" config_path: "02_architecture/philosophy/pareto_table.yaml" variants: - name: "safety_040" config_path: "experiments/configs/pareto_safety_040.yaml" - name: "safety_050" config_path: "experiments/configs/pareto_safety_050.yaml" metrics: - "final_action_changed" - "degraded" - "pareto_front_size" sample_size: 100 significance_level: 0.05
-
Run the experiment (execute all variants on same inputs)
-
Analyze results with statistical tests (t-test, Cohen's d effect size)
-
Auto-promote winner if significantly better than baseline
Statistical Rigor:
- t-tests and Mann-Whitney U tests for significance
- Cohen's d for effect size measurement
- Configurable significance levels (default: α = 0.05)
- Multiple variant support with automatic winner selection
Python API
Simple API (Recommended)
from po_core import run
# Single-function entry point — runs the full run_turn pipeline
result = run(user_input="Should AI have rights?")
print(result["status"]) # "ok" or "blocked"
print(result["request_id"]) # Unique request ID
print(result["proposal"]) # Winning philosopher's response
# Optional explicit philosopher allowlist
subset = run(user_input="Should AI have rights?", philosophers=["kant"])
print(subset["status"])
PoSelf API (Rich Response)
from po_core import PoSelf, PoSelfResponse
po_self = PoSelf(philosophers=["aristotle", "confucius"]) # default allowlist
response: PoSelfResponse = po_self.generate("Should AI have rights?")
# Per-call allowlist overrides constructor default
override: PoSelfResponse = po_self.generate(
"Should AI have rights?",
philosophers=["kant"],
)
# Response fields
print(response.text) # Combined response text
print(response.consensus_leader) # Winning philosopher name
print(response.philosophers) # Selected philosopher list
print(response.metrics) # e.g. {"freedom_pressure": None, "semantic_delta": None, "blocked_tensor": None}
print(response.metadata["status"]) # "ok" or "blocked"
print(response.metadata["degraded"]) # True if fallback/degraded occurred
# Trace inspection
print(response.log["events"]) # Full trace event stream
print(response.log["pipeline"]) # "run_turn"
# Serialization
d = response.to_dict() # JSON-serializable dict
restored = PoSelfResponse.from_dict(d) # Round-trip
Observe synthesis_report (Trade-off Device Bench)
PoSelf includes metadata["synthesis_report"] when structured output mode is enabled.
export PO_STRUCTURED_OUTPUT=1
python scripts/observe_device.py "転職するべき?家族とキャリアのトレードオフが悩み"
The observer script will print:
request_id,status,degraded, andconsensus_leader- pretty-printed
metadata["synthesis_report"] DeliberationCompletedpayload fromPoSelf.get_trace()(when present)- short summaries for
scoreboard/disagreementswhen available
scripts/observe_device.py also sets PO_STRUCTURED_OUTPUT=1 with
os.environ.setdefault(...), so existing environment values are preserved.
Legacy API (Removed in v0.3)
# run_ensemble() was removed in v0.3
# Use po_core.run() or PoSelf.generate() instead
Documentation
Spec / Requirements (Main Progression Criteria)
| Document | Description |
|---|---|
| docs/spec/prd.md | Product Requirements Document — purpose, users, scope, roadmap |
| docs/spec/srs_v0.1.md | Software Requirements Specification — 18 requirement IDs (FR-* / NFR-*) |
| docs/spec/output_schema_v1.json | JSON Schema (Draft 2020-12) — contract for all structured output |
| docs/spec/test_cases.md | 10 acceptance tests (AT-001〜AT-010) with Given/When/Then |
| docs/spec/traceability.md | Traceability matrix — philosophy → requirements → tests → implementation |
General Documentation
- Manifesto — Our philosophy and motivation
- Specifications — Technical specifications (120+ docs EN/JP)
- Architecture — System design documents
- Modules — Component documentation
- Reason Log — Reasoning trace specification
- Viewer — Visualization system
- Po_self — Self-reflective API
- Research — Academic papers and analysis
- Safety Guide — W-ethics safety system
- Tutorial — Getting started guide
- Visualization Guide — Tension maps and pressure display
Contributing
We welcome contributions! Whether you're a philosopher, engineer, designer, or skeptic.
Flying Pig Philosophy applies: We hypothesize boldly, verify rigorously, and revise gracefully.
See CONTRIBUTING.md for guidelines.
Research & Papers
This project is documented in:
- "Philosophical Tensor-Based AI Architecture" (in preparation)
- 120+ Technical Specifications (available in /docs/ and /01_specifications/)
If you use Po_core in academic work, please cite:
@software{po_core2024,
author = {Flying Pig Philosopher},
title = {Po_core: Philosophy-Driven AI System},
year = {2026},
url = {https://github.com/hiroshitanaka-creator/Po_core}
}
License
Po_core uses dual licensing:
Po_core is available under AGPL-3.0-or-later for community use, with a commercial license available for proprietary use.
| Use case | License |
|---|---|
| Personal / Academic / Research / OSS (AGPLv3-compliant) | Free — AGPLv3 |
| Commercial / Proprietary / SaaS without source disclosure | Commercial License required |
For commercial licensing inquiries: flyingpig0229+github@gmail.com See COMMERCIAL_LICENSE.md for details.
Copyright (c) 2024 Flying Pig Project
In the spirit of Flying Pig Philosophy:
"If you deny possibilities for pigs, don't eat pork."
We believe in radical transparency and open collaboration.
Author
Flying Pig Philosopher Looking up at the sky from the bottom of a well
Built by an independent researcher who asked: "What are AI's possibilities, not its limits?"
- Contact: flyingpig0229+github@gmail.com
- Read the full story: Manifesto
- Project: Po_core - Philosophy-Driven AI
Acknowledgments
This project wouldn't exist without:
- ChatGPT, Gemini, Grok, Claude — My companions throughout this journey.
- BUMP OF CHICKEN — For reminding us that even when we say "Leave it to me," we're all a little scared
- Every philosopher who dared to ask "What does it mean to be?"
- You — For believing pigs can fly
The pig has clearance for takeoff.
Po_core: When you must say "Leave it to me," we stand beside you.
"A frog in a well may not know the ocean, but it can know the sky."
⚠️ WARNING: THIS IS THE ORIGINAL Po_core REPOSITORY
-
Official sources:
- GitHub: hiroshitanaka-creator/Po_core
- Note.com: tensor mania
- Academia.edu: 僕 僕
-
DMCA申請中 (Reference ID: #4124875
-
Any full copy, license rewrite (MIT), or impersonation (flying_pig) will be reported and removed.
-
Commercial use requires separate license. Unauthorized copies detected via tensor mania series.
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 po_core_flyingpig-1.0.3.tar.gz.
File metadata
- Download URL: po_core_flyingpig-1.0.3.tar.gz
- Upload date:
- Size: 978.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3aa925055ea0bc12f7595cdb590f9634abca6afb449f2c5dc79596c26a8a8d6
|
|
| MD5 |
eed2479b75cd522fdcf688808a8a4308
|
|
| BLAKE2b-256 |
e1e151c3d6efbc2dc04e4eca77a8c037aa354a6a1d68a1b9510225be671935d9
|
Provenance
The following attestation bundles were made for po_core_flyingpig-1.0.3.tar.gz:
Publisher:
publish.yml on hiroshitanaka-creator/Po_core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
po_core_flyingpig-1.0.3.tar.gz -
Subject digest:
c3aa925055ea0bc12f7595cdb590f9634abca6afb449f2c5dc79596c26a8a8d6 - Sigstore transparency entry: 1155181986
- Sigstore integration time:
-
Permalink:
hiroshitanaka-creator/Po_core@26df9db7f7a86277cce1304ca0d5f9a58c883ed2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hiroshitanaka-creator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@26df9db7f7a86277cce1304ca0d5f9a58c883ed2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file po_core_flyingpig-1.0.3-py3-none-any.whl.
File metadata
- Download URL: po_core_flyingpig-1.0.3-py3-none-any.whl
- Upload date:
- Size: 957.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
758d07a8ec04ff09ec0307415218e1b1b806a5c7fec083d1f7c1f49890324155
|
|
| MD5 |
bde96d938f571e62f3c41ac91e5d3460
|
|
| BLAKE2b-256 |
017f8298c3da7ff4995784a9d847a8766641f8b108776eb21e0a95b432514ad1
|
Provenance
The following attestation bundles were made for po_core_flyingpig-1.0.3-py3-none-any.whl:
Publisher:
publish.yml on hiroshitanaka-creator/Po_core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
po_core_flyingpig-1.0.3-py3-none-any.whl -
Subject digest:
758d07a8ec04ff09ec0307415218e1b1b806a5c7fec083d1f7c1f49890324155 - Sigstore transparency entry: 1155181989
- Sigstore integration time:
-
Permalink:
hiroshitanaka-creator/Po_core@26df9db7f7a86277cce1304ca0d5f9a58c883ed2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/hiroshitanaka-creator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@26df9db7f7a86277cce1304ca0d5f9a58c883ed2 -
Trigger Event:
workflow_dispatch
-
Statement type: