-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or requestfeature:phase2-governancePhase 2 Governance featuresPhase 2 Governance featuresphase:P2.3CLI EnhancementsCLI Enhancements
Description
Task: Add cch explain rule --json output
Phase: 2.3 - CLI Enhancements
Estimated: 0.5 day
File: cch_cli/src/cli/explain.rs
Depends on: P2.3-T02
Description
Add machine-readable JSON output format for cch explain rule.
Acceptance Criteria
- Output complete rule as JSON
- Include metadata
- Include activity stats
- Machine-parseable format
Usage
cch explain rule block-force-push --jsonExample Output
{
"name": "block-force-push",
"event": "PreToolUse",
"mode": "enforce",
"priority": 100,
"matchers": { "tools": ["Bash"], "command_match": "git push.*--force" },
"actions": { "block": true },
"metadata": { "author": "security-team" },
"activity": { "triggered": 14, "blocked": 3, "last_trigger": "2025-01-20T14:32:00Z" }
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeature:phase2-governancePhase 2 Governance featuresPhase 2 Governance featuresphase:P2.3CLI EnhancementsCLI Enhancements