mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Implement a comprehensive governance system to manage agent prompt changes safely. Key features: - **Proposal Workflow:** Prompt changes are now "proposals" stored in `src/proposals/` with metadata and diffs. - **Governance Agent:** A new `governance-agent` reviews and applies proposals using `scripts/governance/process-proposals.mjs`. - **Validation:** Strict validation ensures changes are limited to allowed directories (`src/prompts/daily|weekly`) and preserve required headers. - **Lock Enhancements:** Lock events now include `promptHash`, `promptPath`, and `gitCommit` for full auditability. - **Rollback:** New `torch-lock rollback` command restores prompts from local history (`.torch/prompt-history/`) or git. - **CLI:** Added `proposal` (create, list, show, apply, reject) and `rollback` commands. This establishes a "Stage -> Evaluate -> Apply" gate for prompt evolution, preventing silent drift and ensuring constitutional stability. Co-authored-by: PR0M3TH3AN <[email protected]>