In previous articles, I explained why judgment must be externalized.
We introduced three structural components:
- Ontology
- DSL (Decision Contract)
- Behavior Tree
But a natural question follows:
How do we actually build them?
If these structures are poorly designed, they become rigid.
If they are too flexible, they collapse into ambiguity.
This article outlines a practical method for building
Ontology, DSL, and Behavior Trees
efficiently, accurately, and sustainably.
1. Ontology — Start from Friction, Not from Taxonomy
A common mistake in ontology design is this:
Start by categorizing everything.
This leads to:
- Overly abstract classifications
- Philosophical debates
- Endless naming conflicts
- No operational value
Ontology should not start from theory.
It should start from decision friction.
Step 1: Identify Repeated Decision Conflicts
Ask:
- Where do discussions repeatedly stall?
- Where do KPI definitions differ?
- Where does “that depends” appear most often?
- Where do post-hoc explanations contradict each other?
Ontology must stabilize those unstable zones.
If teams argue about what counts as a “visit,”
that is an ontology problem.
If “VIP” means different things across departments,
that is ontology drift.
Ontology should freeze those boundaries.
Step 2: Define Boundaries as Operational Contracts
Bad ontology definition:
A visit is a user entering the facility.
Good ontology definition:
Visit = stay within geofence for ≥ 3 continuous minutes.
Good ontology properties:
- Measurable
- Testable
- Auditable
- Versionable
- Independent from model output
Ontology is not semantic beauty.
It is boundary precision.
Step 3: Version Everything
Meaning changes over time.
Do not overwrite definitions.
Version them.
Example:
visit.v1
visit.v2 (added dwell-time condition)
Without versioning,
you cannot reproduce historical decisions.
Reproducibility is the foundation of auditability.
2. DSL — Design for Change, Not for Expression Power
A DSL is not a programming language.
It is a decision contract language.
Its purpose is not expressiveness.
Its purpose is clarity and auditability.
Step 1: Start with Minimal Operators
Do not begin with:
- Nested logic
- Complex quantifiers
- Arbitrary functions
Start with:
- Comparison operators
- Boolean AND / OR
- Explicit signal references
Example:
rule: high_value_user
when:
- signal: purchase_intent
op: ">="
value: 0.8
then:
action: issue_voucher
Resist adding flexibility too early.
Flexibility increases ambiguity.
Ambiguity destroys accountability.
Step 2: Separate Signals from Rules
Never allow DSL rules to compute signals.
Wrong:
if purchase_intent_score(user) > 0.8:
Correct:
signal: purchase_intent
Signals are outputs of models.
DSL consumes signals.
This separation keeps:
Model updates independent
Decision logic stable
Step 3: Design for Diff Readability
If changing 0.8 → 0.7 is invisible in Git history,
your DSL failed.
Good DSL properties:
- Line-level diff clarity
- Threshold changes obvious
- Owner metadata attachable
- Version tagging possible
You should be able to answer:
Who changed this threshold?
Why?
Under whose approval?
If not, it is not a decision contract.
3. Behavior Trees — Start with Execution Risk Mapping
Most teams design execution trees from logic flow.
That is wrong.
Start from risk containment.
Ask:
Where must execution stop?
What must fail closed?
Which branch has priority?
Where is fallback acceptable?
Where is fallback dangerous?
Behavior Trees are not flowcharts.
They are execution topology with safety semantics.
Step 1: Map Critical Decision Order
Example:
- Check system risk
- Check fraud signals
- Check eligibility
- Apply business rule
- Execute action
This order must be explicit.
Implicit order = hidden judgment.
Step 2: Default to Fail-Closed
Every BT must answer:
If something is uncertain,
do we:
- Continue?
- Fallback?
- Or halt?
Judgment systems must default to halt.
Fail-open systems optimize convenience.
Fail-closed systems optimize responsibility.
Step 3: Keep Trees Shallow
Deep trees reduce readability.
If the tree is too deep,
your ontology or DSL is overloaded.
Good BT design:
- 2–4 levels
- Clear priority ordering
- Explicit fallback branches
- No hidden recursion
Complexity belongs in signal generation.
Not in execution topology.
4. Integration Strategy — Build Bottom-Up
Do not attempt full architecture at once.
Build in this order:
- Define 3–5 critical ontology terms
- Create 2–3 minimal DSL rules
- Construct a shallow BT for one decision path
- Run audit simulation
- Adjust boundaries
Grow gradually.
Architecture must evolve with friction.
5. The Core Principle
Ontology defines meaning.
DSL defines acceptable decisions.
Behavior Tree defines execution responsibility.
Efficiency comes from constraint.
Accuracy comes from boundary clarity.
Sustainability comes from versioning.
Conclusion
The question is not:
How do we design smarter models?
The question is:
How do we design clearer judgment structures?
Models will improve automatically over time.
But poorly designed judgment structures
become institutional liabilities.
If AI systems are to be responsible,
their judgment must be:
Defined
Externalized
Versioned
Auditable
Fail-closed
That is how Ontology, DSL, and Behavior Trees
can be built efficiently — and correctly.
If You Would Like to Go Deeper
If you are interested in:
-
Externalizing your organization’s decision structure
-
Reviewing or designing a DSL framework
-
Re-architecting existing AI systems for auditability
-
Implementing progressive trust or fail-closed design
Feel free to contact me directly.
I provide guidance at both the implementation level
and the organizational design level.

コメント