π rc-record.sh
Purpose
- Emit a full ritual script from the current environment, capturing session commands, environment variables, manifest states, and log snapshots.
- Provide a reproducible dump of the Rotkeeper session as a sacred record.
CLI Interface
rc-record.sh [--dry-run] [--verbose] [--help]Supported flags:
--help,-hShow usage information and exit.--dry-runPreview the record action without writing to file.--verboseShow detailed logs.
Workflow Steps
- Setup & Configuration: Ensure
bones/logs/exists, parse flags. - State Capture: Collect Git SHA, timestamp, user, and host.
- Write or Preview: Append to
bones/logs/record.logor preview under dry-run.
Exit Codes
0β Record generated successfully.1β Error writing to output or missing directories.2β Invalid flag usage or missing manifest/logs when requested.
Examples
# Record current state
./bones/scripts/rc-record.sh
# Preview recording without writing
./bones/scripts/rc-record.sh --dry-run --verbose
# Show help
./bones/scripts/rc-record.sh --helpRoadmap
- Add a
--dry-runmode to preview sections without writing. - Support JSON-formatted output for machine-readable archives.
- Integrate with CI to auto-record each pipeline run.
- Emit colored terminal banners with ritual icons.
- Automated tests (bats/shunit2) to guard capture integrity.