Files
claude-code-glm-suite/skills/autonomous-planner/safety-rules.json
Gemini AI 61e5713549 Add autonomous planner agent with safety rules and PROACTIVE auto-triggering
- Created autonomous-planner.md agent file with context-aware workflow suggestions
- Implemented safety-rules.json for safe/risky operation classification
- Updated all installers (auto-installer.sh, interactive-install-claude.sh) to include autonomous planner
- Updated agent counts: 40→41 total agents, 8→9 PROACTIVELY coordinators, 4→5 Bonus agents
- Updated documentation (README.md, MASTER-PROMPT.md, extra-tools/README.md)
- Added test-autonomous-planner.sh TDD test suite
- Auto-triggers on: code changes, tests passing, deployments, safe task execution
2026-01-18 03:04:06 +04:00

252 lines
7.0 KiB
JSON

{
"version": "1.0.0",
"description": "Safety rules configuration for autonomous planner agent",
"safe_operations": {
"description": "Operations that can be auto-executed without confirmation",
"categories": [
{
"name": "testing",
"operations": [
"run_tests",
"run_unit_tests",
"run_integration_tests",
"run_specific_test",
"run_test_suite",
"check_test_results",
"generate_test_report"
],
"auto_execute": true,
"reason": "Testing is safe and provides valuable feedback"
},
{
"name": "code_quality",
"operations": [
"check_linting",
"run_linter",
"check_formatting",
"run_formatter_check",
"check_code_style",
"analyze_code_complexity"
],
"auto_execute": true,
"reason": "Code quality checks are read-only and safe"
},
{
"name": "coverage",
"operations": [
"generate_coverage_report",
"check_coverage_metrics",
"analyze_coverage_gaps",
"update_coverage_documentation"
],
"auto_execute": true,
"reason": "Coverage analysis is read-only and safe"
},
{
"name": "documentation",
"operations": [
"generate_documentation",
"update_api_docs",
"generate_code_docs",
"update_readme",
"generate_changelog_draft"
],
"auto_execute": true,
"reason": "Documentation generation is safe and beneficial"
},
{
"name": "review",
"operations": [
"review_changed_files",
"review_pull_request",
"check_code_changes",
"analyze_diff",
"review_commit"
],
"auto_execute": true,
"reason": "Code review is read-only and safe"
},
{
"name": "security",
"operations": [
"check_security_issues",
"run_security_scan",
"check_vulnerabilities",
"scan_dependencies",
"check_for_secrets"
],
"auto_execute": true,
"reason": "Security scanning is read-only and safe"
},
{
"name": "dependencies",
"operations": [
"check_dependencies",
"check_outdated_packages",
"verify_dependency_integrity",
"check_lockfile_consistency"
],
"auto_execute": true,
"reason": "Dependency checking is read-only and safe"
},
{
"name": "build",
"operations": [
"run_build",
"compile_code",
"run_compilation",
"check_build_status"
],
"auto_execute": true,
"reason": "Building code is safe and provides feedback"
}
]
},
"risky_operations": {
"description": "Operations that require explicit user confirmation",
"categories": [
{
"name": "deployment",
"operations": [
"deploy_to_production",
"deploy_to_staging",
"rollback_deployment",
"promote_environment",
"execute_deployment"
],
"require_confirmation": true,
"reason": "Deployment affects live systems and users"
},
{
"name": "database",
"operations": [
"run_migration",
"execute_database_script",
"modify_database_schema",
"delete_database_data",
"truncate_table",
"drop_table"
],
"require_confirmation": true,
"reason": "Database changes can be destructive and hard to reverse"
},
{
"name": "file_operations",
"operations": [
"delete_file",
"delete_directory",
"remove_files",
"clean_artifacts",
"purge_cache"
],
"require_confirmation": true,
"reason": "File deletion is destructive"
},
{
"name": "breaking_changes",
"operations": [
"make_breaking_change",
"update_major_version",
"change_public_api",
"remove_deprecated_code",
"modify_contract"
],
"require_confirmation": true,
"reason": "Breaking changes affect dependent systems"
},
{
"name": "refactoring",
"operations": [
"major_refactor",
"rewrite_module",
"restructure_project",
"change_architecture",
"reorganize_codebase"
],
"require_confirmation": true,
"reason": "Major refactoring can introduce bugs and regressions"
},
{
"name": "configuration",
"operations": [
"modify_config",
"change_settings",
"update_environment_vars",
"modify_secrets",
"change_credentials"
],
"require_confirmation": true,
"reason": "Configuration changes affect system behavior"
},
{
"name": "external_api",
"operations": [
"call_external_api",
"execute_webhook",
"trigger_external_action",
"send_notification",
"invoke_third_party_service"
],
"require_confirmation": true,
"reason": "External API calls can have unintended side effects"
},
{
"name": "git_operations",
"operations": [
"force_push",
"rewrite_history",
"reset_branch",
"delete_branch",
"modify_commit_history"
],
"require_confirmation": true,
"reason": "Git history changes can disrupt collaboration"
}
]
},
"learning_rules": {
"description": "Rules for learning and expanding autonomous capabilities",
"min_confirmations_for_learning": 3,
"max_risk_expansion_per_session": 1,
"learning_window_days": 30,
"allowed_expansions": [
{
"from": "risky_operations.deployment.deploy_to_staging",
"to": "safe_operations",
"condition": "min_5_successful_confirmations",
"reason": "Staging deployments can become routine"
},
{
"from": "risky_operations.file_operations.clean_artifacts",
"to": "safe_operations",
"condition": "min_3_successful_confirmations",
"reason": "Artifact cleaning is low-risk and routine"
}
]
},
"action_logging": {
"enabled": true,
"log_file": "logs/autonomous-actions.log",
"log_level": "info",
"retention_days": 90,
"fields": [
"timestamp",
"action_type",
"operation",
"risk_level",
"user_confirmation",
"outcome",
"execution_time_ms"
]
},
"user_preferences": {
"description": "Default user preferences (can be overridden)",
"auto_suggestions": true,
"max_suggestions_per_event": 5,
"min_confidence_threshold": 0.7,
"require_confirmation_threshold": "medium_risk",
"learning_enabled": true,
"adaptive_behavior": true
}
}