Audit logs in project and generate plan to manage them with Universal Log Manager
Audit logs and generate remediation plan to adopt Universal Log Manager.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-logs@fractary[--project-root <path>] [--execute]claude-haiku-4-5Audit existing logs and log-like files in project, identify what should be managed by the Universal Log Manager, and generate actionable remediation specification.
<ARGUMENT_SYNTAX>
This command follows the standard space-separated syntax:
--flag value (NOT --flag=value)# Correct ✅
/fractary-logs:audit
/fractary-logs:audit --project-root ./my-project
/fractary-logs:audit --execute
# Incorrect ❌
/fractary-logs:audit --project-root=./my-project
/fractary-logs:audit --execute=true
</ARGUMENT_SYNTAX>
/fractary-logs:audit [--project-root <path>] [--execute]
Use /fractary-logs:audit to:
Use /fractary-logs:init instead if:
--project-root: Root directory to audit. Defaults to current directory.--execute: Execute high-priority remediations immediately after audit. Defaults to false (generate spec only).Load Configuration
Discover Current State
Analyze Against Best Practices
Generate Remediation Specification
Optional Execution (if --execute flag)
The audit produces two separate documents plus discovery data:
File: /logs/audits/audit-{timestamp}.md
Storage:
/logs/audits/ (ephemeral)Purpose: Point-in-time assessment of what's wrong and why.
File: /specs/logs-remediation-{timestamp}.md
Storage:
/specs/ at project rootPurpose: Actionable plan for exactly how to fix it.
discovery-logs.json - Log file inventorydiscovery-vcs-logs.json - Logs in version controldiscovery-patterns.json - Log patterns identifieddiscovery-storage.json - Storage analysisStorage: /logs/audits/tmp/ (temporary working directory)
Timestamp Format: YYYYMMDD-HHMMSS (e.g., 20250115-143022)
Key Distinctions:
Basic audit in current directory:
cd /path/to/my-project
/fractary-logs:audit
Audit specific project:
/fractary-logs:audit --project-root ./services/api
Audit and execute high-priority fixes:
/fractary-logs:audit --execute
Regular compliance check:
# Run monthly or when logs accumulate
/fractary-logs:audit
# Review spec
cat .fractary/audit/REMEDIATION-SPEC.md
# Execute in separate session if needed
Situation:
Workflow:
# Audit to identify all logs
/fractary-logs:audit
# Review what needs to be done
cat .fractary/audit/REMEDIATION-SPEC.md
# Follow spec to adopt fractary-logs management
Situation:
Workflow:
# Audit to find VCS logs
/fractary-logs:audit
# Spec will show which logs to archive
# and how to configure cloud storage
# Execute to archive and remove from VCS
/fractary-logs:audit --execute
Situation:
Workflow:
# Audit current state
/fractary-logs:audit
# Review findings
# Address any new unmanaged logs
Step 1: Loading Configuration
📖 Configuration: .fractary/plugins/logs/config.json
📖 .gitignore patterns loaded
✅ Configuration loaded
Step 2: Discovery
🔍 Scanning for log files...
🔍 Checking version control...
🔍 Analyzing storage...
🔍 Identifying patterns...
✅ Discovery complete
Step 3: Define Standard
📋 Defining fractary-logs best practices...
📋 Standard configuration and structure...
✅ Standard defined
Step 4: Gap Analysis
📊 Comparing current vs standard...
📊 Identifying gaps by priority...
📊 Calculating storage savings...
✅ Gap analysis complete
Step 5: Generate Audit Report
📝 Documenting current state...
📝 Writing gap analysis...
📝 Adding recommendations...
✅ AUDIT-REPORT.md generated
Step 6: Generate Remediation Spec
📝 Invoking Spec Manager agent...
📝 Creating 4-phase implementation plan...
📝 Adding executable commands...
✅ REMEDIATION-SPEC.md generated
Step 7: Summary
📋 Audit Results:
- Timestamp: 20250115-143022
- Total Logs: 45 files (2.3 GB)
- Managed: 3 files (150 MB)
- Unmanaged: 42 files (2.15 GB)
- In VCS: 12 files (450 MB)
- Gaps: 14 (8 high, 4 medium, 2 low)
- Potential Savings: 1.9 GB from repo
📁 Outputs:
- Audit Report (ephemeral): /logs/audits/audit-20250115-143022.md
- Remediation Spec (persistent): /specs/logs-remediation-20250115-143022.md
- Discovery Data (temp): /logs/audits/tmp/discovery-*.json
💡 Next Steps:
1. Review audit report (assessment)
2. Review remediation spec (action plan)
3. Follow 4-phase implementation
4. Verify with search command
After project has accumulated many logs:
# Audit to create adoption plan
/fractary-logs:audit
# Follow spec to:
# - Configure cloud storage
# - Move logs to managed locations
# - Archive historical logs
# - Update .gitignore
Remove logs from version control:
# Audit to find VCS logs
/fractary-logs:audit
# Spec shows how to:
# - Archive logs to cloud
# - Remove from Git history
# - Save repository space
Ensure logs properly managed:
# Monthly audit
/fractary-logs:audit
# Address any unmanaged logs
# Verify archival working correctly
project/
├── /logs/
│ └── audits/
│ ├── audit-20250115-143022.md # Audit reports (ephemeral)
│ ├── audit-20250110-092030.md # Previous audits preserved
│ └── tmp/ # Temporary discovery data
│ ├── discovery-logs.json
│ ├── discovery-vcs-logs.json
│ ├── discovery-patterns.json
│ └── discovery-storage.json
├── /specs/
│ └── logs-remediation-20250115-143022.md # Persistent spec (committed to VCS)
└── .fractary/
└── plugins/
└── logs/
└── config.json # Configuration only
Note: Multiple audits create timestamped files, preserving history.
Location: /logs/audits/audit-{timestamp}.md
The assessment document contains:
Storage & Retention:
/logs/audits/Purpose: Point-in-time assessment to understand what needs to change.
Location: /specs/logs-remediation-{timestamp}.md
The action plan document contains:
Storage & Retention:
/specs/ at project rootPurpose: Step-by-step guide with actionable commands to bring logs into compliance.
Key Features:
Follow this process to adopt log management:
Review the audit report (understand what needs to change)
# Find latest audit
ls -lt /logs/audits/
cat /logs/audits/audit-20250115-143022.md
Review the remediation spec (understand how to change it)
# Find latest spec
ls -lt /specs/
cat /specs/logs-remediation-20250115-143022.md
Execute Phase 1 (Configure cloud storage)
Execute Phase 2 (Set up log management)
Execute Phase 3 (Archive historical logs)
Execute Phase 4 (Configure auto-capture)
Verify setup
/fractary-logs:search "test"
git status # Should show no log files
Commit configuration
git add .fractary/plugins/logs/config.json .gitignore
git commit -m "feat: adopt fractary-logs for log management"
Hybrid Retention Strategy:
Version Control Benefits:
Operational Benefits:
Before running audit:
This command invokes the log-manager agent with the audit operation.
USE AGENT: log-manager with operation=audit, project-root from --project-root parameter (defaults to current directory), and execute from --execute parameter (defaults to false)