Add enterprise-grade standards to scripts

- Add copyright headers to all validation scripts
- Add usage/help functions to user-facing scripts
- Enhance common.sh with dependency checking and timestamps
- Add ENTERPRISE.md with comprehensive standards documentation
- Update scripts/README.md with enterprise features section
- Improve error messages and exit code handling

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-03 23:08:55 +00:00
parent 0f15207d49
commit f2b8bc9003
16 changed files with 1063 additions and 6 deletions

View File

@@ -255,6 +255,18 @@ WARN: ✗ tabs (warnings/issues found - run with -v for details)
## Best Practices
### Enterprise Standards
For comprehensive enterprise-grade scripting standards, see
[ENTERPRISE.md](./ENTERPRISE.md).
Key highlights:
- **Error Handling**: Fail fast with clear, actionable messages
- **Security**: Input validation, no hardcoded secrets
- **Logging**: Structured output with timestamps
- **Portability**: Cross-platform compatibility
- **Documentation**: Usage functions and inline comments
### Writing New Scripts
1. **Use the library functions**:
@@ -313,6 +325,51 @@ Scripts are automatically executed in GitHub Actions workflows:
- `.github/workflows/ci.yml` - Continuous integration
- `.github/workflows/repo_health.yml` - Repository health checks
## Enterprise Features
The scripts in this repository follow enterprise-grade standards:
### Dependency Checking
Scripts validate required dependencies at startup using `check_dependencies`:
```bash
check_dependencies python3 git sed
```
### Timestamp Logging
All major operations include timestamps for audit trails:
```bash
log_info "Start time: $(log_timestamp)"
```
### Usage Documentation
All user-facing scripts include comprehensive help:
```bash
./scripts/run/validate_all.sh --help
./scripts/fix/versions.sh --help
```
### Standardized Exit Codes
- `0` - Success
- `1` - Fatal error
- `2` - Invalid arguments
### Enhanced Error Messages
Clear, actionable error messages with context:
```bash
die "Required file not found: ${CONFIG_FILE}. Run setup first."
```
See [ENTERPRISE.md](./ENTERPRISE.md) for complete standards documentation.
## Version History
| Version | Date | Description |