@neuroverseos/governance 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/.well-known/ai-plugin.json +26 -0
  2. package/.well-known/mcp.json +68 -0
  3. package/AGENTS.md +219 -0
  4. package/README.md +84 -4
  5. package/dist/adapters/autoresearch.cjs +196 -0
  6. package/dist/adapters/autoresearch.d.cts +103 -0
  7. package/dist/adapters/autoresearch.d.ts +103 -0
  8. package/dist/adapters/autoresearch.js +7 -0
  9. package/dist/adapters/deep-agents.cjs +1472 -0
  10. package/dist/adapters/deep-agents.d.cts +181 -0
  11. package/dist/adapters/deep-agents.d.ts +181 -0
  12. package/dist/adapters/deep-agents.js +17 -0
  13. package/dist/adapters/express.cjs +103 -21
  14. package/dist/adapters/express.d.cts +1 -1
  15. package/dist/adapters/express.d.ts +1 -1
  16. package/dist/adapters/express.js +3 -3
  17. package/dist/adapters/index.cjs +649 -109
  18. package/dist/adapters/index.d.cts +4 -1
  19. package/dist/adapters/index.d.ts +4 -1
  20. package/dist/adapters/index.js +39 -13
  21. package/dist/adapters/langchain.cjs +152 -48
  22. package/dist/adapters/langchain.d.cts +5 -5
  23. package/dist/adapters/langchain.d.ts +5 -5
  24. package/dist/adapters/langchain.js +4 -3
  25. package/dist/adapters/openai.cjs +154 -50
  26. package/dist/adapters/openai.d.cts +5 -5
  27. package/dist/adapters/openai.d.ts +5 -5
  28. package/dist/adapters/openai.js +4 -3
  29. package/dist/adapters/openclaw.cjs +152 -48
  30. package/dist/adapters/openclaw.d.cts +5 -5
  31. package/dist/adapters/openclaw.d.ts +5 -5
  32. package/dist/adapters/openclaw.js +4 -3
  33. package/dist/{build-P42YFKQV.js → build-X5MZY4IA.js} +2 -2
  34. package/dist/{chunk-2NICNKOM.js → chunk-4L6OPKMQ.js} +1 -1
  35. package/dist/chunk-5U2MQO5P.js +57 -0
  36. package/dist/{chunk-SKU3GAPD.js → chunk-6BB55YJI.js} +16 -34
  37. package/dist/{chunk-KEST3MWO.js → chunk-AF2VX4AL.js} +47 -8
  38. package/dist/chunk-BQZMOEML.js +43 -0
  39. package/dist/chunk-D2UCV5AK.js +326 -0
  40. package/dist/{chunk-RWXVAH6P.js → chunk-EVDJUSZ2.js} +16 -34
  41. package/dist/{chunk-4JRYGIO7.js → chunk-IZSO75NZ.js} +72 -7
  42. package/dist/chunk-JCKSW2PZ.js +304 -0
  43. package/dist/{chunk-PDOZHZWL.js → chunk-KTFTTLTP.js} +25 -4
  44. package/dist/{chunk-MWDQ4MJB.js → chunk-MH7BT4VH.js} +5 -1
  45. package/dist/{chunk-4QXB6PEO.js → chunk-QLPTHTVB.js} +37 -16
  46. package/dist/{chunk-QPASI2BR.js → chunk-REXY4LUL.js} +49 -10
  47. package/dist/chunk-T5EUJQE5.js +172 -0
  48. package/dist/{chunk-DPVS43ZT.js → chunk-TTBKTF3P.js} +5 -5
  49. package/dist/{chunk-OHAC6HJE.js → chunk-ZIVQNSZU.js} +16 -36
  50. package/dist/{chunk-BUWWN2NX.js → chunk-ZJTDUCC2.js} +9 -7
  51. package/dist/cli/neuroverse.cjs +2582 -493
  52. package/dist/cli/neuroverse.js +39 -15
  53. package/dist/cli/plan.cjs +119 -32
  54. package/dist/cli/plan.js +5 -13
  55. package/dist/cli/run.cjs +223 -24
  56. package/dist/cli/run.js +2 -2
  57. package/dist/decision-flow-LETV5NWY.js +61 -0
  58. package/dist/{derive-TLIV4OOU.js → derive-7365SUFU.js} +2 -2
  59. package/dist/{doctor-QV6HELS5.js → doctor-QYISMKEL.js} +5 -2
  60. package/dist/equity-penalties-63FGB3I2.js +244 -0
  61. package/dist/{explain-IDCRWMPX.js → explain-A2EWI2OL.js} +4 -23
  62. package/dist/{guard-GFLQZY6U.js → guard-3BWL3IGH.js} +6 -10
  63. package/dist/{guard-contract-Cm91Kp4j.d.ts → guard-contract-C9_zKbzd.d.cts} +117 -5
  64. package/dist/{guard-contract-Cm91Kp4j.d.cts → guard-contract-C9_zKbzd.d.ts} +117 -5
  65. package/dist/{guard-engine-JLTUARGU.js → guard-engine-QFMIBWJY.js} +2 -2
  66. package/dist/{impact-XPECYRLH.js → impact-UB6DXKSX.js} +4 -4
  67. package/dist/{improve-GPUBKTEA.js → improve-XZA57GER.js} +5 -24
  68. package/dist/index.cjs +592 -44
  69. package/dist/index.d.cts +218 -5
  70. package/dist/index.d.ts +218 -5
  71. package/dist/index.js +92 -41
  72. package/dist/infer-world-7GVZWFX4.js +543 -0
  73. package/dist/init-world-VWMQZQC7.js +223 -0
  74. package/dist/{mcp-server-LZVJHBT5.js → mcp-server-XWQZXNW7.js} +3 -3
  75. package/dist/{playground-FGOMASHN.js → playground-ADWZORNV.js} +2 -2
  76. package/dist/{redteam-SK7AMIG3.js → redteam-JRQ7FD2F.js} +2 -2
  77. package/dist/{session-VISISNWJ.js → session-MMYX5YCF.js} +4 -3
  78. package/dist/shared--Q8wPBVN.d.ts +60 -0
  79. package/dist/shared-HpAG90PX.d.cts +60 -0
  80. package/dist/shared-U2QFV7JH.js +16 -0
  81. package/dist/{simulate-VDOYQFRO.js → simulate-GMIFFXYV.js} +5 -30
  82. package/dist/{test-75AVHC3R.js → test-JBBZ65X4.js} +2 -2
  83. package/dist/{trace-JVF67VR3.js → trace-3MYWIDEF.js} +3 -3
  84. package/dist/worlds/autoresearch.nv-world.md +230 -0
  85. package/dist/worlds/coding-agent.nv-world.md +211 -0
  86. package/llms.txt +79 -0
  87. package/openapi.yaml +230 -0
  88. package/package.json +26 -4
  89. package/dist/{chunk-GR6DGCZ2.js → chunk-BMOXICAB.js} +3 -3
  90. package/dist/{chunk-NF5POFCI.js → chunk-ORJ3NOE6.js} +3 -3
  91. package/dist/{world-LAXO6DOX.js → world-BFJCIQSH.js} +3 -3
@@ -0,0 +1,230 @@
1
+ ---
2
+ world_id: autoresearch
3
+ name: Autoresearch Governance
4
+ version: 1.0.0
5
+ runtime_mode: SIMULATION
6
+ default_profile: conservative
7
+ alternative_profile: exploratory
8
+ ---
9
+
10
+ # Thesis
11
+
12
+ Autonomous AI research loops must operate within structured governance: experiments are reproducible, metrics are tracked, compute budgets are enforced, and agents cannot drift beyond their declared research context. A research world without constraints produces noise, not knowledge.
13
+
14
+ # Invariants
15
+
16
+ - `experiments_must_be_reproducible` — Every experiment must log architecture, hyperparameters, dataset, and training config sufficient to reproduce results (structural, immutable)
17
+ - `metrics_must_be_recorded` — Every training run must produce at least one evaluation metric; runs without metrics are invalid (structural, immutable)
18
+ - `dataset_must_be_declared` — The dataset used for training and evaluation must be explicitly declared and never changed without governance approval (structural, immutable)
19
+ - `goal_must_be_defined` — The optimization goal (metric + direction) must be defined before any experiment runs (structural, immutable)
20
+ - `no_data_leakage` — Training data must never contaminate evaluation data; train/val/test splits must be fixed (structural, immutable)
21
+ - `compute_budget_enforced` — Experiments must respect declared compute limits; exceeding budget halts the loop (structural, immutable)
22
+ - `architecture_constraints_honored` — If the research context declares architectural constraints, experiments must satisfy them (prompt, immutable)
23
+
24
+ # State
25
+
26
+ ## experiments_run
27
+ - type: number
28
+ - min: 0
29
+ - max: 10000
30
+ - step: 1
31
+ - default: 0
32
+ - label: Experiments Run
33
+ - description: Total number of experiments completed in this research loop
34
+
35
+ ## best_metric_value
36
+ - type: number
37
+ - min: -1000
38
+ - max: 1000
39
+ - step: 0.01
40
+ - default: 100
41
+ - label: Best Metric Value
42
+ - description: Best value achieved for the primary evaluation metric
43
+
44
+ ## keep_rate
45
+ - type: number
46
+ - min: 0
47
+ - max: 100
48
+ - step: 1
49
+ - default: 0
50
+ - label: Keep Rate
51
+ - description: Percentage of experiments that improved upon the previous best result
52
+
53
+ ## compute_used_minutes
54
+ - type: number
55
+ - min: 0
56
+ - max: 100000
57
+ - step: 1
58
+ - default: 0
59
+ - label: Compute Used (minutes)
60
+ - description: Total wall-clock training time consumed across all experiments
61
+
62
+ ## compute_budget_minutes
63
+ - type: number
64
+ - min: 0
65
+ - max: 100000
66
+ - step: 60
67
+ - default: 1440
68
+ - label: Compute Budget (minutes)
69
+ - description: Maximum allowed wall-clock training time for the research loop
70
+
71
+ ## research_context_drift
72
+ - type: number
73
+ - min: 0
74
+ - max: 100
75
+ - step: 1
76
+ - default: 0
77
+ - label: Context Drift
78
+ - description: Degree to which recent experiments have diverged from the declared research context. 0 = on-topic. 100 = unrelated.
79
+
80
+ ## metric_improvement_rate
81
+ - type: number
82
+ - min: 0
83
+ - max: 100
84
+ - step: 1
85
+ - default: 0
86
+ - label: Improvement Rate
87
+ - description: Rate of metric improvement over the last 10 experiments. 0 = stagnant. 100 = rapid improvement.
88
+
89
+ ## failed_experiments
90
+ - type: number
91
+ - min: 0
92
+ - max: 10000
93
+ - step: 1
94
+ - default: 0
95
+ - label: Failed Experiments
96
+ - description: Number of experiments that crashed, timed out, or produced no valid metrics
97
+
98
+ # Assumptions
99
+
100
+ ## conservative
101
+ - name: Conservative Research
102
+ - description: Prioritize reproducibility and careful iteration. Small architectural changes per experiment. Strict compute limits. Reject experiments that drift from the research context.
103
+ - iteration_style: incremental
104
+ - drift_tolerance: low
105
+ - compute_strictness: high
106
+ - failure_tolerance: low
107
+
108
+ ## exploratory
109
+ - name: Exploratory Research
110
+ - description: Allow broader architectural exploration. Larger jumps between experiments. More lenient compute budget. Accept higher context drift if metrics improve.
111
+ - iteration_style: explorative
112
+ - drift_tolerance: moderate
113
+ - compute_strictness: moderate
114
+ - failure_tolerance: moderate
115
+
116
+ # Rules
117
+
118
+ ## rule-001: Compute Budget Exhausted (structural)
119
+ When compute budget is exceeded, the research loop must halt. No further experiments are allowed.
120
+
121
+ When compute_used_minutes > compute_budget_minutes [state]
122
+ Then research_viability *= 0.00
123
+ Collapse: research_viability < 0.05
124
+
125
+ > trigger: Compute usage exceeds declared budget — no training time remains.
126
+ > rule: Unbounded compute makes research ungovernable. The budget is a hard constraint, not a suggestion.
127
+ > shift: Research loop halts. Final results are reported. No new experiments start.
128
+ > effect: Research viability set to zero. Loop terminated.
129
+
130
+ ## rule-002: High Failure Rate (degradation)
131
+ Too many failed experiments indicate a systemic problem — bad code, misconfigured environment, or impossible architecture.
132
+
133
+ When failed_experiments > 5 [state] AND experiments_run > 0 [state]
134
+ Then research_viability *= 0.50
135
+
136
+ > trigger: More than 5 experiments have failed — possible systemic issue.
137
+ > rule: Failures consume compute without producing knowledge. High failure rates signal infrastructure problems, not research progress.
138
+ > shift: Research viability degrades. Agent should investigate root cause before continuing.
139
+ > effect: Research viability reduced to 50%.
140
+
141
+ ## rule-003: Context Drift Warning (degradation)
142
+ Experiments diverging from the declared research context waste compute and produce irrelevant results.
143
+
144
+ When research_context_drift > 40 [state]
145
+ Then research_viability *= 0.60
146
+
147
+ > trigger: Context drift above 40% — experiments are straying from the research topic.
148
+ > rule: Governance exists to keep research focused. Agents exploring unrelated architectures are not contributing to the declared goal.
149
+ > shift: Research viability degrades. Agent must return to the declared research context.
150
+ > effect: Research viability reduced to 60%.
151
+
152
+ ## rule-004: Metric Stagnation (degradation)
153
+ When experiments stop improving the primary metric, the research approach may need fundamental revision.
154
+
155
+ When metric_improvement_rate < 5 [state] AND experiments_run > 10 [state]
156
+ Then research_viability *= 0.70
157
+
158
+ > trigger: Improvement rate below 5% after 10+ experiments — research may have plateaued.
159
+ > rule: Stagnant metrics indicate diminishing returns from the current approach. The agent should consider a strategy change.
160
+ > shift: Research viability degrades. Agent should try a substantially different approach or conclude the loop.
161
+ > effect: Research viability reduced to 70%.
162
+
163
+ ## rule-005: Strong Progress (advantage)
164
+ Consistent metric improvement validates the research approach and warrants continued investment.
165
+
166
+ When metric_improvement_rate > 30 [state] AND keep_rate > 20 [state]
167
+ Then research_viability *= 1.20
168
+
169
+ > trigger: Improvement rate above 30% with keep rate above 20% — research is productive.
170
+ > rule: Productive research should be encouraged. Strong metric trends indicate a promising research direction.
171
+ > shift: Research viability improves. Continued experimentation is well-justified.
172
+ > effect: Research viability boosted by 20%.
173
+
174
+ ## rule-006: No Metrics Recorded (structural)
175
+ An experiment that produces no evaluation metrics is invalid and must not count as progress.
176
+
177
+ When experiments_run > 0 [state] AND best_metric_value == 100 [state]
178
+ Then research_viability *= 0.30
179
+ Collapse: research_viability < 0.05
180
+
181
+ > trigger: Experiments have run but no metric improvement from default — metrics may not be recording.
182
+ > rule: Research without measurement is not research. Every experiment must produce at least one evaluation metric.
183
+ > shift: Research viability drops sharply. Agent must fix metric recording before continuing.
184
+ > effect: Research viability reduced to 30%.
185
+
186
+ ## rule-007: Efficient Compute Usage (advantage)
187
+ High keep rate with low compute usage indicates efficient research methodology.
188
+
189
+ When keep_rate > 30 [state] AND compute_used_minutes < compute_budget_minutes [state]
190
+ Then research_viability *= 1.15
191
+
192
+ > trigger: Keep rate above 30% with compute budget remaining — efficient experimentation.
193
+ > rule: Efficient use of compute demonstrates disciplined research. Not every experiment needs to be expensive.
194
+ > shift: Research viability improves. The research methodology is sustainable.
195
+ > effect: Research viability boosted by 15%.
196
+
197
+ # Gates
198
+
199
+ - BREAKTHROUGH: research_viability >= 90
200
+ - PRODUCTIVE: research_viability >= 60
201
+ - ONGOING: research_viability >= 35
202
+ - STRUGGLING: research_viability > 10
203
+ - HALTED: research_viability <= 10
204
+
205
+ # Outcomes
206
+
207
+ ## research_viability
208
+ - type: number
209
+ - range: 0-100
210
+ - display: percentage
211
+ - label: Research Viability
212
+ - primary: true
213
+
214
+ ## best_metric_value
215
+ - type: number
216
+ - range: -1000-1000
217
+ - display: decimal
218
+ - label: Best Metric Value
219
+
220
+ ## keep_rate
221
+ - type: number
222
+ - range: 0-100
223
+ - display: percentage
224
+ - label: Keep Rate
225
+
226
+ ## experiments_run
227
+ - type: number
228
+ - range: 0-10000
229
+ - display: integer
230
+ - label: Experiments Run
@@ -0,0 +1,211 @@
1
+ ---
2
+ world_id: coding-agent
3
+ name: Coding Agent Governance
4
+ version: 1.0.0
5
+ runtime_mode: COMPLIANCE
6
+ default_profile: standard
7
+ alternative_profile: strict
8
+ ---
9
+
10
+ # Thesis
11
+
12
+ Autonomous coding agents that can read files, write code, execute shell commands, and interact with version control require a governance layer. Without enforceable rules, a single misguided tool call can delete data, leak secrets, break production, or escalate beyond its intended scope. This world defines the boundaries within which a coding agent operates safely.
13
+
14
+ # Invariants
15
+
16
+ - `no_system_destruction` — Agents must never execute commands that destroy system-level resources (recursive force-delete of root paths, disk formatting, fork bombs) (structural, immutable)
17
+ - `no_secret_exposure` — Agents must never read, log, or transmit credentials, API keys, private keys, or environment secrets outside the project boundary (structural, immutable)
18
+ - `no_unauthorized_push` — Agents must never push directly to main or master branches without explicit approval (structural, immutable)
19
+ - `no_scope_escape` — Agents must never access files or execute commands outside the declared project directory (structural, immutable)
20
+ - `no_pipe_to_shell` — Agents must never pipe downloaded content directly into a shell interpreter (structural, immutable)
21
+ - `changes_must_be_reversible` — Every file modification must be recoverable through version control; destructive operations require confirmation (prompt, immutable)
22
+
23
+ # State
24
+
25
+ ## files_modified
26
+ - type: number
27
+ - min: 0
28
+ - max: 100000
29
+ - step: 1
30
+ - default: 0
31
+ - label: Files Modified
32
+ - description: Total number of files written or edited in this session
33
+
34
+ ## files_deleted
35
+ - type: number
36
+ - min: 0
37
+ - max: 100000
38
+ - step: 1
39
+ - default: 0
40
+ - label: Files Deleted
41
+ - description: Total number of files deleted in this session
42
+
43
+ ## shell_commands_run
44
+ - type: number
45
+ - min: 0
46
+ - max: 10000
47
+ - step: 1
48
+ - default: 0
49
+ - label: Shell Commands Run
50
+ - description: Total number of shell commands executed
51
+
52
+ ## dangerous_commands_blocked
53
+ - type: number
54
+ - min: 0
55
+ - max: 10000
56
+ - step: 1
57
+ - default: 0
58
+ - label: Dangerous Commands Blocked
59
+ - description: Number of shell commands blocked by governance rules
60
+
61
+ ## git_pushes
62
+ - type: number
63
+ - min: 0
64
+ - max: 100
65
+ - step: 1
66
+ - default: 0
67
+ - label: Git Pushes
68
+ - description: Number of git push operations executed
69
+
70
+ ## sub_agents_spawned
71
+ - type: number
72
+ - min: 0
73
+ - max: 50
74
+ - step: 1
75
+ - default: 0
76
+ - label: Sub-Agents Spawned
77
+ - description: Number of sub-agent processes created
78
+
79
+ ## scope_violations
80
+ - type: number
81
+ - min: 0
82
+ - max: 1000
83
+ - step: 1
84
+ - default: 0
85
+ - label: Scope Violations
86
+ - description: Number of attempted actions outside the declared project scope
87
+
88
+ # Assumptions
89
+
90
+ ## standard
91
+ - name: Standard Development
92
+ - description: Normal development workflow. File reads are unrestricted. File writes within project scope are allowed. Shell commands are evaluated for safety. Git pushes require feature branches.
93
+ - file_read_policy: unrestricted
94
+ - file_write_policy: project_scope_only
95
+ - shell_policy: safety_evaluated
96
+ - git_policy: feature_branches_only
97
+ - network_policy: restricted
98
+
99
+ ## strict
100
+ - name: Strict Lockdown
101
+ - description: High-security mode. All file writes require confirmation. All shell commands require approval. No network access. No git pushes without explicit authorization.
102
+ - file_read_policy: unrestricted
103
+ - file_write_policy: approval_required
104
+ - shell_policy: approval_required
105
+ - git_policy: approval_required
106
+ - network_policy: blocked
107
+
108
+ # Rules
109
+
110
+ ## rule-001: Destructive Shell Command (structural)
111
+ Shell commands that can cause irreversible system damage must be blocked unconditionally.
112
+
113
+ When shell_commands_run > 0 [state] AND dangerous_commands_blocked > 0 [state]
114
+ Then agent_safety *= 0.50
115
+
116
+ > trigger: Agent attempted a destructive shell command (rm -rf, mkfs, dd, fork bomb, etc.).
117
+ > rule: Destructive commands cannot be undone. No amount of productivity justifies risking system integrity.
118
+ > shift: Agent safety score drops. Continued violations may halt the session.
119
+ > effect: Agent safety reduced by 50%.
120
+
121
+ ## rule-002: Scope Escape Attempt (structural)
122
+ Accessing files or running commands outside the project directory is a governance violation.
123
+
124
+ When scope_violations > 0 [state]
125
+ Then agent_safety *= 0.40
126
+ Collapse: agent_safety < 0.10
127
+
128
+ > trigger: Agent attempted to access resources outside its declared project scope.
129
+ > rule: Agents operate within boundaries. Scope escape indicates either a misconfigured agent or a prompt injection attempt.
130
+ > shift: Agent safety drops sharply. Multiple violations halt the session.
131
+ > effect: Agent safety reduced to 40%.
132
+
133
+ ## rule-003: Excessive File Deletion (degradation)
134
+ Deleting many files in a single session indicates potentially destructive behavior.
135
+
136
+ When files_deleted > 10 [state]
137
+ Then agent_safety *= 0.60
138
+
139
+ > trigger: More than 10 files deleted in a single session.
140
+ > rule: Bulk deletion is rarely intentional in normal development. This warrants review.
141
+ > shift: Agent safety degrades. Remaining deletions may require approval.
142
+ > effect: Agent safety reduced to 60%.
143
+
144
+ ## rule-004: Uncontrolled Sub-Agent Spawning (degradation)
145
+ Too many sub-agents indicate either a runaway loop or poorly scoped task decomposition.
146
+
147
+ When sub_agents_spawned > 10 [state]
148
+ Then agent_safety *= 0.70
149
+
150
+ > trigger: More than 10 sub-agents spawned in a single session.
151
+ > rule: Each sub-agent inherits the parent's capabilities. Uncontrolled spawning multiplies risk.
152
+ > shift: Agent safety degrades. Further spawning may be blocked.
153
+ > effect: Agent safety reduced to 70%.
154
+
155
+ ## rule-005: Clean Session (advantage)
156
+ A session with no violations and productive output validates the governance model.
157
+
158
+ When files_modified > 0 [state] AND scope_violations == 0 [state] AND dangerous_commands_blocked == 0 [state]
159
+ Then agent_safety *= 1.10
160
+
161
+ > trigger: Agent has modified files without triggering any governance violations.
162
+ > rule: Good behavior should be recognized. Clean sessions build trust in the agent's judgment.
163
+ > shift: Agent safety improves slightly. Trust accumulates over clean sessions.
164
+ > effect: Agent safety boosted by 10%.
165
+
166
+ ## rule-006: Unauthorized Push to Protected Branch (structural)
167
+ Pushing to main or master without approval violates version control governance.
168
+
169
+ When git_pushes > 0 [state] AND scope_violations > 0 [state]
170
+ Then agent_safety *= 0.30
171
+ Collapse: agent_safety < 0.10
172
+
173
+ > trigger: Agent pushed to a protected branch without authorization.
174
+ > rule: Protected branches exist for a reason. Direct pushes bypass code review and CI/CD.
175
+ > shift: Agent safety drops critically. Session may be halted.
176
+ > effect: Agent safety reduced to 30%.
177
+
178
+ # Gates
179
+
180
+ - TRUSTED: agent_safety >= 90
181
+ - OPERATING: agent_safety >= 60
182
+ - CAUTIOUS: agent_safety >= 35
183
+ - RESTRICTED: agent_safety > 10
184
+ - HALTED: agent_safety <= 10
185
+
186
+ # Outcomes
187
+
188
+ ## agent_safety
189
+ - type: number
190
+ - range: 0-100
191
+ - display: percentage
192
+ - label: Agent Safety Score
193
+ - primary: true
194
+
195
+ ## files_modified
196
+ - type: number
197
+ - range: 0-100000
198
+ - display: integer
199
+ - label: Files Modified
200
+
201
+ ## dangerous_commands_blocked
202
+ - type: number
203
+ - range: 0-10000
204
+ - display: integer
205
+ - label: Dangerous Commands Blocked
206
+
207
+ ## scope_violations
208
+ - type: number
209
+ - range: 0-1000
210
+ - display: integer
211
+ - label: Scope Violations
package/llms.txt ADDED
@@ -0,0 +1,79 @@
1
+ # NeuroVerse Governance
2
+
3
+ > Deterministic runtime governance for AI agents. No LLM in the evaluation loop.
4
+
5
+ ## What it does
6
+
7
+ NeuroVerse enforces behavioral boundaries on AI agents. Every agent action passes
8
+ through a 6-phase evaluation pipeline and receives an ALLOW, BLOCK, or PAUSE verdict.
9
+ Same event + same rules = same verdict, every time.
10
+
11
+ ## Core concepts
12
+
13
+ - **World**: Permanent governance rules (guards, invariants, kernel rules, roles)
14
+ - **Plan**: Temporary task-scoped constraints layered on top of a world
15
+ - **Guard event**: An action an agent wants to take (intent, tool, scope)
16
+ - **Verdict**: ALLOW, BLOCK, or PAUSE — returned synchronously, no network calls
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ npm install @neuroverseos/governance
22
+ ```
23
+
24
+ ## Quick test (no install required)
25
+
26
+ ```bash
27
+ npx @neuroverseos/governance init
28
+ npx @neuroverseos/governance build
29
+ npx @neuroverseos/governance guard
30
+ ```
31
+
32
+ ## Programmatic usage
33
+
34
+ ```javascript
35
+ import { evaluateGuard, loadWorld } from '@neuroverseos/governance';
36
+
37
+ const world = await loadWorld('./world/');
38
+ const verdict = evaluateGuard({ intent: 'delete user data', tool: 'database' }, world);
39
+ // → { status: 'BLOCK', reason: 'Destructive database operation on protected resource' }
40
+ ```
41
+
42
+ ## Plan enforcement
43
+
44
+ ```javascript
45
+ import { parsePlanMarkdown, evaluatePlan, advancePlan } from '@neuroverseos/governance';
46
+
47
+ const { plan } = parsePlanMarkdown(markdown);
48
+ const verdict = evaluatePlan({ intent: 'write blog post' }, plan);
49
+ // → { status: 'ON_PLAN', matchedStep: 'write_announcement_blog_post' }
50
+
51
+ const result = advancePlan(plan, 'write_announcement_blog_post');
52
+ // → { success: true, plan: <updated> }
53
+ ```
54
+
55
+ Plans support two completion modes:
56
+ - `completion: trust` (default) — caller says "done", step advances
57
+ - `completion: verified` — steps with `[verify: ...]` require evidence to advance
58
+
59
+ ## Adapters
60
+
61
+ - OpenAI function calling: `@neuroverseos/governance/adapters/openai`
62
+ - LangChain callback handler: `@neuroverseos/governance/adapters/langchain`
63
+ - OpenClaw plugin: `@neuroverseos/governance/adapters/openclaw`
64
+ - Express/Fastify middleware: `@neuroverseos/governance/adapters/express`
65
+ - MCP server: `neuroverse mcp --world ./world`
66
+
67
+ ## Evaluation pipeline
68
+
69
+ ```
70
+ Safety → Plan → Roles → Guards → Kernel → Level → Verdict
71
+ ```
72
+
73
+ First BLOCK wins. No async. Pure function.
74
+
75
+ ## Links
76
+
77
+ - npm: https://www.npmjs.com/package/@neuroverseos/governance
78
+ - GitHub: https://github.com/NeuroverseOS/Neuroverseos-governance
79
+ - Website: https://neuroverseos.com