Open-source expert reasoning framework distillation tool
Project description
Dianoia AI 格物致知
Open-source expert reasoning framework distillation tool
What is Dianoia?
Dianoia (格物致知) distills expert reasoning patterns from public artifacts — documents, code reviews, design docs — into profile.yaml and SKILL.md formats that any AI agent can consume.
Unlike knowledge extraction, Dianoia captures how experts think: how they define problems, judge quality, prioritize trade-offs, and decide when "good enough" is acceptable.
Inspired by The Relic Condition research on reasoning architecture extraction.
Install
pip install py-dianoia
Requires Python 3.11+
Quick Start
# 1. Initialize a project
dianoia init my-expert
# 2. Add corpus files to my-expert/corpus/
cp ~/expert-docs/*.md my-expert/corpus/
# 3. Extract reasoning patterns
dianoia extract my-expert
# 4. Build output files (profile.yaml + SKILL.md)
dianoia build my-expert
# 5. Validate outputs
dianoia validate my-expert
Architecture
Corpus Files → ExtractionPipeline (8 layers) → IR → ProfileMapper → profile.yaml
→ SkillRenderer → SKILL.md
8-Layer Extraction Method
| # | Layer | Extracts |
|---|---|---|
| 1 | Ontological | Problem boundaries, classification systems |
| 2 | Teleological | Goals, purposes, end-driven reasoning |
| 3 | Methodological | Procedures, systematic approaches |
| 4 | Axiological | Values, priorities, decision criteria |
| 5 | Epistemological | Knowledge sources, evidence standards |
| 6 | Conditional | Context-dependent decisions |
| 7 | Priority | Trade-off ordering (engineering-specific) |
| 8 | Pragmatic | "Good enough" thresholds, practical shortcuts |
Stability Filtering
Features only survive if they appear in ≥2 independent texts AND ≥3 distinct contexts. This filters noise and ensures distilled patterns represent genuine expert consensus.
Output Formats
profile.yaml
Structured data for workflow engines (e.g., kitchen-ent):
version: "1.0"
sections:
identity:
- key: domain
value: engineering
confidence: 0.85
sources: [doc1.md, doc2.md]
SKILL.md
Follows the Agent Skills open standard:
---
name: "my-expert"
description: "Expert reasoning distilled from ..."
---
# My Expert
## Extracted Reasoning Patterns
...
Language Overlay
Distill once in a language-agnostic base profile, then overlay language-specific customizations:
base-profile.yaml (language-agnostic skeleton)
+ overlay-python.yaml
+ overlay-rust.yaml
+ overlay-go.yaml
Documentation
- Distillation Principle
- Architecture
- CLI Reference
- Language Overlay
- Profile Deliverable
- SKILL Deliverable
- Contributing
Specifications
- IR Schema — JSON Schema for the Intermediate Representation
- Profile Spec — profile.yaml format specification
- SKILL Spec — SKILL.md format specification
Development
git clone https://github.com/bigmoon-dev/dianoia-ai.git
cd dianoia-ai
pip install -e ".[dev]"
pytest
License
Apache-2.0
Project details
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 py_dianoia-0.1.0.tar.gz.
File metadata
- Download URL: py_dianoia-0.1.0.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8df4dafb75ca12a31446e0e76b61cad2c2c96f6f6b4b0c337dda5d56e4b78d56
|
|
| MD5 |
2d5740f0569ae94ad739efbf18937143
|
|
| BLAKE2b-256 |
f1120f19622d525a4bc2125d562a6d2637063f93a010490930e8ee0a76271cbf
|
File details
Details for the file py_dianoia-0.1.0-py3-none-any.whl.
File metadata
- Download URL: py_dianoia-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cf50fd7ecc9c5252b48e8a4f637052bf5d45c33ecb4c8386e3a590f625c9e46
|
|
| MD5 |
9e3b8a7d3de2e3dcc9a3f0518bb3e623
|
|
| BLAKE2b-256 |
9804dcfa173b69209af7ed585db5274d4858d272969366a7ac662d9c73a0d45a
|