The os
directory contains the high-level operating system modules for PrimeOS. These modules build upon the core axioms and kernel capabilities to provide practical functionality for applications and users.
The operating system layer serves as the interface between applications and the lower-level capabilities of PrimeOS. It provides standardized, practical utilities that most applications will need, built on the mathematical foundations of the core layer.
The model
module defines the standard pattern for all PrimeOS modules, establishing a consistent interface, lifecycle, and behavior. It's the foundation upon which other modules are built.
The logging
module provides standardized logging capabilities for all PrimeOS components, with support for different log levels, formats, and destinations. It follows the model pattern for consistent integration with other modules.
Key features:
- Log level filtering
- Multiple output destinations
- Structured logging
- Performance monitoring
- Integration with other PrimeOS modules
The testing
module will offer utilities for testing PrimeOS components, including mocks, assertions, and integration testing tools.
The modelling
module will provide higher-level abstractions for defining and working with data models in PrimeOS applications, building on the core prime-based representation.
The OS layer modules are designed to work together seamlessly:
┌─────────────────────────────────────────────────────────────┐
│ Applications │
└───────────────────────────┬─────────────────────────────────┘
│
┌───────────────────────────▼─────────────────────────────────┐
│ OS Layer │
│ │
│ ┌─────────────┐ ┌──────────┐ ┌─────────┐ ┌───────────┐ │
│ │ Model │ │ Logging │ │ Testing │ │ Modelling │ │
│ └─────────────┘ └──────────┘ └─────────┘ └───────────┘ │
└───────────────────────────┬─────────────────────────────────┘
│
┌───────────────────────────▼─────────────────────────────────┐
│ Kernel Layer │
└───────────────────────────┬─────────────────────────────────┘
│
┌───────────────────────────▼─────────────────────────────────┐
│ Core Layer │
└─────────────────────────────────────────────────────────────┘
When developing OS-layer modules:
- Follow the Model Pattern: All modules should implement the ModelInterface
- Consistent API Design: Follow established patterns for method naming and behavior
- Documentation: Include comprehensive README.md and code documentation
- Testing: Provide extensive test coverage
- Configurable: Support options for customizing behavior
-
Create the module using the template system:
npm run create-module -- --name=module-name --path=os
-
Define the interface in
types.ts
-
Implement the core functionality in
index.ts
-
Write tests in
test.ts
-
Document usage in
README.md