Part of the AIURM Protocol: the fields described here follow the governance skill v0.3 and may change.
What a governance file is
A governance file is the pipeline definition of a project. It is one plain-text file that tells the executor:
- what the project is;
- which data it consumes;
- which logic it applies;
- which results it must produce, and in which order;
- under which configuration it runs;
- which environment projects handle audit, log, exceptions and code.
The governance file is an index, not a store. It lists markers that point to data and logic; the content of each one lives in its own artifact inside a session. A governance file never carries data, rules or results inline.
There is one governance file per project, at a fixed place:
There is one governance file per project, at a fixed place:```{aiuar_root}/{contextspace}/{entity}/{project}/governance/aiurm_governance_{project}.txt```An executor runs it by address:```execute **project_portfolio_risk_v02*aiurm_governance_portfolio_risk_v02```
The five sections
A governance file has five sections, always in this order.
| Section | What it holds |
|---|---|
| Header | The protocol lines, the workflow name and version, and the purpose of the pipeline |
| Governance | The configuration fields, closed by the governance marker [*aiurm_governance_{project}] #0 |
| Data | The data markers the project uses, one per line (*data_x) |
| Logic | The logic markers the project uses, one per line (*logic_x) |
| Result | The steps: each one applies a logic to data and assigns a result marker |
Standard fields
Address fields
These fields say where the project lives and where each kind of artifact is read or written.
| Field | Meaning |
|---|---|
as_of | Reference date of the governance definition |
substrate_type | Where the project is stored: FILESYSTEM, JSON_FILE, MARKDOWN_FILE |
aiuar_root | Physical anchor of the context space, resolved by the executor |
aiuar | Full AIUAR address of the active session |
aiuar_data_source | Session where data is read. Default: aiuar |
aiuar_logic_source | Session where logic is read. Default: aiuar |
aiuar_result_output | Session where results are written. Default: aiuar. With **session_{n}+1, each execution writes to a new session |
execution_id | Identifier generated for each execution, for example 20260327_a3f7b2 |
Because data, logic and results each have their own address, a project can read its rules from one session and write every execution to a new one, by changing a single line.
Common optional fields
| Field | Examples |
|---|---|
policy_version | "HRPOL_V1" |
response_contract | STRUCTURED_OUTPUT_REQUIRED |
output_result_format | JSON, TEXT |
runtime | python, native |
execution_trigger | python_runtime, manual |
audit_level | FULL, MINIMAL |
audit_policy | LOG_EACH_RESULT_STEP |
language_policy_default | EN, PT |
schema_mode | restrict, permissive |
aiurm_markers_location | IN_JSON_BODY, INLINE |
When output_result_format = JSON and aiurm_markers_location = IN_JSON_BODY are both declared, every result artifact starts with its own identity and location:
{ "aiurm_marker": "[*result_x]", "aiuar_address": "*****contextspace****entity***project**session*result_x"}
Resolution mode
A capable executor can resolve almost any step by writing code. The numbers come out right, and nobody has looked at the data. The resolution mode lets the author declare, step by step, where the model’s own look is required and where calculation is enough.
| Mode | The model’s attention passes over | In practice |
|---|---|---|
INFERENCE | the rule, the data and the result | The model reads the data and resolves the step by its own reasoning. Code only reads and writes artifacts |
HYBRID | the rule, and the inputs and outputs of the computation | Code does the arithmetic. The model keeps the judgment, examines what comes out and records what it observes |
DETERMINISTIC | the rule only | The model translates the rule into code and runs it. No observation is contracted |
AUTO | chosen by the executor | The executor picks one of the three modes for the step and records its choice |
The mode is declared in two places:
- per project, with the field
resolution_mode_default; - per step, as a suffix on the result marker line:
[*result_x] #3 HYBRID.
The step suffix takes precedence over the project default. When neither is present, the step is resolved as AUTO.
The audit record of each step states the mode actually used (resolution_applied) and, for INFERENCE and HYBRID, what the model noticed (ai_observation). If a step is resolved differently from what was declared, the executor records the deviation and its reason. The contract forbids silence, not deviation.
Environment fields
Audit, log, exception and code records are not stored inside the project. Each one is handled by an environment project, and the governance says which.
| Field | Handles |
|---|---|
project_audit | Audit records of completed steps |
project_log | One log record per step, with its status |
project_exception | Failed, aborted or unresolvable steps |
project_code | Code and other support material generated during the execution |
Each field holds the address of the environment project’s own governance:
project_audit = *****contextspace_environment****tracker***project_audit*aiurm_governance_project_audit
The executor follows that address, reads the environment project’s governance and writes where it says. This indirection is what lets the environment grow or change without touching the projects that use it: pointing a project to a different environment governance changes how its audit, log or code is handled.
Project-specific fields
A governance may carry fields that the skill does not list. They are valid as part of that project’s contract and are preserved when the file is read or rewritten.
Data and Logic declarations
The Data and Logic sections declare AIURM markers. Each marker stands for an artifact that lives outside the governance file and is reached by its AIUAR address.
# Data*data_macro_context
To resolve *data_macro_context, the executor joins the session declared in aiuar_data_source with the marker name. The result is the full address of the artifact:
*****contextspace_example****adaoaper***project_portfolio_risk_v02**session_1*data_macro_context
On a filesystem substrate, that address is the file session_1/data/data_macro_context.txt. On another substrate the same address resolves to something else: a row in a database table, a key in a JSON document, or a block in any other structured file.
In a text file, the artifact holds the content and ends with the marker that names it (shortened here):
{ "inflation_forecast": 3.2, "market_regime": "Mid-cycle Softening"}[*data_macro_context] #0
The marker can also be carried in a structured form. When the artifact is JSON, it can be a field of the document:
{ "aiurm_marker": "[*data_macro_context] #0", "inflation_forecast": 3.2, "market_regime": "Mid-cycle Softening"}
When the substrate is a database, it is a column of the table that stores the artifacts (see the table structure at the end of this page):
| type | aiurm_marker | content |
|---|---|---|
D | *data_macro_context | { "inflation_forecast": 3.2, "market_regime": "Mid-cycle Softening" } |
A Data or Logic artifact can be declared in three ways:
- by its marker alone, such as
*logic_x. The executor resolves it through the session declared inaiuar_logic_sourcefor logic, oraiuar_data_sourcefor data; - by an address composed in the declaration itself, starting at the level that changes. The levels above it are those of the active governance;
- by its full AIUAR address, which reaches an artifact in any session or project.
The example below declares the same data twice: once from the session given by aiuar_data_source, and once from another session of the same project.
# Data*data_macro_context
The declaration can be between projects or in specific sessions.
**session_1*logic_portfolio_risk_score
A full address names every level:
*****{contextspace}****{entity}***{project}**{session}*logic_x
Results are different only in direction: the execution produces them, writes them to the session declared in aiuar_result_output, and later steps refer to them as *result_x.
Two consequences follow:
- A marker needs both a declaration in the governance and a matching artifact. One without the other cannot be resolved.
- Because access is by address, the content of an artifact can change without touching the governance.
The Result section
Each step has a title, an Apply line and a marker line:
R8. Generate Stress Test Resultsapply *logic_stress_tests to *result_portfolio_data_normalized[*result_stress_test_results] #3 DETERMINISTIC
- The Apply line names one logic and the data or earlier results it is applied to.
- The marker is the identity of the step.
R8is only a label for human reading. #nis the intention suffix: how much detail the result should carry.- The mode suffix is optional and declares how the step must be resolved.
- Steps run in the order they appear in the file.
Complete example
The governance below defines a portfolio-risk workflow with nine data artifacts, fourteen logic artifacts and fourteen result steps. Things to notice:
- data and logic are read from
session_1, and each execution writes its results to a new session; - the project default is
INFERENCE, and ten steps override it with their own mode; - the last four fields of the Governance section point to the environment projects.
# AIURM ProtocolAIURM/AIUAR Context Space Workflow SpecificationDLR Methodology# WorkflowPortfolio Risk (v0.2)Governed Cognitive Workflow - Adversarial Demo Dataset# PurposeEnd-to-end enterprise portfolio-risk workflow: raw portfolio data -> normalization -> features -> scoring -> macro overlay -> behavior -> stress -> policy simulation -> explainability -> audit-ready dashboard -> dependency tree.---# Governanceas_of = "2026-05-31"policy_version = "INVESTMENT_PORTFOLIO_RISK_V02"substrate_type = FILESYSTEMaiuar_root = ...\aiuar\aiuar = *****contextspace_example****adaoaper***project_portfolio_risk_v02**session_1aiuar_logic_source = aiuaraiuar_data_source = aiuaraiuar_result_output = **session_{n}+1resolution_mode_default = INFERENCEexecution_id = {YYYYMMDD}_{random_6}response_contract = STRUCTURED_OUTPUT_REQUIREDoutput_result_format = JSONruntime = pythonexecution_trigger = python_runtimeaudit_level = FULLaudit_policy = LOG_EACH_RESULT_STEPlanguage_policy_default = ENschema_mode = restrictaiurm_markers_location = IN_JSON_BODYproject_audit = *****contextspace_environment****tracker***project_audit*aiurm_governance_project_auditproject_code = *****contextspace_environment****tracker***project_code*aiurm_governance_project_codeproject_log = *****contextspace_environment****tracker***project_log*aiurm_governance_project_logproject_exception = *****contextspace_environment****tracker***project_exception*aiurm_governance_project_exception[*aiurm_governance_portfolio_risk_v02] #0---# Data*data_portfolio_data_raw*data_asset_aliases*data_asset_taxonomy_canonical*data_macro_context*data_param_risk_scoring*data_profile_norms*data_conservative_policy*data_aggressive_policy*data_workflow_scope_investments---# Logic*logic_asset_normalization*logic_portfolio_features*logic_portfolio_risk_score*logic_allocation_proposals*logic_macro_overlay*logic_exec_scenarios*logic_behavioral_risk*logic_stress_tests*logic_policy_conservative*logic_policy_aggressive*logic_structural_xai*logic_policy_comparison*logic_enterprise_dashboard*logic_dependency_tree---# ResultR1. Normalize Portfoliosapply *logic_asset_normalization to *data_portfolio_data_raw and *data_asset_aliases and *data_asset_taxonomy_canonical and *data_param_risk_scoring[*result_portfolio_data_normalized] #3 HYBRIDR2. Extract Portfolio Featuresapply *logic_portfolio_features to *result_portfolio_data_normalized[*result_portfolio_features] #3 DETERMINISTICR3. Score Portfoliosapply *logic_portfolio_risk_score to *result_portfolio_features and *data_param_risk_scoring and *data_profile_norms[*result_portfolio_risk_analysis] #3 HYBRIDR4. Generate Allocation Proposalsapply *logic_allocation_proposals to *result_portfolio_features and *data_profile_norms[*result_portfolio_proposals] #2 AUTOR5. Generate Macro Overlayapply *logic_macro_overlay to *result_portfolio_features and *result_portfolio_risk_analysis and *data_macro_context[*result_macro_overlay] #3 HYBRIDR6. Generate Executive What-If Outcomesapply *logic_exec_scenarios to *result_portfolio_features and *data_macro_context[*result_exec_outcomes] #2R7. Generate Behavioral Risk Outcomesapply *logic_behavioral_risk to *result_portfolio_features and *data_profile_norms[*result_behavioral_risk] #3 HYBRIDR8. Generate Stress Test Resultsapply *logic_stress_tests to *result_portfolio_data_normalized[*result_stress_test_results] #3 DETERMINISTICR9. Generate Conservative Policy Simulationapply *logic_policy_conservative to *result_portfolio_data_normalized and *result_portfolio_features and *data_conservative_policy[*result_conservative_outcomes] #3 HYBRIDR10. Generate Aggressive Policy Simulationapply *logic_policy_aggressive to *result_portfolio_data_normalized and *result_portfolio_features and *data_aggressive_policy[*result_aggressive_outcomes] #3 HYBRIDR11. Generate Explainabilityapply *logic_structural_xai to *result_portfolio_risk_analysis and *result_portfolio_features and *result_macro_overlay and *result_behavioral_risk and *result_stress_test_results and *result_conservative_outcomes and *result_aggressive_outcomes[*result_portfolio_explainability] #3R12. Compare Policiesapply *logic_policy_comparison to *result_conservative_outcomes and *result_aggressive_outcomes and *result_macro_overlay and *result_behavioral_risk and *result_stress_test_results[*result_policy_comparison] #3R13. Generate Enterprise Dashboardapply *logic_enterprise_dashboard to *result_portfolio_risk_analysis and *result_portfolio_features and *result_macro_overlay and *result_behavioral_risk and *result_stress_test_results and *result_exec_outcomes and *result_policy_comparison[*result_enterprise_risk_dashboard] #2R14. Generate Dependency Treeapply *logic_dependency_tree to *data_workflow_scope_investments[*result_dependency_tree_investments_dot] #3---# End of pipeline definition
Example of Data
{ "policy_mode": "Auto", "scoring_mode": "STRICT_DISCRETE_BUCKETS", "interpolation_allowed": false, "bucket_tie_breaker": "FLOOR_TO_RISKIER_BUCKET", "data_quality_tolerance_pct": 0.5, "bucket_rules": { "diversification": [25, 18, 12, 5], "sector_concentration": [20, 12, 5], "liquidity": [15, 10, 5], "profile_alignment": [10, 6, 2] }, "weights": { "asset_stability": 0.30, "diversification": 0.25, "sector_concentration": 0.20, "liquidity": 0.15, "profile_alignment": 0.10 }, "rounding": { "component_points": "NO_ROUNDING", "final_score": "ROUND_1_DECIMAL", "weights_pct": "ROUND_2_DECIMALS" }}[*data_param_risk_scoring] #0
Example of Logic
Purpose: materialize a canonical portfolio representation before any scoring.Rules:1) Resolve each raw holding asset label through *data_asset_aliases.2) Replace raw type, sector, stability, stress, liquidity, and behavioral tags with values from *data_asset_taxonomy_canonical.3) Aggregate duplicate holdings that resolve to the same canonical asset_id.4) computed_total_value = SUM(normalized holding values).5) total_variance_pct = ABS(reported_total_value - computed_total_value) / computed_total_value * 100.6) If total_variance_pct > *data_param_risk_scoring.data_quality_tolerance_pct, record data_quality_flag = "REPORTED_TOTAL_MISMATCH".7) Use computed_total_value as the denominator for all downstream calculations.8) Preserve an alias_trace list and a normalization_override list for audit.9) No unsupported asset label may be silently classified. If an alias is absent, record unresolved_asset and stop downstream calculation for that portfolio.[*logic_asset_normalization] #0
Table structure for a database substrate
The same project can live in a database instead of folders and files. The address notation does not change; only the way it is stored does. Three tables hold the whole hierarchy:
| AIUAR level | Stored in |
|---|---|
*****contextspace | aiuar.contextspace |
****entity | aiuar.entity |
***project | aiuar.project |
| governance | aiuar.governance, the full text of the governance file |
**session | aiuar_session.session |
*data_x | a row in aiuar_dlr with type = 'D' |
*logic_x | a row in aiuar_dlr with type = 'L' |
*result_x | a row in aiuar_dlr with type = 'R' |
This is the structure of the SQLite file in the repository (aiuar.db), declared in governance as substrate_type = SQLITE_FILE:
CREATE TABLE aiuar ( aiuar_id INTEGER PRIMARY KEY AUTOINCREMENT, contextspace TEXT NOT NULL, entity TEXT NOT NULL, project TEXT NOT NULL, governance TEXT NOT NULL, UNIQUE (contextspace, entity, project));CREATE TABLE aiuar_session ( aiuar_session_id INTEGER PRIMARY KEY AUTOINCREMENT, aiuar_id INTEGER NOT NULL REFERENCES aiuar(aiuar_id), session TEXT NOT NULL, UNIQUE (aiuar_id, session));CREATE TABLE aiuar_dlr ( aiuar_dlr_id INTEGER PRIMARY KEY AUTOINCREMENT, aiuar_session_id INTEGER NOT NULL REFERENCES aiuar_session(aiuar_session_id), type TEXT NOT NULL CHECK (type IN ('D', 'L', 'R')), aiurm_marker TEXT NOT NULL, content TEXT NOT NULL);
Each project is one row in aiuar, with its governance stored as text. Each session is one row in aiuar_session. Every data, logic and result artifact is one row in