Skip to content

Documentation Theory: Dual-Dimension Abstraction System #7

@deepracticexs

Description

@deepracticexs

Documentation Theory: Dual-Dimension Abstraction System

Abstract

This document presents a complete theoretical framework for organizing software documentation based on dual-dimension abstraction: Static Structure (spatial expansion) and Dynamic Process (temporal segmentation). This theory provides both philosophical foundation and practical guidance for AI-native documentation architecture.


Part I: Theoretical Foundation

1.1 The Dual Nature of Information

Documentation must serve two fundamental dimensions:

  • Static (Structure): What the system is - spatial organization
  • Dynamic (Process): What the system does - temporal flow

Both dimensions follow parallel abstraction hierarchies, representing "concretization of information" in different aspects.

1.2 Geometric Dimension Mapping (Static)

The Static Dimension: From Point to Solid

```
Philosophy (Point - 0D)
↓ spatial expansion
Principles (Line - 1D)
↓ spatial expansion
Patterns (Framework - 2-3D)
↓ fill
Conventions (Solid - filled 3D)
```

Abstraction Principle: From abstract idea to concrete form through spatial dimension expansion.

1.3 Continuity-Discreteness Spectrum (Dynamic)

The Dynamic Dimension: From Continuity to Discreteness

```
Path (Complete Continuity - unified A→B journey)
↓ temporal segmentation
Flow (Segmented Continuity - observable phases)
↓ temporal segmentation
Process (Discrete Units - bounded transformations)
↓ temporal segmentation
Step (Atomic Operations - indivisible actions)
```

Abstraction Principle: From continuous reality to discrete operations through temporal segmentation.


Part II: Static Dimension - The Four Layers of Structure

Layer 1: Philosophy - The Point (0D)

Dimensional Position: Origin point in conceptual space
Geometric Analogy: A single point - the beginning of all directions
Core Question: What do we believe about software development?
Nature: Subjective (idealistic) - based on beliefs and values
Continuity: Complete unity, no internal division

Characteristics:

  • Single core idea/inspiration
  • Most abstract
  • Rarely changes
  • Guides all subsequent decisions
  • No code examples needed

Software Development Stage: Idea generation

  • "I want to build X" - a single inspiration
  • The soul of the product

Example:
```
Core Belief: "AI-Native Development"
→ A single concept
→ The starting point of all design decisions
```

Layer 2: Principles - The Line (1D)

Dimensional Position: Vectors extending from the origin
Geometric Analogy: Directional lines - one-way constraints
Core Question: What are the inviolable architectural rules?
Nature: Objective (materialistic) - laws of how systems work
Continuity: Directional flow, can be traced

Characteristics:

  • Derived from philosophy through logical deduction
  • Executable rules (verifiable right/wrong)
  • Component-level constraints (between modules)
  • Architectural axioms

Software Development Stage: Finding essential support

  • "To realize this idea, we must have..."
  • Identify core laws that are inviolable
  • These are the structural supports

Etymology: From Latin principium (prin- = first, -cipium = beginning)

  • "First principles" - axiomatic truths
  • Foundation from which other rules derive

Example:
```
Principle: "Dependency Rule"
Apps → Domain → Core (never reverse)
→ A directional constraint
→ Violation breaks the system
```

Layer 3: Patterns - The Framework (2-3D)

Dimensional Position: Interconnected structural scaffolding
Geometric Analogy: Framework with horizontal and vertical beams
Core Question: What framework should I use for scenario X?
Nature: Unity of subjective and objective - requires judgment
Continuity: Networked structure, multiple paths possible

Characteristics:

  • Application of principles to specific scenarios
  • Requires thinking and judgment
  • Design patterns and decision trees
  • Component-internal rules (within modules)
  • Reusable templates

Software Development Stage: Building the framework

  • "Based on these laws, design..."
  • Transform principles into reusable templates
  • Developers apply these for consistency

Key Distinction from Principles:

  • Principles: Rules between components (architecture)
  • Patterns: Rules within components (design)

Example:
```
Pattern: "Core vs Domain Decision Tree"
Is it technical implementation? → Core
Is it business logic? → Domain
→ A decision framework
→ Multiple valid paths depending on context
```

Layer 4: Conventions - The Solid (Filled 3D)

Dimensional Position: Complete filled entity
Geometric Analogy: Every gap in the framework is filled
Core Question: Exactly how do I write this code?
Nature: Mechanical rules - no interpretation needed
Continuity: Complete specification, no ambiguity

Characteristics:

  • Most specific and concrete
  • Look-up table, no thinking required
  • Mechanically checkable by tooling
  • Can be fully automated

Software Development Stage: Mass production

  • "Fill in the details..."
  • Complete executable codebase
  • Every detail specified

Example:
```
Convention: "File Naming"
Classes: PascalCase.ts
Utilities: camelCase.ts
→ Mechanical rule
→ No judgment needed
```


Part III: Dynamic Dimension - The Four Layers of Process

Layer 1: Path - Complete Continuity

Temporal Nature: Unified continuous journey from A to B
Physical Analogy: A river in its entirety
Core Question: Where are we going? (A→B)
Continuity Level: Maximum - seamless, indivisible
Abstraction: Highest - only endpoints matter

Characteristics:

  • The complete journey without internal segmentation
  • Vision and direction
  • Example: "From idea to production"

Software Example:
```
Path: "From feature request to feature deployment"
→ Complete continuous journey
→ No internal divisions yet
```

Layer 2: Flow - Segmented Continuity

Temporal Nature: Observable phases, still flowing
Physical Analogy: Upper, middle, lower sections of a river
Core Question: What are the major phases?
Continuity Level: High - segments flow seamlessly into each other
Abstraction: Medium-high - keyframes in continuous motion

Characteristics:

  • Continuous but segmentable
  • Like video keyframes - discrete points but perceived as continuous
  • Workflow phases

Software Example:
```
Flow: Development Workflow
Requirements → Design → Implementation → Testing → Deployment
→ Segmented but continuous flow
→ Phases blend into each other
```

Layer 3: Process - Discrete Units

Temporal Nature: Bounded transformations with clear I/O
Physical Analogy: Dams and locks in the river
Core Question: What specific transformation happens?
Continuity Level: Low - discrete events with boundaries
Abstraction: Medium-low - specific procedures

Characteristics:

  • Clear start and end
  • Input → Transformation → Output
  • Like function calls - discrete but ordered
  • Specific procedures

Software Example:
```
Process: Code Review Process

  1. Submit PR
  2. Automated checks
  3. Reviewer comments
  4. Author responds
  5. Approval/rejection
    → Discrete bounded unit
    → Clear entry and exit points
    ```

Layer 4: Step - Atomic Operations

Temporal Nature: Indivisible actions
Physical Analogy: Individual water molecules
Core Question: What exact command do I execute?
Continuity Level: Zero - completely discrete
Abstraction: Lowest - concrete operations

Characteristics:

  • Cannot be further divided
  • Single executable actions
  • Checklist items
  • Like CPU instructions - atomic

Software Example:
```
Step: "Run `pnpm test`"
Step: "Click 'Approve' button"
→ Atomic, indivisible actions
→ Direct execution
```


Part IV: Philosophical Foundations

4.1 Continuity and Discreteness in Philosophy

The dynamic dimension's progression from continuity to discreteness has deep philosophical roots:

Bergson's Duration Philosophy (Most Relevant)

Henri Bergson distinguished between:

  • Duration (durée): True continuous time - lived experience
  • Clock time: Artificially segmented discrete time - for measurement

"Real time is an indivisible continuous flow. We segment it into discrete pieces for understanding and operation, but this is a simplification of reality."

Mapping to our layers:
```
Duration (true continuity) = Path
↓ Human segmentation for comprehension
Clock time (discrete) = Flow → Process → Step
```

Whitehead's Process Philosophy

Alfred North Whitehead's Process Philosophy:

  • Reality is not "things that exist" but "processes that happen"
  • Actual Occasions: Discrete events
  • Creative Advance: Continuous process

```
Creative advance (continuous) → Actual occasions (discrete) → New creative advance
```

Mirrors our: `Path → Flow → Process → Step`

Hegelian Dialectics: Quantity to Quality

Hegel's dialectical transformation:

  • Quantitative change: Continuous accumulation
  • Qualitative leap: Discrete transformation point
  • Negation of negation: New continuous process

```
Continuous quantity accumulation → Discrete quality leap → New continuity
```

Zeno's Paradoxes

Zeno of Elea explored the continuity-discreteness problem:

  • Achilles and the Tortoise: Can continuous motion be described by discrete points?
  • Arrow Paradox: Is time continuous or discrete instants?

This ancient question remains at the heart of our abstraction: How do we represent continuous reality through discrete descriptions?

Eastern Philosophy: The I Ching

易经 (I Ching) embodies continuity-discreteness unity:

  • 道 (Dao): Continuous change (like Path)
  • 卦 (Hexagrams): 64 discrete states (like Process)
  • 爻 (Lines): Smallest units of change (like Step)

```
道 (continuous) → 卦 (discrete states) → 爻 (atomic changes)
```

4.2 The Subjective-Objective Dimension

Static layers map to idealism-materialism spectrum:

Layer Philosophical Nature Reason
Philosophy Subjective (Idealistic) Based on beliefs and values
Principles Objective (Materialistic) Based on system laws and constraints
Patterns Subjective-Objective Unity Requires judgment within constraints
Conventions Objective (Mechanistic) Fully specifiable rules

This mirrors Marxist epistemology:
```
Worldview (subjective will)

Methodology (objective laws)

Practice (unity of theory and practice)

Specific Practice (concrete actions)
```

4.3 Aristotle's Four Causes

Aristotelian causation maps perfectly to our static layers:

Cause Question Layer
Final Cause Why does it exist? Philosophy
Formal Cause What is its essence? Principles
Efficient Cause How is it made? Patterns
Material Cause What is it made of? Conventions

Part V: Practical Application

5.1 Layer Selection Matrix

For AI Agents:

Task Static Layer Dynamic Layer
Understand project vision Philosophy Path
Make architectural decisions Principles Flow
Design a new module Patterns Process
Write specific code Conventions Step
Plan project roadmap Philosophy + Principles Path
Create workflow Principles Flow
Document procedure Patterns Process
Create checklist Conventions Step

5.2 Documentation Structure

Proposed Directory Structure:

```
docs/
├── README.md # Navigation hub

├── structure/ # Static Dimension
│ ├── philosophy.md # The Point
│ ├── principles.md # The Lines
│ ├── patterns/ # The Framework
│ │ ├── core-vs-domain.md
│ │ └── ...
│ └── conventions.md # The Solid

├── process/ # Dynamic Dimension
│ ├── path.md # Complete Continuity
│ ├── flow.md # Segmented Continuity
│ ├── procedures/ # Discrete Units
│ │ ├── creating-module.md
│ │ └── code-review.md
│ └── checklists/ # Atomic Operations
│ ├── pr-checklist.md
│ └── release-checklist.md

├── architecture/ # Architectural Decisions
│ ├── overview.md
│ └── decisions/ # ADRs

├── guides/ # How-to guides
└── reference/ # Reference materials
```

5.3 Why Projects Fail: Layer Incompleteness

Missing Layer Consequence Example
No Philosophy No direction, inconsistent decisions "Why are we building this?"
No Principles Architectural chaos Dependencies become circular
No Patterns Constant reinvention Every module designed from scratch
No Conventions Inconsistent codebase Every developer has different style
No Path No vision Team doesn't know the destination
No Flow Chaotic workflow No clear process
No Process Ad-hoc operations Everything is custom
No Steps Ambiguous execution "How exactly do I do this?"

Successful projects must complete all layers in both dimensions.


Part VI: Comparison with Existing Frameworks

6.1 Diátaxis Framework

Diátaxis Category Our Mapping
Explanation (Understanding) Philosophy + Principles
How-to Guides (Problem-solving) Patterns + Process
Reference (Information) Conventions + Step
Tutorial (Learning) Path + Flow

6.2 arc42 Documentation

arc42 Section Our Mapping
Section 1 (Introduction) Philosophy + Path
Section 3 (Context) Principles
Section 5 (Building Blocks) Patterns
Section 8 (Concepts) All Structure layers
Section 9 (Decisions) ADRs reference all layers
Section 12 (Glossary) Conventions + Step

6.3 C4 Model

C4 Level Our Mapping
Context Philosophy + Principles
Container Principles + Patterns
Component Patterns
Code Conventions

Part VII: Theoretical Completeness

7.1 Why Four Layers?

Mathematical/Philosophical Necessity:

  1. Zero Point (Origin): Philosophy/Path - the beginning
  2. One Dimension (Direction): Principles/Flow - vector from origin
  3. Multiple Dimensions (Structure): Patterns/Process - complex relationships
  4. Filled Space (Complete): Conventions/Step - full specification

Information Theory Perspective:

  • Each layer reduces entropy (increases specificity)
  • From maximum entropy (philosophy) to zero entropy (conventions)
  • From maximum continuity (path) to zero continuity (step)

7.2 Dual Dimension Necessity

Why both Static and Dynamic?

  • Static alone: Describes structure but not behavior
  • Dynamic alone: Describes behavior without foundation
  • Together: Complete system description

Like physics needs both:

  • Space: Static structure
  • Time: Dynamic process
  • Spacetime: Complete reality

7.3 Abstraction as Information Compression

Both dimensions represent progressive information decompression:

Static:
```
Philosophy: 1 bit (one idea)
↓ expand
Principles: ~10 bits (a few rules)
↓ expand
Patterns: ~100 bits (multiple templates)
↓ expand
Conventions: ~1000+ bits (complete specification)
```

Dynamic:
```
Path: 1 segment (A→B)
↓ segment
Flow: ~10 segments (major phases)
↓ segment
Process: ~100 segments (procedures)
↓ segment
Step: ~1000+ segments (all actions)
```


Conclusion

This dual-dimension abstraction system provides:

  1. Theoretical completeness: Grounded in philosophy from Aristotle to Bergson
  2. Practical utility: Clear guidance for both humans and AI
  3. Natural mapping: Mirrors how software is actually built
  4. Information efficiency: Load only necessary abstraction level
  5. Extensibility: Can be applied to any domain beyond software

The system is not arbitrary but emerges from fundamental principles:

  • Spatial expansion: Point → Solid
  • Temporal segmentation: Continuity → Discreteness
  • Information concretization: Abstract → Concrete

This completes the theoretical foundation for AI-native documentation architecture.


References

Philosophy

  • Bergson, H. (1889). Time and Free Will
  • Whitehead, A.N. (1929). Process and Reality
  • Hegel, G.W.F. (1812). Science of Logic
  • Aristotle. Physics and Metaphysics
  • I Ching (易经)

Documentation Standards

Related Theory

  • Information Theory (Shannon)
  • Systems Theory (von Bertalanffy)
  • Complexity Theory (Holland)

Related Issues

This issue completes the theoretical foundation explored in #5.

Implementation will be tracked separately.

Closes:

Labels

`documentation`, `theory`, `enhancement`

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions