Skip to content

FEAT: Implement Anticipatory Ethics DMA (AE-DMA) for tool veto#507

Open
phahim1 wants to merge 1 commit intoCIRISAI:mainfrom
phahim1:feat/ae-dma-veto
Open

FEAT: Implement Anticipatory Ethics DMA (AE-DMA) for tool veto#507
phahim1 wants to merge 1 commit intoCIRISAI:mainfrom
phahim1:feat/ae-dma-veto

Conversation

@phahim1
Copy link
Copy Markdown

@phahim1 phahim1 commented Nov 23, 2025

✨ Summary of Changes

This PR introduces the Anticipatory Ethics Decision-Making Algorithm (AE-DMA) as a core safety feature to prevent the agent from executing actions that violate mandated critical integrity rules (e.g., uptime requirements).

The feature is demonstrated by implementing a core Veto rule on a newly registered high-risk tool.

🛡️ Core Feature: The Veto Rule

The system now contains the following enforceable safety boundary:

Component Function Status
Tool patch_critical_server Registered as a high-risk tool.
AE-DMA Logic The AnticipatoryDMA.process() method intercepts the action if the tool is called.
Veto Condition If the tool's description/parameters contain "reboot" or "downtime," the DMA returns a VETO status (P(Harm)=0.95), forcing the Action Selection DMA to reject the thought.

🔍 Key Files for Audit

Please review the following files:

File Path Purpose
ciris_engine/logic/dma/anticipatory_dma.py New Veto Logic. Contains the implementation of the core safety rule.
ciris_modular_services/tools/sentinel_tools.py New Tool Definition. Defines the high-risk tool and the trigger keyword ("reboot").
ciris_engine/logic/services/tools/core_tool_service/service.py Tool Integration. Registers the new SentinelTools service so the LLM can see it.
ciris_engine/logic/runtime/ciris_runtime.py DMA & Startup Registration. Contains the logic to register the DMA and the temporary code override to force CLI mode for testing.
cirisagent/config/essential.yaml Config Cleanup. Removed the final platform: cli entry that caused validation errors.

🐛 Known Issues / Follow-up

During testing, strict Pydantic configuration validation repeatedly blocked the runtime from starting in the required interactive CLI mode.

  • Temporary Fix: A direct code mutation was required inside ciris_engine/logic/runtime/ciris_runtime.py to force adapter loading (adapter_types = ["cli"]). This override should be reviewed and reverted post-merge, pending a framework fix.
  • Follow-up: We need to investigate why the EssentialConfig validation schema forbids external configuration overrides for platform/adapter_mode.

@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Nov 23, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant