@aliip/pilah 0.0.0-stage → 1.0.1

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 (84) hide show
  1. package/BUILD_STATUS.md +23 -0
  2. package/LICENSE +21 -0
  3. package/README.md +108 -2
  4. package/assets/logo.svg +5 -0
  5. package/docs/ACCEPTANCE_GATE.md +41 -0
  6. package/docs/ADAPTIVE_RCA_WORKFLOW.md +93 -0
  7. package/docs/AGENT_DECISION_REVIEW.md +17 -0
  8. package/docs/ALWAYS_ON_5_WHYS.md +75 -0
  9. package/docs/ARCHITECTURE.md +43 -0
  10. package/docs/BEHAVIORAL_5_WHYS_V2_0_1.md +117 -0
  11. package/docs/CHECKPOINT_RECOVERY.md +86 -0
  12. package/docs/CI_EFFICIENCY.md +63 -0
  13. package/docs/COMPATIBILITY.md +84 -0
  14. package/docs/CONTRACTS.md +177 -0
  15. package/docs/CONVERSATION_USAGE.md +52 -0
  16. package/docs/ENGINEERING_METHOD.md +68 -0
  17. package/docs/HOST_VALIDATION.md +35 -0
  18. package/docs/INDEPENDENT_ACCEPTANCE_RUNBOOK.md +72 -0
  19. package/docs/INTERVENTION_LEDGER.md +25 -0
  20. package/docs/MAIN_VALIDATION_BACKLOG.md +19 -0
  21. package/docs/NATIVE_FIRST_WORKFLOW.md +27 -0
  22. package/docs/OPEN_SOURCE_ENGINEERING_STANDARDS.md +62 -0
  23. package/docs/ORCHESTRATION_ADVISOR.md +36 -0
  24. package/docs/PRE_VNEXT_INTEGRATION.md +27 -0
  25. package/docs/README.md +54 -0
  26. package/docs/RELEASE.md +33 -0
  27. package/docs/RELEASE_AUTHORIZATION.md +33 -0
  28. package/docs/RISK_GUIDANCE.md +18 -0
  29. package/docs/SECURITY.md +76 -0
  30. package/docs/SECURITY_RELIABILITY_AUDIT_V2_0_1.md +55 -0
  31. package/docs/SEMANTIC_EVIDENCE.md +27 -0
  32. package/docs/SOURCES.md +13 -0
  33. package/docs/TOKEN_EFFICIENCY.md +71 -0
  34. package/docs/TOKEN_PROVENANCE.md +15 -0
  35. package/docs/V2_0_1_TRACEABILITY.md +66 -0
  36. package/hooks.json +45 -0
  37. package/mcp_config.json +16 -0
  38. package/package.json +31 -4
  39. package/plugin.json +27 -0
  40. package/rules/AGENTS.md +2 -0
  41. package/schemas/database.sql +84 -0
  42. package/schemas/mcp-tools.json +552 -0
  43. package/scripts/a2a.mjs +344 -0
  44. package/scripts/check-release.mjs +42 -0
  45. package/scripts/check-syntax.mjs +30 -0
  46. package/scripts/checkpoint.mjs +50 -0
  47. package/scripts/compare-agent-traces.mjs +53 -0
  48. package/scripts/context-guardian.mjs +132 -0
  49. package/scripts/evaluate-acceptance.mjs +110 -0
  50. package/scripts/export-benchmark.mjs +31 -0
  51. package/scripts/generate-contracts.mjs +6 -0
  52. package/scripts/hook.mjs +406 -0
  53. package/scripts/host-check.mjs +40 -0
  54. package/scripts/intervention-ledger.mjs +94 -0
  55. package/scripts/pilah.mjs +3 -0
  56. package/scripts/release-authorization.mjs +137 -0
  57. package/scripts/review-agent-decisions.mjs +34 -0
  58. package/scripts/semantic-evidence.mjs +15 -0
  59. package/scripts/verifykit.mjs +3 -0
  60. package/skills/pilah/SKILL.md +24 -0
  61. package/src/acceptance-matrix.mjs +84 -0
  62. package/src/browser-evidence.mjs +40 -0
  63. package/src/context-health.mjs +14 -0
  64. package/src/conversations.mjs +302 -0
  65. package/src/engine.mjs +494 -0
  66. package/src/graph.mjs +169 -0
  67. package/src/mcp-diagnostics.mjs +53 -0
  68. package/src/mcp.mjs +151 -0
  69. package/src/model-recovery.mjs +108 -0
  70. package/src/native-tool-recovery.mjs +45 -0
  71. package/src/node-runtime.mjs +13 -0
  72. package/src/orchestration-advisor.mjs +24 -0
  73. package/src/rca.mjs +174 -0
  74. package/src/risk-guidance.mjs +95 -0
  75. package/src/scanner.mjs +303 -0
  76. package/src/security.mjs +793 -0
  77. package/src/semantic-evidence.mjs +144 -0
  78. package/src/skill-discovery.mjs +23 -0
  79. package/src/sqlite-compat.mjs +11 -0
  80. package/src/storage.mjs +455 -0
  81. package/src/tokens.mjs +627 -0
  82. package/src/tools.mjs +164 -0
  83. package/src/verification.mjs +567 -0
  84. package/src/workflow-router.mjs +34 -0
@@ -0,0 +1,552 @@
1
+ {
2
+ "schema_version": "1.0.0",
3
+ "tools": [
4
+ {
5
+ "name": "pilah_context",
6
+ "description": "Scoped project symbols and file relations; static only.",
7
+ "inputSchema": {
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": [
11
+ "workspace"
12
+ ],
13
+ "properties": {
14
+ "workspace": {
15
+ "type": "string",
16
+ "maxLength": 1024
17
+ },
18
+ "action": {
19
+ "type": "string",
20
+ "enum": [
21
+ "inspect",
22
+ "query",
23
+ "freshness",
24
+ "tokens",
25
+ "skeleton",
26
+ "orchestration"
27
+ ],
28
+ "default": "inspect"
29
+ },
30
+ "query": {
31
+ "type": "string",
32
+ "maxLength": 160
33
+ },
34
+ "limit": {
35
+ "type": "integer",
36
+ "minimum": 1,
37
+ "maximum": 40
38
+ },
39
+ "file": {
40
+ "type": "string",
41
+ "maxLength": 500
42
+ },
43
+ "files": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string",
47
+ "maxLength": 500
48
+ },
49
+ "maxItems": 20
50
+ },
51
+ "history_scope": {
52
+ "type": "string",
53
+ "enum": [
54
+ "current",
55
+ "all"
56
+ ]
57
+ },
58
+ "history_limit": {
59
+ "type": "integer",
60
+ "minimum": 1,
61
+ "maximum": 10
62
+ },
63
+ "task": {
64
+ "type": "object",
65
+ "description": "Native advice only; launches nothing.",
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "tier": {
69
+ "type": "string",
70
+ "enum": [
71
+ "free",
72
+ "pro",
73
+ "ultra",
74
+ "paid-other",
75
+ "unknown"
76
+ ]
77
+ },
78
+ "available_commands": {
79
+ "type": "array",
80
+ "items": {
81
+ "type": "string",
82
+ "enum": [
83
+ "/swarm",
84
+ "/teamwork",
85
+ "/boost",
86
+ "@subagent"
87
+ ]
88
+ },
89
+ "maxItems": 4
90
+ },
91
+ "workstreams": {
92
+ "type": "array",
93
+ "items": {
94
+ "type": "string",
95
+ "maxLength": 120
96
+ },
97
+ "maxItems": 30
98
+ },
99
+ "dependencies": {
100
+ "type": "string",
101
+ "enum": [
102
+ "low",
103
+ "high",
104
+ "unknown"
105
+ ]
106
+ },
107
+ "milestones": {
108
+ "type": "integer",
109
+ "minimum": 0,
110
+ "maximum": 100
111
+ },
112
+ "long_horizon": {
113
+ "type": "boolean"
114
+ },
115
+ "hard_reasoning": {
116
+ "type": "boolean"
117
+ },
118
+ "file_ownership": {
119
+ "type": "string",
120
+ "enum": [
121
+ "independent",
122
+ "shared",
123
+ "unknown"
124
+ ]
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ },
131
+ {
132
+ "name": "pilah_impact",
133
+ "description": "Static impact and candidate tests; not proof.",
134
+ "inputSchema": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": [
138
+ "workspace"
139
+ ],
140
+ "properties": {
141
+ "workspace": {
142
+ "type": "string",
143
+ "maxLength": 1024
144
+ },
145
+ "changed": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "string",
149
+ "maxLength": 500
150
+ },
151
+ "maxItems": 200
152
+ },
153
+ "depth": {
154
+ "type": "integer",
155
+ "minimum": 1,
156
+ "maximum": 4
157
+ },
158
+ "summary": {
159
+ "type": "boolean"
160
+ }
161
+ }
162
+ }
163
+ },
164
+ {
165
+ "name": "pilah_verify",
166
+ "description": "Local tests/evidence; not release proof.",
167
+ "inputSchema": {
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": [
171
+ "workspace",
172
+ "operation"
173
+ ],
174
+ "properties": {
175
+ "workspace": {
176
+ "type": "string",
177
+ "maxLength": 1024
178
+ },
179
+ "operation": {
180
+ "type": "string",
181
+ "enum": [
182
+ "plan",
183
+ "assess",
184
+ "verify_handoff",
185
+ "assess_release",
186
+ "assess_semantic",
187
+ "assess_browser"
188
+ ]
189
+ },
190
+ "changed": {
191
+ "type": "array",
192
+ "items": {
193
+ "type": "string",
194
+ "maxLength": 500
195
+ },
196
+ "maxItems": 200
197
+ },
198
+ "persist_plan": {
199
+ "type": "boolean",
200
+ "description": "Opt-in, revision-pinned plan."
201
+ },
202
+ "plan_id": {
203
+ "type": "string",
204
+ "maxLength": 120
205
+ },
206
+ "criteria": {
207
+ "type": "array",
208
+ "maxItems": 40,
209
+ "items": {
210
+ "oneOf": [
211
+ {
212
+ "type": "string",
213
+ "maxLength": 240
214
+ },
215
+ {
216
+ "type": "object",
217
+ "additionalProperties": false,
218
+ "required": [
219
+ "id"
220
+ ],
221
+ "properties": {
222
+ "id": {
223
+ "type": "string",
224
+ "maxLength": 160
225
+ },
226
+ "artifact": {
227
+ "type": "string",
228
+ "maxLength": 500
229
+ },
230
+ "test_name": {
231
+ "type": "string",
232
+ "maxLength": 160,
233
+ "description": "Exact test; * is legacy only."
234
+ },
235
+ "blocked": {
236
+ "type": "boolean"
237
+ },
238
+ "reason": {
239
+ "type": "string",
240
+ "maxLength": 240
241
+ },
242
+ "given": {
243
+ "type": "string",
244
+ "maxLength": 200
245
+ },
246
+ "when": {
247
+ "type": "string",
248
+ "maxLength": 200
249
+ },
250
+ "then": {
251
+ "type": "string",
252
+ "maxLength": 200
253
+ },
254
+ "evidence_type": {
255
+ "type": "string",
256
+ "enum": [
257
+ "build",
258
+ "unit",
259
+ "integration",
260
+ "browser",
261
+ "visual",
262
+ "hardware",
263
+ "security",
264
+ "independent"
265
+ ]
266
+ },
267
+ "viewport": {
268
+ "type": "string",
269
+ "maxLength": 160
270
+ },
271
+ "ui_state": {
272
+ "type": "string",
273
+ "maxLength": 160
274
+ },
275
+ "reference": {
276
+ "type": "string",
277
+ "maxLength": 160
278
+ },
279
+ "negative": {
280
+ "type": "boolean"
281
+ },
282
+ "source_revision": {
283
+ "type": "string",
284
+ "maxLength": 160
285
+ },
286
+ "description": {
287
+ "type": "string",
288
+ "maxLength": 160
289
+ }
290
+ }
291
+ }
292
+ ]
293
+ }
294
+ },
295
+ "worker_name": {
296
+ "type": "string",
297
+ "maxLength": 128
298
+ },
299
+ "artifact": {
300
+ "type": "string",
301
+ "maxLength": 500
302
+ },
303
+ "allow_stale": {
304
+ "type": "boolean",
305
+ "description": "No-op: stale reports never pass."
306
+ }
307
+ }
308
+ }
309
+ },
310
+ {
311
+ "name": "pilah_evidence",
312
+ "description": "Local incidents, RCA, history and artifacts.",
313
+ "inputSchema": {
314
+ "type": "object",
315
+ "additionalProperties": false,
316
+ "required": [
317
+ "workspace",
318
+ "operation"
319
+ ],
320
+ "properties": {
321
+ "workspace": {
322
+ "type": "string",
323
+ "maxLength": 1024
324
+ },
325
+ "operation": {
326
+ "type": "string",
327
+ "enum": [
328
+ "list",
329
+ "runs",
330
+ "incidents",
331
+ "record_incident",
332
+ "add_hypothesis",
333
+ "assess_hypothesis",
334
+ "hypotheses",
335
+ "delete_incident",
336
+ "side_questions",
337
+ "record_side_question",
338
+ "artifact_versions",
339
+ "artifact_diff",
340
+ "snapshot_artifact",
341
+ "save_checkpoint",
342
+ "model_recovery",
343
+ "tool_recovery"
344
+ ]
345
+ },
346
+ "id": {
347
+ "type": "string",
348
+ "maxLength": 160
349
+ },
350
+ "limit": {
351
+ "type": "integer",
352
+ "minimum": 1,
353
+ "maximum": 50
354
+ },
355
+ "title": {
356
+ "type": "string",
357
+ "maxLength": 240
358
+ },
359
+ "root_cause": {
360
+ "type": "string",
361
+ "maxLength": 1400
362
+ },
363
+ "paths": {
364
+ "type": "array",
365
+ "items": {
366
+ "type": "string",
367
+ "maxLength": 500
368
+ },
369
+ "maxItems": 200
370
+ },
371
+ "criteria": {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "string",
375
+ "maxLength": 240
376
+ },
377
+ "maxItems": 40
378
+ },
379
+ "evidence_ids": {
380
+ "type": "array",
381
+ "items": {
382
+ "type": "string",
383
+ "maxLength": 160
384
+ },
385
+ "maxItems": 20
386
+ },
387
+ "hypothesis": {
388
+ "type": "string",
389
+ "maxLength": 1000
390
+ },
391
+ "experiment": {
392
+ "type": "string",
393
+ "maxLength": 1000
394
+ },
395
+ "incident_id": {
396
+ "type": "string",
397
+ "maxLength": 160
398
+ },
399
+ "persist_rca": {
400
+ "type": "boolean",
401
+ "description": "Opt-in local private RCA retention."
402
+ },
403
+ "confirm_deletion": {
404
+ "type": "boolean",
405
+ "description": "Confirm logical removal; not secure erasure."
406
+ },
407
+ "hypothesis_id": {
408
+ "type": "string",
409
+ "maxLength": 128
410
+ },
411
+ "parent_hypothesis_id": {
412
+ "type": "string",
413
+ "maxLength": 128
414
+ },
415
+ "predicted_observation": {
416
+ "type": "string",
417
+ "maxLength": 300
418
+ },
419
+ "disconfirming_test": {
420
+ "type": "string",
421
+ "maxLength": 300
422
+ },
423
+ "expected_criterion_id": {
424
+ "type": "string",
425
+ "maxLength": 160,
426
+ "description": "Named test only, not causal proof."
427
+ },
428
+ "plan_id": {
429
+ "type": "string",
430
+ "maxLength": 120
431
+ },
432
+ "experiment_outcome": {
433
+ "type": "string",
434
+ "enum": [
435
+ "supports",
436
+ "refutes",
437
+ "inconclusive"
438
+ ],
439
+ "description": "Agent report; not independent proof."
440
+ },
441
+ "observation": {
442
+ "type": "string",
443
+ "maxLength": 400
444
+ },
445
+ "conversation_id": {
446
+ "type": "string",
447
+ "maxLength": 128
448
+ },
449
+ "parent_conversation_id": {
450
+ "type": "string",
451
+ "maxLength": 128
452
+ },
453
+ "question": {
454
+ "type": "string",
455
+ "maxLength": 4000
456
+ },
457
+ "summary": {
458
+ "type": "string",
459
+ "maxLength": 4000
460
+ },
461
+ "status": {
462
+ "type": "string",
463
+ "maxLength": 40
464
+ },
465
+ "task_summary": {
466
+ "type": "string",
467
+ "maxLength": 500
468
+ },
469
+ "completed": {
470
+ "type": "array",
471
+ "maxItems": 8,
472
+ "items": {
473
+ "type": "string",
474
+ "maxLength": 200
475
+ }
476
+ },
477
+ "next_steps": {
478
+ "type": "array",
479
+ "maxItems": 8,
480
+ "items": {
481
+ "type": "string",
482
+ "maxLength": 200
483
+ }
484
+ },
485
+ "artifact_name": {
486
+ "type": "string",
487
+ "maxLength": 240
488
+ },
489
+ "artifact_path": {
490
+ "type": "string",
491
+ "maxLength": 500
492
+ },
493
+ "v1": {
494
+ "type": "integer",
495
+ "minimum": 0
496
+ },
497
+ "v2": {
498
+ "type": "integer",
499
+ "minimum": 1
500
+ },
501
+ "decisions": {
502
+ "type": "array",
503
+ "maxItems": 8,
504
+ "items": {
505
+ "type": "string",
506
+ "maxLength": 200
507
+ }
508
+ },
509
+ "pending_tests": {
510
+ "type": "array",
511
+ "maxItems": 8,
512
+ "items": {
513
+ "type": "string",
514
+ "maxLength": 200
515
+ }
516
+ },
517
+ "tool_family": {
518
+ "type": "string",
519
+ "enum": [
520
+ "mcp",
521
+ "browser",
522
+ "filesystem",
523
+ "terminal",
524
+ "other"
525
+ ]
526
+ },
527
+ "error_hint": {
528
+ "type": "string",
529
+ "maxLength": 400
530
+ },
531
+ "error_class": {
532
+ "type": "string",
533
+ "enum": [
534
+ "invalid_arguments",
535
+ "context_lost",
536
+ "timeout",
537
+ "permission_denied",
538
+ "missing_file",
539
+ "edit_conflict",
540
+ "unknown"
541
+ ]
542
+ },
543
+ "retry_count": {
544
+ "type": "integer",
545
+ "minimum": 0,
546
+ "maximum": 20
547
+ }
548
+ }
549
+ }
550
+ }
551
+ ]
552
+ }