@bonginkan/maria-lite 0.0.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 (32) hide show
  1. package/LICENSE +125 -0
  2. package/README.md +35 -0
  3. package/dist/cli.cjs +161094 -0
  4. package/dist/cli.cjs.map +1 -0
  5. package/knowledge-packs/caio-ai-management-pack.yaml +21 -0
  6. package/knowledge-packs/ceo-decision-pack.yaml +22 -0
  7. package/knowledge-packs/cto-engineering-execution-pack.yaml +22 -0
  8. package/knowledge-packs/cxo-kpi-analytics-pack.yaml +23 -0
  9. package/knowledge-packs/dev-environment-operations-pack.yaml +19 -0
  10. package/knowledge-packs/e2e-testing-configuration-pack.yaml +20 -0
  11. package/knowledge-packs/intent-routing-pack.yaml +19 -0
  12. package/knowledge-packs/lint-truth-pack.yaml +19 -0
  13. package/knowledge-packs/maria-os-local-mode-local-llm-pack.yaml +38 -0
  14. package/knowledge-packs/operations-decomposition-super-pack.yaml +23 -0
  15. package/knowledge-packs/parent-maria-pack.yaml +23 -0
  16. package/knowledge-packs/product-storytelling-pack.yaml +23 -0
  17. package/knowledge-packs/team-dev-workflow-pack.yaml +19 -0
  18. package/package.json +47 -0
  19. package/schemas/ceo-clone/1.2/AuditEvent.schema.json +84 -0
  20. package/schemas/ceo-clone/1.2/BoundarySpec.schema.json +104 -0
  21. package/schemas/ceo-clone/1.2/CandidateDecision.schema.json +21 -0
  22. package/schemas/ceo-clone/1.2/D3ExecutionPolicy.schema.json +53 -0
  23. package/schemas/ceo-clone/1.2/D3MatchExplanation.schema.json +53 -0
  24. package/schemas/ceo-clone/1.2/DecisionLog.schema.json +211 -0
  25. package/schemas/ceo-clone/1.2/DecisionRequest.schema.json +55 -0
  26. package/schemas/ceo-clone/1.2/DecisionResponse.schema.json +136 -0
  27. package/schemas/ceo-clone/1.2/DeliveryAndAcceptance.schema.json +73 -0
  28. package/schemas/ceo-clone/1.2/ExecutionEnvelope.schema.json +39 -0
  29. package/schemas/ceo-clone/1.2/ReviewQueue.schema.json +30 -0
  30. package/schemas/ceo-clone/1.2/ReviewSloPolicy.schema.json +40 -0
  31. package/schemas/ceo-clone/1.2/SupportAccessBoundary.schema.json +40 -0
  32. package/schemas/ceo-clone/1.2/index.schema.json +46 -0
@@ -0,0 +1,21 @@
1
+ id: caio-ai-management-pack
2
+ title: "CAIO AI Management Pack (Lite)"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: domain
6
+ category: ai_management
7
+ description: >
8
+ Minimal CAIO guidance: AI roadmap, evaluation, governance, model lifecycle.
9
+ entries:
10
+ - id: caio-output-structure
11
+ kind: template
12
+ title: "CAIO response structure"
13
+ importance: high
14
+ summary: >
15
+ A concise AI management response template.
16
+ body: |-
17
+ Provide:
18
+ - AI roadmap outline (outcomes → capability tracks → enablers)
19
+ - Evaluation plan (offline + human + safety)
20
+ - Governance checklist (release, monitoring, rollback)
21
+
@@ -0,0 +1,22 @@
1
+ id: ceo-decision-pack
2
+ title: "CEO Decision Pack (Lite)"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: domain
6
+ category: business
7
+ description: >
8
+ Minimal CEO-style decision support structure: risks, assumptions, portfolio, capital policy.
9
+ entries:
10
+ - id: ceo-output-structure
11
+ kind: template
12
+ title: "CEO response structure"
13
+ importance: high
14
+ summary: >
15
+ A concise executive response template.
16
+ body: |-
17
+ Provide:
18
+ - Decision summary (1-2 lines)
19
+ - Risks (top 3)
20
+ - Assumptions (top 3)
21
+ - Next steps checklist (5 items max)
22
+
@@ -0,0 +1,22 @@
1
+ id: cto-engineering-execution-pack
2
+ title: "CTO Engineering Execution Pack (Lite)"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: domain
6
+ category: engineering
7
+ description: >
8
+ Minimal CTO guidance: quality, architecture, throughput, SLO/SLA.
9
+ entries:
10
+ - id: cto-output-structure
11
+ kind: template
12
+ title: "CTO response structure"
13
+ importance: high
14
+ summary: >
15
+ A concise engineering leadership response template.
16
+ body: |-
17
+ Provide:
18
+ - Recommendation
19
+ - Trade-offs
20
+ - Risks + mitigations
21
+ - Concrete implementation steps
22
+
@@ -0,0 +1,23 @@
1
+ id: cxo-kpi-analytics-pack
2
+ title: "CXO KPI & Analytics Pack (Lite)"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: domain
6
+ category: analytics
7
+ description: >
8
+ Minimal executive committee guidance: KPIs, trade-offs, decision memo structure.
9
+ entries:
10
+ - id: cxo-output-structure
11
+ kind: template
12
+ title: "CXO committee synthesis structure"
13
+ importance: high
14
+ summary: >
15
+ A concise synthesis template across multiple perspectives.
16
+ body: |-
17
+ Provide:
18
+ - Alignment points
19
+ - Disagreements (with reasons)
20
+ - Recommended decision range
21
+ - Risks + mitigations
22
+ - KPI impact assumptions
23
+
@@ -0,0 +1,19 @@
1
+ id: dev-environment-operations-pack
2
+ title: "Dev Environment Operations (Lite) Pack"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: operations
6
+ category: development
7
+ description: >
8
+ Minimal operational guidance for running commands safely during development.
9
+ entries:
10
+ - id: safe-ops
11
+ kind: rules
12
+ title: "Safe operations"
13
+ importance: high
14
+ summary: >
15
+ Prefer plan-first flows and avoid destructive actions.
16
+ body: |-
17
+ - Prefer plan-only previews when supported.
18
+ - Avoid destructive commands unless explicitly requested.
19
+
@@ -0,0 +1,20 @@
1
+ id: e2e-testing-configuration-pack
2
+ title: "E2E Testing Configuration (Lite) Pack"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: operations
6
+ category: testing
7
+ description: >
8
+ Minimal E2E testing reminders.
9
+ entries:
10
+ - id: e2e-basics
11
+ kind: best_practice
12
+ title: "E2E basics"
13
+ importance: normal
14
+ summary: >
15
+ Keep E2E stable and deterministic.
16
+ body: |-
17
+ - Use dynamic ports for mock servers.
18
+ - Always cleanup resources in finally blocks.
19
+ - Avoid flaky timing dependencies.
20
+
@@ -0,0 +1,19 @@
1
+ id: intent-routing-pack
2
+ title: "Intent Routing (Lite) Pack"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: foundation
6
+ category: routing
7
+ description: >
8
+ Minimal guidance for deterministic intent routing in MARIA-LITE.
9
+ entries:
10
+ - id: routing-determinism
11
+ kind: rules
12
+ title: "Deterministic routing only"
13
+ importance: high
14
+ summary: >
15
+ Avoid heuristics; use explicit commands or LLM routing when needed.
16
+ body: |-
17
+ - Do not implement fuzzy routing heuristics.
18
+ - If routing requires judgment, delegate to LLM (ai-proxy) explicitly.
19
+
@@ -0,0 +1,19 @@
1
+ id: lint-truth-pack
2
+ title: "Lint Truth (Lite) Pack"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: foundation
6
+ category: quality
7
+ description: >
8
+ Minimal quality-gate reminders for MARIA-LITE.
9
+ entries:
10
+ - id: quality-gates
11
+ kind: rules
12
+ title: "Quality gates (lite)"
13
+ importance: high
14
+ summary: >
15
+ Keep the repo passing lint and typecheck after changes.
16
+ body: |-
17
+ - Run ESLint truth gate and TypeScript typecheck before shipping changes.
18
+ - Prefer deterministic checks; do not add heuristic/fuzzy logic in code.
19
+
@@ -0,0 +1,38 @@
1
+ id: maria-os-local-mode-local-llm-pack
2
+ title: "MARIA-LITE Local LLM Pack"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: operations
6
+ category: local_llm
7
+ description: >
8
+ Minimal guidance for local-only execution and safe behavior when using LM Studio / Ollama / vLLM.
9
+ entries:
10
+ - id: local-only-contract
11
+ kind: rules
12
+ title: "Local-only contract (lite)"
13
+ importance: high
14
+ summary: >
15
+ Keep execution local when local mode is requested.
16
+ body: |-
17
+ - If LOCAL_MODE=1 or MARIA_AUTH_MODE=local, prefer local inference where supported.
18
+ - Keep prompts compact to avoid small-context model overflow.
19
+ - Never silently downgrade safety requirements.
20
+ - id: env-conventions
21
+ kind: reference
22
+ title: "Environment variables (lite)"
23
+ importance: normal
24
+ summary: >
25
+ Provider/model selection environment variables.
26
+ body: |-
27
+ Provider:
28
+ - MARIA_LOCAL_LLM_PROVIDER=lmstudio|ollama|vllm
29
+
30
+ Base URLs:
31
+ - LMSTUDIO_BASE_URL=http://127.0.0.1:1234/v1
32
+ - OLLAMA_API_BASE=http://localhost:11434
33
+ - MARIA_VLLM_BASE_URL=http://127.0.0.1:8000/v1
34
+
35
+ Models (optional pins):
36
+ - MARIA_LOCAL_LLM_MODEL_FAST_LMSTUDIO / _OLLAMA / _VLLM
37
+ - MARIA_LOCAL_LLM_MODEL_HEAVY_LMSTUDIO / _OLLAMA / _VLLM
38
+
@@ -0,0 +1,23 @@
1
+ id: operations-decomposition-super-pack
2
+ title: "Operations Decomposition Pack (Lite)"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: domain
6
+ category: operations
7
+ description: >
8
+ Minimal COO-style guidance: decomposition, execution, incident handling.
9
+ entries:
10
+ - id: coo-output-structure
11
+ kind: template
12
+ title: "COO response structure"
13
+ importance: high
14
+ summary: >
15
+ A concise operations response template.
16
+ body: |-
17
+ Provide:
18
+ - Current state
19
+ - Desired state
20
+ - Gaps (top 5)
21
+ - Execution plan (phases + owners)
22
+ - Metrics to monitor
23
+
@@ -0,0 +1,23 @@
1
+ id: parent-maria-pack
2
+ title: "MARIA (Lite) - Parent System Prompt Pack"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: foundation
6
+ category: maria_core
7
+ description: >
8
+ Minimal parent guidance for MARIA-LITE. This pack is intentionally compact.
9
+ entries:
10
+ - id: maria-core-persona
11
+ kind: rules
12
+ title: "MARIA persona + non-negotiables (lite)"
13
+ importance: high
14
+ summary: >
15
+ Keep MARIA identity and safe, deterministic CLI behavior.
16
+ body: |-
17
+ - You are MARIA (MARIA OS / MARIA CODE), running inside MARIA-LITE.
18
+ - Do not claim to be ChatGPT/OpenAI.
19
+ - Be concise and high-signal.
20
+ - Do not add emojis unless explicitly requested.
21
+ - When the user asks for machine output (e.g., --json), output JSON only.
22
+ - Avoid unsafe actions and do not invent facts.
23
+
@@ -0,0 +1,23 @@
1
+ id: product-storytelling-pack
2
+ title: "Product Storytelling Pack (Lite)"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: domain
6
+ category: product
7
+ description: >
8
+ Minimal CPO guidance: product narrative, prioritization, roadmap communication.
9
+ entries:
10
+ - id: cpo-output-structure
11
+ kind: template
12
+ title: "CPO response structure"
13
+ importance: high
14
+ summary: >
15
+ A concise product leadership response template.
16
+ body: |-
17
+ Provide:
18
+ - Target user + problem
19
+ - Proposed solution + scope
20
+ - Prioritization rationale
21
+ - Risks + experiments
22
+ - Roadmap (Now/Next/Later)
23
+
@@ -0,0 +1,19 @@
1
+ id: team-dev-workflow-pack
2
+ title: "Team Dev Workflow (Lite) Pack"
3
+ version: 0.0.0
4
+ status: published
5
+ packKind: operations
6
+ category: workflow
7
+ description: >
8
+ Minimal workflow guidance for repo changes and reviews.
9
+ entries:
10
+ - id: workflow-basics
11
+ kind: best_practice
12
+ title: "Workflow basics"
13
+ importance: normal
14
+ summary: >
15
+ Keep changes reviewable and evidence-driven.
16
+ body: |-
17
+ - Prefer small, reviewable diffs.
18
+ - Capture evidence (commands, artifacts) for changes affecting behavior.
19
+
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@bonginkan/maria-lite",
3
+ "version": "0.0.0",
4
+ "description": "MARIA-LITE: lightweight MARIA OS CLI (src-lite).",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "author": "Bonginkan Inc.",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/bonginkan/maria.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/bonginkan/maria/issues"
13
+ },
14
+ "homepage": "https://maria-code.ai/",
15
+ "type": "module",
16
+ "bin": {
17
+ "maria-lite": "dist/cli.cjs"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "schemas",
22
+ "knowledge-packs",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "engines": {
27
+ "node": ">=20.10.0"
28
+ },
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "type-check": "tsc -p tsconfig.json --noEmit"
32
+ },
33
+ "dependencies": {
34
+ "ajv": "^8.17.1",
35
+ "ajv-formats": "^3.0.1",
36
+ "chalk": "^4.1.2"
37
+ },
38
+ "devDependencies": {
39
+ "tsup": "^8.0.1",
40
+ "typescript": "^5.3.3"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public",
44
+ "registry": "https://registry.npmjs.org/"
45
+ }
46
+ }
47
+
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "ceo-clone/1.2/AuditEvent.schema.json",
4
+ "title": "CEO Clone AuditEvent v1.2",
5
+ "description": "Tamper-evident audit events for commercial governance. Use hash chaining for immutability signals.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "event_id",
10
+ "timestamp",
11
+ "event_type",
12
+ "actor",
13
+ "target",
14
+ "summary",
15
+ "hash_chain"
16
+ ],
17
+ "properties": {
18
+ "event_id": { "type": "string", "minLength": 8, "maxLength": 128 },
19
+ "timestamp": { "type": "string", "format": "date-time" },
20
+ "event_type": {
21
+ "type": "string",
22
+ "enum": [
23
+ "BoundaryUpdated",
24
+ "PolicyUpdated",
25
+ "DecisionLogPublished",
26
+ "DecisionLogDiscarded",
27
+ "DecisionRecorded",
28
+ "QueryExecuted",
29
+ "ResponseEmitted",
30
+ "D3Used",
31
+ "D3Skipped",
32
+ "ReviewApproved",
33
+ "ReviewEdited",
34
+ "ReviewDiscarded"
35
+ ]
36
+ },
37
+ "actor": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "required": ["role", "name"],
41
+ "properties": {
42
+ "role": {
43
+ "type": "string",
44
+ "enum": ["CustomerAdmin", "DelegateReviewer", "Ops", "Security", "VendorSupport", "System"]
45
+ },
46
+ "name": { "type": "string", "minLength": 1, "maxLength": 120 }
47
+ }
48
+ },
49
+ "target": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["kind", "ref"],
53
+ "properties": {
54
+ "kind": {
55
+ "type": "string",
56
+ "enum": [
57
+ "BoundarySpec",
58
+ "D3ExecutionPolicy",
59
+ "ReviewSloPolicy",
60
+ "DecisionLog",
61
+ "DecisionRequest",
62
+ "DecisionResponse",
63
+ "CandidateDecision",
64
+ "ReviewQueue",
65
+ "System"
66
+ ]
67
+ },
68
+ "ref": { "type": "string", "minLength": 1, "maxLength": 500 }
69
+ }
70
+ },
71
+ "summary": { "type": "string", "minLength": 1, "maxLength": 1200 },
72
+ "details": { "type": "object", "description": "Optional structured details (must avoid raw customer data by policy)." },
73
+ "hash_chain": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["prev_hash", "hash"],
77
+ "properties": {
78
+ "prev_hash": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
79
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
80
+ }
81
+ }
82
+ }
83
+ }
84
+
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "ceo-clone/1.2/BoundarySpec.schema.json",
4
+ "title": "CEO Clone BoundarySpec v1.2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["id", "version", "authority", "risk_rules", "escalation", "unknown_handling", "allowed_use_cases"],
8
+ "properties": {
9
+ "id": { "type": "string", "minLength": 8, "maxLength": 128 },
10
+ "version": { "type": "string", "pattern": "^v\\d+\\.\\d+$" },
11
+ "authority": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["can_advise", "can_decide"],
15
+ "properties": {
16
+ "can_advise": { "type": "boolean" },
17
+ "can_decide": { "type": "boolean", "const": false }
18
+ }
19
+ },
20
+ "risk_rules": {
21
+ "type": "array",
22
+ "maxItems": 30,
23
+ "items": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["risk_tier", "allowed", "notes"],
27
+ "properties": {
28
+ "risk_tier": { "type": "string", "enum": ["S1", "S2", "S3", "S4", "S5", "unknown"] },
29
+ "allowed": { "type": "boolean" },
30
+ "notes": { "type": "string", "maxLength": 600 }
31
+ }
32
+ }
33
+ },
34
+ "escalation": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["conditions", "to_role"],
38
+ "properties": {
39
+ "conditions": { "type": "array", "maxItems": 30, "items": { "type": "string", "maxLength": 240 } },
40
+ "to_role": { "type": "string", "enum": ["CEO", "Board", "Legal", "Security", "Finance"] }
41
+ }
42
+ },
43
+ "unknown_handling": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["policy", "critical_unknowns_max"],
47
+ "properties": {
48
+ "policy": { "type": "string", "enum": ["block", "ask_min_questions_then_block", "defer_with_next_actions"] },
49
+ "critical_unknowns_max": { "type": "integer", "minimum": 1, "maximum": 3 }
50
+ }
51
+ },
52
+ "hard_prohibitions": { "type": "array", "maxItems": 80, "items": { "type": "string", "maxLength": 240 } },
53
+ "allowed_use_cases": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["allowed", "disallowed", "escalation_templates"],
57
+ "properties": {
58
+ "allowed": {
59
+ "type": "array",
60
+ "minItems": 1,
61
+ "maxItems": 50,
62
+ "items": { "$ref": "#/$defs/UseCaseTemplate" }
63
+ },
64
+ "disallowed": {
65
+ "type": "array",
66
+ "minItems": 1,
67
+ "maxItems": 50,
68
+ "items": { "$ref": "#/$defs/UseCaseTemplate" }
69
+ },
70
+ "escalation_templates": {
71
+ "type": "array",
72
+ "minItems": 1,
73
+ "maxItems": 30,
74
+ "items": { "$ref": "#/$defs/EscalationTemplate" }
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "$defs": {
80
+ "UseCaseTemplate": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["id", "title", "pattern", "expected_output_type"],
84
+ "properties": {
85
+ "id": { "type": "string", "maxLength": 128 },
86
+ "title": { "type": "string", "maxLength": 200 },
87
+ "pattern": { "type": "string", "maxLength": 500, "description": "Short natural language template for the request." },
88
+ "expected_output_type": { "type": "string", "enum": ["conditional_yes", "conditional_no", "defer", "block"] },
89
+ "notes": { "type": "string", "maxLength": 500 }
90
+ }
91
+ },
92
+ "EscalationTemplate": {
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "required": ["to_role", "when", "required_inputs"],
96
+ "properties": {
97
+ "to_role": { "type": "string", "enum": ["CEO", "Board", "Legal", "Security", "Finance"] },
98
+ "when": { "type": "string", "maxLength": 300 },
99
+ "required_inputs": { "type": "array", "maxItems": 10, "items": { "type": "string", "maxLength": 200 } }
100
+ }
101
+ }
102
+ }
103
+ }
104
+
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "ceo-clone/1.2/CandidateDecision.schema.json",
4
+ "title": "CEO Clone CandidateDecision v1.2",
5
+ "description": "Review-lite intermediate representation. Approved candidates become DecisionLog entries.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["id", "derived_from", "draft_decision_log", "confidence"],
9
+ "properties": {
10
+ "id": { "type": "string", "minLength": 8, "maxLength": 128 },
11
+ "derived_from": {
12
+ "type": "array",
13
+ "minItems": 1,
14
+ "maxItems": 50,
15
+ "items": { "type": "string", "maxLength": 200 }
16
+ },
17
+ "draft_decision_log": { "$ref": "DecisionLog.schema.json" },
18
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 }
19
+ }
20
+ }
21
+
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "ceo-clone/1.2/D3ExecutionPolicy.schema.json",
4
+ "title": "CEO Clone D3 Execution Policy v1.2",
5
+ "description": "Controls whether to run D3 explanation. This is not a decision policy; it is an explainability-cost policy.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "rules"],
9
+ "properties": {
10
+ "version": { "type": "string", "pattern": "^v\\d+\\.\\d+$" },
11
+ "rules": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["always_run_when", "skip_when", "defaults"],
15
+ "properties": {
16
+ "always_run_when": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["risk_tier_at_least", "top1_top2_gap_at_most", "critical_unknowns_at_least"],
20
+ "properties": {
21
+ "risk_tier_at_least": { "type": "string", "enum": ["S1", "S2", "S3", "S4", "S5", "unknown"] },
22
+ "top1_top2_gap_at_most": {
23
+ "type": "number",
24
+ "minimum": 0,
25
+ "maximum": 1,
26
+ "description": "If gap is small, run D3 for better explanation."
27
+ },
28
+ "critical_unknowns_at_least": { "type": "integer", "minimum": 0, "maximum": 3 }
29
+ }
30
+ },
31
+ "skip_when": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["only_one_candidate", "top1_score_at_least", "top1_top2_gap_at_least"],
35
+ "properties": {
36
+ "only_one_candidate": { "type": "boolean" },
37
+ "top1_score_at_least": { "type": "number", "minimum": 0, "maximum": 1 },
38
+ "top1_top2_gap_at_least": { "type": "number", "minimum": 0, "maximum": 1 }
39
+ }
40
+ },
41
+ "defaults": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": ["decision_on_timeout"],
45
+ "properties": {
46
+ "decision_on_timeout": { "type": "string", "enum": ["skip_d3_and_continue", "defer"] }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+