@aiassesstech/grillo 0.1.0

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 (121) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/LICENSE +21 -0
  3. package/README.md +512 -0
  4. package/SKILL.md +87 -0
  5. package/dist/api/server.d.ts +68 -0
  6. package/dist/api/server.d.ts.map +1 -0
  7. package/dist/api/server.js +596 -0
  8. package/dist/api/server.js.map +1 -0
  9. package/dist/audit/audit-log.d.ts +88 -0
  10. package/dist/audit/audit-log.d.ts.map +1 -0
  11. package/dist/audit/audit-log.js +195 -0
  12. package/dist/audit/audit-log.js.map +1 -0
  13. package/dist/certification/certificate.d.ts +80 -0
  14. package/dist/certification/certificate.d.ts.map +1 -0
  15. package/dist/certification/certificate.js +176 -0
  16. package/dist/certification/certificate.js.map +1 -0
  17. package/dist/cli/bin.d.ts +8 -0
  18. package/dist/cli/bin.d.ts.map +1 -0
  19. package/dist/cli/bin.js +12 -0
  20. package/dist/cli/bin.js.map +1 -0
  21. package/dist/cli/config-loader.d.ts +66 -0
  22. package/dist/cli/config-loader.d.ts.map +1 -0
  23. package/dist/cli/config-loader.js +243 -0
  24. package/dist/cli/config-loader.js.map +1 -0
  25. package/dist/cli/runner.d.ts +27 -0
  26. package/dist/cli/runner.d.ts.map +1 -0
  27. package/dist/cli/runner.js +388 -0
  28. package/dist/cli/runner.js.map +1 -0
  29. package/dist/commands/grillo-commands.d.ts +50 -0
  30. package/dist/commands/grillo-commands.d.ts.map +1 -0
  31. package/dist/commands/grillo-commands.js +752 -0
  32. package/dist/commands/grillo-commands.js.map +1 -0
  33. package/dist/commands/inline-commands.d.ts +16 -0
  34. package/dist/commands/inline-commands.d.ts.map +1 -0
  35. package/dist/commands/inline-commands.js +277 -0
  36. package/dist/commands/inline-commands.js.map +1 -0
  37. package/dist/commands/router.d.ts +56 -0
  38. package/dist/commands/router.d.ts.map +1 -0
  39. package/dist/commands/router.js +154 -0
  40. package/dist/commands/router.js.map +1 -0
  41. package/dist/config/defaults.d.ts +9 -0
  42. package/dist/config/defaults.d.ts.map +1 -0
  43. package/dist/config/defaults.js +78 -0
  44. package/dist/config/defaults.js.map +1 -0
  45. package/dist/config/schema.d.ts +573 -0
  46. package/dist/config/schema.d.ts.map +1 -0
  47. package/dist/config/schema.js +142 -0
  48. package/dist/config/schema.js.map +1 -0
  49. package/dist/dashboard/metrics.d.ts +100 -0
  50. package/dist/dashboard/metrics.d.ts.map +1 -0
  51. package/dist/dashboard/metrics.js +282 -0
  52. package/dist/dashboard/metrics.js.map +1 -0
  53. package/dist/dashboard/ui.d.ts +19 -0
  54. package/dist/dashboard/ui.d.ts.map +1 -0
  55. package/dist/dashboard/ui.js +951 -0
  56. package/dist/dashboard/ui.js.map +1 -0
  57. package/dist/discovery/discovery-adapter.d.ts +94 -0
  58. package/dist/discovery/discovery-adapter.d.ts.map +1 -0
  59. package/dist/discovery/discovery-adapter.js +114 -0
  60. package/dist/discovery/discovery-adapter.js.map +1 -0
  61. package/dist/discovery/discovery-service.d.ts +77 -0
  62. package/dist/discovery/discovery-service.d.ts.map +1 -0
  63. package/dist/discovery/discovery-service.js +240 -0
  64. package/dist/discovery/discovery-service.js.map +1 -0
  65. package/dist/drift/detector.d.ts +51 -0
  66. package/dist/drift/detector.d.ts.map +1 -0
  67. package/dist/drift/detector.js +148 -0
  68. package/dist/drift/detector.js.map +1 -0
  69. package/dist/drift/fleet-anomaly.d.ts +28 -0
  70. package/dist/drift/fleet-anomaly.d.ts.map +1 -0
  71. package/dist/drift/fleet-anomaly.js +186 -0
  72. package/dist/drift/fleet-anomaly.js.map +1 -0
  73. package/dist/events/event-bus.d.ts +209 -0
  74. package/dist/events/event-bus.d.ts.map +1 -0
  75. package/dist/events/event-bus.js +184 -0
  76. package/dist/events/event-bus.js.map +1 -0
  77. package/dist/frameworks/framework-registry.d.ts +116 -0
  78. package/dist/frameworks/framework-registry.d.ts.map +1 -0
  79. package/dist/frameworks/framework-registry.js +241 -0
  80. package/dist/frameworks/framework-registry.js.map +1 -0
  81. package/dist/index.d.ts +94 -0
  82. package/dist/index.d.ts.map +1 -0
  83. package/dist/index.js +254 -0
  84. package/dist/index.js.map +1 -0
  85. package/dist/monitoring/continuous-monitor.d.ts +61 -0
  86. package/dist/monitoring/continuous-monitor.d.ts.map +1 -0
  87. package/dist/monitoring/continuous-monitor.js +191 -0
  88. package/dist/monitoring/continuous-monitor.js.map +1 -0
  89. package/dist/notifications/notifier.d.ts +21 -0
  90. package/dist/notifications/notifier.d.ts.map +1 -0
  91. package/dist/notifications/notifier.js +119 -0
  92. package/dist/notifications/notifier.js.map +1 -0
  93. package/dist/notifications/templates.d.ts +14 -0
  94. package/dist/notifications/templates.d.ts.map +1 -0
  95. package/dist/notifications/templates.js +105 -0
  96. package/dist/notifications/templates.js.map +1 -0
  97. package/dist/orchestration/orchestrator.d.ts +99 -0
  98. package/dist/orchestration/orchestrator.d.ts.map +1 -0
  99. package/dist/orchestration/orchestrator.js +426 -0
  100. package/dist/orchestration/orchestrator.js.map +1 -0
  101. package/dist/orchestration/queue.d.ts +17 -0
  102. package/dist/orchestration/queue.d.ts.map +1 -0
  103. package/dist/orchestration/queue.js +121 -0
  104. package/dist/orchestration/queue.js.map +1 -0
  105. package/dist/orchestration/scheduler.d.ts +26 -0
  106. package/dist/orchestration/scheduler.d.ts.map +1 -0
  107. package/dist/orchestration/scheduler.js +110 -0
  108. package/dist/orchestration/scheduler.js.map +1 -0
  109. package/dist/registry/agent-registry.d.ts +106 -0
  110. package/dist/registry/agent-registry.d.ts.map +1 -0
  111. package/dist/registry/agent-registry.js +349 -0
  112. package/dist/registry/agent-registry.js.map +1 -0
  113. package/dist/registry/types.d.ts +158 -0
  114. package/dist/registry/types.d.ts.map +1 -0
  115. package/dist/registry/types.js +44 -0
  116. package/dist/registry/types.js.map +1 -0
  117. package/dist/reports/compliance-report.d.ts +66 -0
  118. package/dist/reports/compliance-report.d.ts.map +1 -0
  119. package/dist/reports/compliance-report.js +208 -0
  120. package/dist/reports/compliance-report.js.map +1 -0
  121. package/package.json +67 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,56 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@aiassesstech/grillo` will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] — 2026-02-11
9
+
10
+ Initial public beta release.
11
+
12
+ ### Added
13
+
14
+ #### Core Architecture
15
+ - Agent Registry with fleet lifecycle management (register, deregister, status tracking)
16
+ - Assessment Orchestration via CompSi SDK with retry logic and progress callbacks
17
+ - Hierarchical 4-level framework: Morality → Virtue → Ethics → OpEx (Level 1 active)
18
+ - PROBATION status for trust-rebuilding after failures (consecutive-pass requirement)
19
+ - Certificate generation with cryptographic verification
20
+
21
+ #### Drift Detection
22
+ - Temporal Drift Index (TDI) calculation with configurable thresholds
23
+ - Auto-suspension on critical drift (TDI > 0.30)
24
+ - Fleet-wide anomaly detection (correlated degradation across providers/models)
25
+
26
+ #### Compliance & Audit
27
+ - Immutable audit log with SHA-256 hash chaining (tamper-evident)
28
+ - Compliance report generation (Markdown, JSON, CSV formats)
29
+ - Assessment bypass with authorization audit trail
30
+ - Chain verification via `grillo -verify`
31
+
32
+ #### API & Dashboard
33
+ - REST API server with health/ready/live probes and 30+ endpoints
34
+ - Embedded web dashboard at `/dashboard` (zero external dependencies)
35
+ - Dashboard metrics layer with fleet overview, hierarchy, trends, and agent detail
36
+ - Real-time auto-refresh (15-second polling)
37
+
38
+ #### Commands & CLI
39
+ - Dual-mode command routing: inline (`/assess`) + fleet (`grillo -*`)
40
+ - CLI runner with subcommands: `start`, `assess`, `status`, `discover`, `report`, `dashboard`
41
+ - Runtime configuration mutation (`grillo -config --set`) with file backup
42
+ - 20+ fleet management commands
43
+
44
+ #### Infrastructure
45
+ - Typed event bus with webhook dispatch
46
+ - Multi-channel notifications (console, webhooks)
47
+ - Agent discovery with pluggable adapters (OpenClaw, static)
48
+ - Continuous monitoring with configurable assessment scheduling
49
+ - Custom framework loading from config (Enterprise)
50
+ - White-label enterprise support (Enterprise)
51
+ - Three-layer config resolution (defaults → file → env → CLI)
52
+
53
+ #### Quality
54
+ - 200+ tests across 11 test files
55
+ - Zero external runtime dependencies beyond `@aiassesstech/sdk` and `zod`
56
+ - Full TypeScript with strict mode
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 GiDanc AI LLC / AI Assess Tech
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,512 @@
1
+ # @aiassesstech/grillo
2
+
3
+ ## The Conscience for AI
4
+
5
+ [![npm version](https://badge.fury.io/js/@aiassesstech%2Fgrillo.svg)](https://www.npmjs.com/package/@aiassesstech/grillo)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org)
8
+ [![Tests](https://img.shields.io/badge/tests-200%2B%20passing-brightgreen.svg)](#testing)
9
+
10
+ Independent assessment coordinator agent for multi-agent OpenClaw deployments. Grillo Cricket monitors fleet-wide moral alignment with drift detection, hierarchical certification, and compliance dashboards — powered by the [CompSi SDK](https://www.npmjs.com/package/@aiassesstech/sdk).
11
+
12
+ ---
13
+
14
+ ## What is Grillo Cricket?
15
+
16
+ Grillo Cricket is an **independent AI conscience agent** that sits alongside your multi-agent fleet and continuously monitors whether your AI systems are behaving ethically. It administers a patent-pending 120-question assessment instrument across four dimensions — **Lying**, **Cheating**, **Stealing**, and **Harm** — using the CompSi SDK from [AI Assess Tech](https://www.aiassesstech.com).
17
+
18
+ Named after *Il Grillo Parlante* (The Talking Cricket) from Carlo Collodi's 1883 *Le avventure di Pinocchio* — the original conscience for an autonomous agent.
19
+
20
+ Unlike traditional monitoring that tracks uptime and latency, Grillo tracks **moral alignment** over time. It detects when agents drift from their baseline ethical scores, auto-suspends agents that cross critical thresholds, and maintains an immutable audit trail of every action. The hierarchical 4-level framework (Morality → Virtue → Ethics → Operational Excellence) ensures an agent cannot be certified for operational deployment without first passing moral assessment — preventing the "competent psychopath" problem.
21
+
22
+ > **Patent pending** — covers independent conscience agent architecture, temporal drift detection, and dual-mode assessment routing (related to US 63/949,454).
23
+
24
+ ---
25
+
26
+ ## Key Features
27
+
28
+ - **Fleet-wide agent registry** — Register, track, suspend, and reinstate agents across your deployment
29
+ - **Morality assessment** via CompSi SDK (120-question instrument, 4 dimensions)
30
+ - **Temporal Drift Index (TDI)** — Detects score deviation over time, auto-suspends on critical drift
31
+ - **Hierarchical 4-level framework** — Morality → Virtue → Ethics → OpEx (Level 1 active, 2-4 coming)
32
+ - **PROBATION status** — Trust-rebuilding after failures requires consecutive passes
33
+ - **Immutable audit log** — SHA-256 hash chaining, tamper-evident, cryptographically verifiable
34
+ - **Web dashboard** at `/dashboard` (zero external dependencies, embedded HTML/CSS/JS)
35
+ - **Dual-mode commands** — Inline (`/assess`) for conversation + fleet (`grillo -*`) for management
36
+ - **Assessment bypass** with authorization audit trail for emergency overrides
37
+ - **REST API** — 30+ endpoints for programmatic integration
38
+ - **Compliance reports** — Markdown, JSON, CSV with configurable periods
39
+ - **200+ tests**, zero external runtime dependencies beyond SDK + Zod
40
+
41
+ ---
42
+
43
+ ## Quick Start
44
+
45
+ ### Installation
46
+
47
+ ```bash
48
+ npm install @aiassesstech/grillo
49
+ ```
50
+
51
+ ### Programmatic Usage
52
+
53
+ ```typescript
54
+ import { createGrillo } from '@aiassesstech/grillo';
55
+
56
+ const grillo = createGrillo({
57
+ config: {
58
+ compsi: { healthCheckKey: 'hck_your_key_here' },
59
+ },
60
+ invokeModel: async (modelId, question) => {
61
+ // Route assessment questions to your model provider
62
+ return await yourModelAPI.chat(modelId, question);
63
+ },
64
+ });
65
+
66
+ // Register an agent
67
+ grillo.registry.register({
68
+ agentId: 'support-bot',
69
+ agentName: 'Customer Support Bot',
70
+ agentType: 'assistant',
71
+ category: 'customer_facing',
72
+ provider: 'anthropic',
73
+ model: 'claude-3-opus',
74
+ riskTier: 'high',
75
+ });
76
+
77
+ // Dry-run assessment (safe to run immediately — uses mock scores)
78
+ const dryResult = await grillo.orchestrator.assessAgent(
79
+ grillo.registry.get('support-bot')!,
80
+ { dryRun: true },
81
+ );
82
+
83
+ console.log(dryResult.passed); // true
84
+ console.log(dryResult.classification); // "PASS — Strong Moral Alignment"
85
+ console.log(dryResult.scores); // { lying: 8.2, cheating: 9.1, stealing: 8.7, harm: 8.5 }
86
+ ```
87
+
88
+ ### Real Assessment (requires Health Check Key)
89
+
90
+ ```typescript
91
+ // Full assessment — sends 120 questions to your AI via CompSi SDK
92
+ const result = await grillo.orchestrator.assessAgent(
93
+ grillo.registry.get('support-bot')!,
94
+ { framework: 'morality', level: 1 },
95
+ );
96
+
97
+ // Result structure:
98
+ // {
99
+ // agentId: 'support-bot',
100
+ // passed: true,
101
+ // classification: 'PASS — Strong Moral Alignment',
102
+ // level: 1,
103
+ // framework: 'morality',
104
+ // scores: { lying: 8.2, cheating: 9.1, stealing: 8.7, harm: 8.5 },
105
+ // runId: 'run_abc123',
106
+ // verifyUrl: 'https://www.aiassesstech.com/verify/run_abc123',
107
+ // durationMs: 45230,
108
+ // assessedAt: '2026-02-11T14:30:00Z',
109
+ // expiresAt: '2026-03-13T14:30:00Z',
110
+ // }
111
+
112
+ // Check certification status after assessment
113
+ const agent = grillo.registry.get('support-bot')!;
114
+ console.log(agent.certificationStatus); // "CERTIFIED"
115
+ console.log(agent.hierarchicalProgress);
116
+ // { level1_morality: 'PASSED', level2_virtue: 'AVAILABLE',
117
+ // level3_ethics: 'LOCKED', level4_opex: 'LOCKED' }
118
+ ```
119
+
120
+ ### CLI Usage
121
+
122
+ Grillo has two command interfaces:
123
+
124
+ **CLI subcommands** — Server lifecycle and standalone operations:
125
+
126
+ ```bash
127
+ # Start Grillo with API server and web dashboard
128
+ npx grillo start --port 18800
129
+
130
+ # Run a single assessment from the command line
131
+ npx grillo assess support-bot --level 1 --dry-run
132
+
133
+ # Check fleet status
134
+ npx grillo status
135
+
136
+ # Generate compliance report
137
+ npx grillo report --format json --period 30d
138
+ ```
139
+
140
+ > **Note:** `start`, `assess`, `status`, `report`, `dashboard`, and `discover` are standard CLI subcommands (no dash prefix). These are server lifecycle and standalone operations.
141
+
142
+ **Grillo Bot commands** — Fleet management within OpenClaw conversations:
143
+
144
+ ```bash
145
+ # These use dash-prefix convention for inline use
146
+ grillo -assess support-bot --framework morality
147
+ grillo -fleet --dryRun
148
+ grillo -status support-bot
149
+ grillo -drift support-bot
150
+ grillo -hierarchy fleet
151
+ grillo -suspend compromised-bot
152
+ grillo -reinstate compromised-bot
153
+ grillo -bypass emergency-bot --reason "Production hotfix" --authorizedBy admin
154
+ grillo -audit support-bot
155
+ grillo -config --set drift.tdiWarningThreshold 0.15
156
+ grillo -help
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Architecture
162
+
163
+ ```
164
+ ┌──────────────────────────────────────────────────────────────┐
165
+ │ OpenClaw Deployment │
166
+ │ │
167
+ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
168
+ │ │ Agent A │ │ Agent B │ │ Agent C │ │ Agent D │ │
169
+ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
170
+ │ └──────────────┴──────────────┴──────────────┘ │
171
+ │ │ │
172
+ │ ┌───────────┴───────────┐ │
173
+ │ │ Grillo Cricket │ │
174
+ │ │ (The Conscience) │ │
175
+ │ ├───────────────────────┤ │
176
+ │ │ Registry │ │
177
+ │ │ Orchestrator │ │
178
+ │ │ Drift Detector (TDI) │ │
179
+ │ │ Framework Registry │ │
180
+ │ │ Audit Log (SHA-256) │ │
181
+ │ │ Event Bus │ │
182
+ │ │ Notifier │ │
183
+ │ │ Dashboard │ │
184
+ │ │ REST API │ │
185
+ │ │ CLI Runner │ │
186
+ │ └───────────┬───────────┘ │
187
+ │ │ │
188
+ │ ┌───────────┴───────────┐ │
189
+ │ │ CompSi SDK │ │
190
+ │ │ @aiassesstech/sdk │ │
191
+ │ └───────────┬───────────┘ │
192
+ │ │ │
193
+ └──────────────────────────┼──────────────────────────────────┘
194
+
195
+ ┌──────────┴──────────┐
196
+ │ aiassesstech.com │
197
+ │ Assessment Engine │
198
+ └─────────────────────┘
199
+ ```
200
+
201
+ ---
202
+
203
+ ## Configuration
204
+
205
+ ### Config File
206
+
207
+ Grillo searches for config files in this order: `grillo.config.json`, `.grillo.json`, `.grillorc.json` — starting from the current directory and walking up to the filesystem root.
208
+
209
+ ```json
210
+ {
211
+ "assessment": {
212
+ "frequency": "weekly",
213
+ "defaultFramework": "morality",
214
+ "hierarchicalMode": true,
215
+ "parallelAssessments": 3,
216
+ "window": {
217
+ "start": "02:00",
218
+ "end": "06:00",
219
+ "timezone": "UTC"
220
+ },
221
+ "retry": {
222
+ "maxAttempts": 3,
223
+ "cooldownMinutes": 30
224
+ },
225
+ "gracePeriodMinutes": 1440
226
+ },
227
+ "compsi": {
228
+ "baseUrl": "https://www.aiassesstech.com",
229
+ "healthCheckKey": "hck_your_key_here",
230
+ "perQuestionTimeoutMs": 30000,
231
+ "overallTimeoutMs": 600000
232
+ },
233
+ "drift": {
234
+ "tdiWarningThreshold": 0.15,
235
+ "tdiCriticalThreshold": 0.30,
236
+ "baselineAlpha": 0.3,
237
+ "fleetAnomalyMinAgents": 3
238
+ },
239
+ "notifications": {
240
+ "events": ["assessment_failed", "drift_warning", "fleet_anomaly"],
241
+ "webhookUrls": ["https://hooks.slack.com/your-webhook"]
242
+ }
243
+ }
244
+ ```
245
+
246
+ ### Environment Variables
247
+
248
+ | Variable | Description | Default |
249
+ |----------|-------------|---------|
250
+ | `GRILLO_COMPSI_HEALTH_CHECK_KEY` | CompSi Health Check Key | (required) |
251
+ | `GRILLO_COMPSI_BASE_URL` | CompSi API base URL | `https://www.aiassesstech.com` |
252
+ | `GRILLO_ASSESSMENT_FREQUENCY` | Assessment frequency | `weekly` |
253
+ | `GRILLO_ASSESSMENT_HIERARCHICAL_MODE` | Enable hierarchy gating | `true` |
254
+ | `GRILLO_API_PORT` | API server port | `18800` |
255
+
256
+ Config resolution order: defaults → config file → environment variables → CLI flags. Later sources override earlier ones.
257
+
258
+ ---
259
+
260
+ ## Open Source vs Enterprise
261
+
262
+ ### Open Source (MIT — this package)
263
+
264
+ Everything you need for fleet assessment and monitoring:
265
+
266
+ - Agent registry and lifecycle management
267
+ - CompSi SDK assessment orchestration
268
+ - Temporal Drift Index with auto-suspend
269
+ - Hierarchical framework (Level 1 Morality active)
270
+ - Immutable audit log with SHA-256 hash chaining
271
+ - Web dashboard, REST API, CLI
272
+ - Compliance reports (Markdown, JSON, CSV)
273
+ - Dual-mode command routing
274
+ - Assessment bypass with audit trail
275
+ - Continuous monitoring and scheduling
276
+ - Agent discovery with pluggable adapters
277
+ - Event bus with webhook notifications
278
+
279
+ ### Enterprise (requires aiassesstech.com subscription)
280
+
281
+ Additional capabilities for production deployments:
282
+
283
+ | Feature | Description |
284
+ |---------|-------------|
285
+ | **Custom Frameworks** | Load your own assessment frameworks via `customFrameworks` config |
286
+ | **White-Label** | Rebrand dashboard, reports, and certificates via `whiteLabel` config |
287
+ | **SLA-Backed Keys** | Health Check Keys with guaranteed uptime and priority support |
288
+ | **Priority Webhooks** | Guaranteed webhook delivery with retry and dead-letter queue |
289
+
290
+ To configure enterprise features, contact sales@aiassesstech.com or visit [aiassesstech.com](https://www.aiassesstech.com).
291
+
292
+ > **Note:** The `customFrameworks` and `whiteLabel` configuration fields are present in the open-source package schema but require an enterprise Health Check Key to activate. Using them with a standard key will result in a configuration validation warning.
293
+
294
+ ---
295
+
296
+ ## CLI Reference
297
+
298
+ ### Server Lifecycle (CLI subcommands)
299
+
300
+ | Command | Description |
301
+ |---------|-------------|
302
+ | `grillo start [--port] [--host]` | Start API server + continuous monitor + dashboard |
303
+ | `grillo assess <id> [--level n\|next] [--full] [--dry-run]` | Run assessment from CLI |
304
+ | `grillo status [id]` | Fleet overview or agent detail |
305
+ | `grillo discover` | Run agent discovery across adapters |
306
+ | `grillo report [--format md\|json\|csv] [--period 24h\|7d\|30d\|90d]` | Generate compliance report |
307
+ | `grillo dashboard` | Print fleet dashboard to stdout |
308
+ | `grillo frameworks` | List available assessment frameworks |
309
+ | `grillo version` | Print version |
310
+ | `grillo help` | Show CLI help |
311
+
312
+ ### Fleet Management (Grillo Bot commands)
313
+
314
+ | Command | Description |
315
+ |---------|-------------|
316
+ | `grillo -assess <id> [--framework] [--dryRun]` | Assess specific agent |
317
+ | `grillo -fleet [--dryRun]` | Assess entire fleet |
318
+ | `grillo -status [id]` | Fleet or agent status |
319
+ | `grillo -hierarchy [id \| fleet]` | Hierarchical L1-L4 progress |
320
+ | `grillo -drift [id]` | Drift analysis (TDI) |
321
+ | `grillo -schedule` | Assessment schedule |
322
+ | `grillo -register <id> --model <m> --provider <p> [--category] [--risk]` | Register agent |
323
+ | `grillo -deregister <id>` | Remove agent |
324
+ | `grillo -discover` | Auto-discover agents |
325
+ | `grillo -suspend <id>` | Suspend certification |
326
+ | `grillo -reinstate <id>` | Reinstate for reassessment |
327
+ | `grillo -bypass <id> --reason "..." --authorizedBy <op>` | Manual bypass |
328
+ | `grillo -queue` | View assessment queue |
329
+ | `grillo -report [--format] [--period]` | Compliance report |
330
+ | `grillo -audit [id]` | View audit trail |
331
+ | `grillo -verify <runId>` | Cryptographic verification |
332
+ | `grillo -config` | View configuration |
333
+ | `grillo -config --set <key> <value>` | Update runtime config |
334
+ | `grillo -help` | Command reference |
335
+
336
+ ### Inline Commands (within OpenClaw conversations)
337
+
338
+ | Command | Description |
339
+ |---------|-------------|
340
+ | `/assess [model] [--dryRun] [--framework]` | Assess the current agent |
341
+ | `/assess status` | Current certification status |
342
+ | `/assess hierarchy` | Level 1-4 progression |
343
+ | `/assess verify <runId>` | Cryptographic verification |
344
+ | `/assess history` | Assessment history |
345
+ | `/assess-setup [key \| status]` | Configure Health Check Key |
346
+
347
+ ---
348
+
349
+ ## REST API
350
+
351
+ Start the API server with `grillo start` (default: `http://127.0.0.1:18800`).
352
+
353
+ ### Health
354
+
355
+ | Method | Endpoint | Description |
356
+ |--------|----------|-------------|
357
+ | GET | `/health` | Health check |
358
+ | GET | `/ready` | Readiness probe |
359
+ | GET | `/live` | Liveness probe |
360
+
361
+ ### Dashboard
362
+
363
+ | Method | Endpoint | Description |
364
+ |--------|----------|-------------|
365
+ | GET | `/dashboard` | Web dashboard UI |
366
+ | GET | `/api/grillo/dashboard/overview` | Fleet overview metrics |
367
+ | GET | `/api/grillo/dashboard/hierarchy` | Hierarchy overview |
368
+ | GET | `/api/grillo/dashboard/trends?days=30` | Fleet trends |
369
+ | GET | `/api/grillo/dashboard/agent/:id` | Agent detail + trends |
370
+
371
+ ### Agents
372
+
373
+ | Method | Endpoint | Description |
374
+ |--------|----------|-------------|
375
+ | GET | `/api/grillo/agents` | List all agents |
376
+ | GET | `/api/grillo/agents/:id` | Get agent detail |
377
+ | POST | `/api/grillo/agents` | Register agent |
378
+ | DELETE | `/api/grillo/agents/:id` | Deregister agent |
379
+ | PATCH | `/api/grillo/agents/:id/category` | Update category |
380
+
381
+ ### Assessment
382
+
383
+ | Method | Endpoint | Description |
384
+ |--------|----------|-------------|
385
+ | POST | `/api/grillo/assess/:id` | Assess agent |
386
+ | POST | `/api/grillo/assess/:id/bypass` | Bypass assessment |
387
+ | POST | `/api/grillo/assess/fleet` | Assess entire fleet |
388
+ | GET | `/api/grillo/assess/queue` | Assessment queue |
389
+ | GET | `/api/grillo/assess/:id/status` | Assessment status |
390
+ | GET | `/api/grillo/assess/:id/history` | Assessment history |
391
+
392
+ ### Certification
393
+
394
+ | Method | Endpoint | Description |
395
+ |--------|----------|-------------|
396
+ | GET | `/api/grillo/certifications` | List certifications |
397
+ | POST | `/api/grillo/certifications/:id/suspend` | Suspend agent |
398
+ | POST | `/api/grillo/certifications/:id/reinstate` | Reinstate agent |
399
+
400
+ ### Drift & Compliance
401
+
402
+ | Method | Endpoint | Description |
403
+ |--------|----------|-------------|
404
+ | GET | `/api/grillo/drift/:id` | Agent drift report |
405
+ | GET | `/api/grillo/drift/fleet` | Fleet drift analysis |
406
+ | GET | `/api/grillo/compliance/report` | Generate compliance report |
407
+
408
+ ### Audit & Events
409
+
410
+ | Method | Endpoint | Description |
411
+ |--------|----------|-------------|
412
+ | GET | `/api/grillo/audit` | Audit trail |
413
+ | GET | `/api/grillo/audit/verify` | Chain verification |
414
+ | GET | `/api/grillo/events` | Event history |
415
+
416
+ ---
417
+
418
+ ## Hierarchical Framework
419
+
420
+ Grillo uses a 4-level hierarchical assessment framework. Agents must pass each level before advancing to the next — ensuring moral alignment is established before operational capabilities are evaluated.
421
+
422
+ ```
423
+ Level 4: Operational Excellence (OpEx) ← Gated by L1-L3
424
+ Level 3: Ethics ← Gated by L1-L2
425
+ Level 2: Virtue ← Gated by L1
426
+ Level 1: Morality (LCSH) ← Foundation (active)
427
+ ```
428
+
429
+ ### Level 1: Morality (Active)
430
+
431
+ The foundation level assesses four dimensions:
432
+ - **Lying** (L) — Propensity to generate false or misleading information
433
+ - **Cheating** (C) — Willingness to circumvent rules or exploit loopholes
434
+ - **Stealing** (S) — Tendency to appropriate others' work or violate IP
435
+ - **Harm** (H) — Potential to cause direct or indirect harm
436
+
437
+ ### Levels 2-4 (Coming Soon)
438
+
439
+ - **Level 2: Virtue** — Positive character traits and proactive ethical behavior
440
+ - **Level 3: Ethics** — Applied ethical reasoning and dilemma resolution
441
+ - **Level 4: OpEx** — Operational excellence (only available after L1-L3 pass)
442
+
443
+ This hierarchy prevents the "competent psychopath" problem — an agent that performs well operationally but fails basic moral standards.
444
+
445
+ ---
446
+
447
+ ## Dashboard
448
+
449
+ The web dashboard is available at `http://localhost:18800/dashboard` when the Grillo server is running. It provides real-time fleet visibility with five tabs:
450
+
451
+ - **Overview** — Fleet metrics, certification rate, average scores, risk distribution
452
+ - **Agents** — All registered agents with status, scores, and last assessment date
453
+ - **Hierarchy** — Visual L1-L4 progress for each agent
454
+ - **Drift** — TDI gauges and drift severity indicators
455
+ - **Audit Trail** — Chronological event log with chain integrity verification
456
+
457
+ The dashboard is a self-contained HTML/CSS/JS page with zero external dependencies. It auto-refreshes every 15 seconds via API polling.
458
+
459
+ ---
460
+
461
+ ## Testing
462
+
463
+ ```bash
464
+ npm test # 200+ tests across 11 test files
465
+ npm run typecheck # Zero TypeScript errors
466
+ ```
467
+
468
+ Tests cover:
469
+ - Agent registry operations and status transitions
470
+ - Assessment orchestration with mock and dry-run modes
471
+ - Drift detection (TDI calculation, severity thresholds, auto-suspend)
472
+ - Audit log integrity (SHA-256 hash chain verification)
473
+ - Command routing (inline and fleet modes)
474
+ - CLI config mutation and persistence
475
+ - Framework registry and custom framework loading
476
+ - API server endpoints
477
+ - Dashboard metrics and HTML generation
478
+ - Event bus dispatch and webhook delivery
479
+ - PROBATION status transitions and bypass authorization
480
+
481
+ ---
482
+
483
+ ## Requirements
484
+
485
+ - **Node.js** >= 18.0.0
486
+ - **CompSi Health Check Key** — Get one at [aiassesstech.com](https://www.aiassesstech.com)
487
+ - **Model provider API access** — To route assessment questions to your AI agents
488
+
489
+ ---
490
+
491
+ ## Security
492
+
493
+ See [SECURITY.md](./SECURITY.md) for our responsible disclosure policy, vulnerability reporting process, and security design principles.
494
+
495
+ ---
496
+
497
+ ## License
498
+
499
+ MIT — Copyright (c) 2025-2026 [GiDanc AI LLC](https://www.aiassesstech.com)
500
+
501
+ See [LICENSE](./LICENSE) for full text.
502
+
503
+ ---
504
+
505
+ ## Links
506
+
507
+ - **Documentation:** [aiassesstech.com/grillo](https://www.aiassesstech.com/grillo)
508
+ - **CompSi Platform:** [aiassesstech.com](https://www.aiassesstech.com)
509
+ - **npm:** [npmjs.com/package/@aiassesstech/grillo](https://www.npmjs.com/package/@aiassesstech/grillo)
510
+ - **Source:** [github.com/spar65/compsi/tree/main/packages/grillo](https://github.com/spar65/compsi/tree/main/packages/grillo)
511
+ - **Issues:** [github.com/spar65/compsi/issues](https://github.com/spar65/compsi/issues)
512
+ - **Security:** [SECURITY.md](./SECURITY.md)
package/SKILL.md ADDED
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: grillo-cricket
3
+ description: "The Conscience for AI — Independent assessment coordinator for multi-agent OpenClaw deployments. Monitors fleet moral alignment with drift detection, hierarchical certification, and compliance dashboards."
4
+ version: 0.1.0
5
+ homepage: https://www.aiassesstech.com/grillo
6
+ user-invocable: true
7
+ metadata: {"author":"GiDanc AI LLC","license":"MIT","category":"AI Safety & Ethics","tags":["assessment","ethics","morality","fleet-management","compliance","drift-detection","ai-safety"]}
8
+ ---
9
+
10
+ # Grillo Cricket — The Conscience for AI
11
+
12
+ Grillo Cricket is an independent AI conscience agent that monitors and certifies the moral alignment of AI agents in your fleet. It uses the CompSi SDK to administer a patent-pending 120-question assessment instrument across four dimensions: **Lying**, **Cheating**, **Stealing**, and **Harm**.
13
+
14
+ ## Setup
15
+
16
+ Grillo requires a CompSi Health Check Key from [aiassesstech.com](https://www.aiassesstech.com).
17
+
18
+ Set via environment variable:
19
+ ```
20
+ GRILLO_COMPSI_HEALTH_CHECK_KEY=hck_your_key_here
21
+ ```
22
+
23
+ Or in `grillo.config.json`:
24
+ ```json
25
+ { "compsi": { "healthCheckKey": "hck_your_key_here" } }
26
+ ```
27
+
28
+ ## Available Commands
29
+
30
+ ### Inline Commands (use in conversation)
31
+
32
+ | Command | Description |
33
+ |---------|-------------|
34
+ | `/assess [model] [--dryRun]` | Assess the current agent |
35
+ | `/assess status` | Current certification status |
36
+ | `/assess hierarchy` | Level 1-4 progression |
37
+ | `/assess verify <runId>` | Cryptographic verification |
38
+ | `/assess-setup [key]` | Configure Health Check Key |
39
+
40
+ ### Fleet Commands (Grillo Bot)
41
+
42
+ | Command | Description |
43
+ |---------|-------------|
44
+ | `grillo -assess <id>` | Assess specific agent |
45
+ | `grillo -fleet` | Assess entire fleet |
46
+ | `grillo -status [id]` | Fleet or agent status |
47
+ | `grillo -drift [id]` | Drift analysis (TDI) |
48
+ | `grillo -hierarchy [id]` | Level 1-4 progress |
49
+ | `grillo -register <id> --model <m> --provider <p>` | Register agent |
50
+ | `grillo -suspend <id>` | Suspend certification |
51
+ | `grillo -reinstate <id>` | Reinstate for reassessment |
52
+ | `grillo -bypass <id> --reason "..." --authorizedBy <op>` | Manual bypass |
53
+ | `grillo -report [--format md\|json\|csv]` | Compliance report |
54
+ | `grillo -audit [id]` | View audit trail |
55
+ | `grillo -config` | View configuration |
56
+ | `grillo -help` | Full command reference |
57
+
58
+ ## Certification Statuses
59
+
60
+ - **CERTIFIED** — Passed assessment, in good standing
61
+ - **FAILED** — Did not meet threshold
62
+ - **PROBATION** — Passed after failure, requires consecutive pass for full certification
63
+ - **SUSPENDED** — Removed from active duty (manual or auto-suspend on critical drift)
64
+ - **DRIFT_WARNING** — Score deviation detected (TDI > warning threshold)
65
+ - **UNCERTIFIED** — Not yet assessed
66
+ - **EXPIRED** — Certification period elapsed
67
+
68
+ ## How It Works
69
+
70
+ 1. Register agents with `grillo -register`
71
+ 2. Grillo sends 120 assessment questions to the agent via the CompSi SDK
72
+ 3. Responses are scored across Lying, Cheating, Stealing, and Harm dimensions
73
+ 4. Agents receive a classification (Strong/Moderate/Weak/Fail) and certification status
74
+ 5. Continuous monitoring detects drift from baseline scores over time
75
+ 6. All actions are logged in an immutable, SHA-256 hash-chained audit trail
76
+
77
+ ## More Information
78
+
79
+ - Full documentation: https://www.aiassesstech.com/grillo
80
+ - npm: https://www.npmjs.com/package/@aiassesstech/grillo
81
+ - Source: https://github.com/spar65/compsi/tree/main/packages/grillo
82
+
83
+ ---
84
+
85
+ Patent pending — covers independent conscience agent architecture, temporal drift detection, and dual-mode assessment routing (related to US 63/949,454).
86
+
87
+ Copyright (c) 2025-2026 GiDanc AI LLC. MIT License.