skills-vault/skills/review-bundle-audit/SKILL.md

104 lines
3.2 KiB
Markdown

---
name: review-bundle-audit
description: Use when Codex needs to preflight a review, handoff, release, CCRA, Web upload, article, video, Skill, or code-review bundle directory for required files, manifests, validation sidecars, reports, zip readability, missing materials, extra files, UTF-8 paths, and review-package completeness before a human or Agent review.
---
# Review Bundle Audit
## Purpose
Audit a review bundle directory before reviewer judgment is spent. Use the bundled script to produce deterministic Markdown and JSON reports about bundle structure, required files, readable manifests, validation sidecars, reports, zips, warnings, and blockers.
This Skill is a package audit only. It must not repair bundles, edit source files, or decide review acceptance.
## Command
```powershell
conda run -n skills-vault python .\scripts\review_bundle_audit.py `
--bundle-root C:\path\review-bundle `
--output-dir C:\path\helper-outputs `
--profile generic
```
Use `--profile-config C:\path\profile.yaml` when a project has its own required file names.
When installed under `C:\Users\wangq\.agents\skills\review-bundle-audit`, run from that Skill directory or use the installed script path.
## Built-In Profile
`generic` requires:
- `brief`: `*brief*.md`, `*brief*.markdown`
- `manifest`: `*manifest*.json`, `*manifest*.yaml`, `*manifest*.yml`
- `validation_sidecar`: `*validation*sidecar*.json`, `*validation*sidecar*.yaml`, `*validation*sidecar*.yml`
It optionally recognizes:
- `report`: `*report*.md`, `*report*.markdown`
- `zip`: `*.zip`
- `changed_files`: changed-file summary names
Extra files produce warnings, not blockers. Missing report or zip produces warnings. Unreadable manifest, sidecar, or zip produces a blocker.
## Profile Config
```yaml
profiles:
project-review:
required_files:
brief:
- review-brief.md
manifest:
- review-manifest.json
validation_sidecar:
- validation-sidecar.json
optional_files:
report:
- "*report*.md"
zip:
- "*.zip"
allowed_extra_patterns:
- notes/*.md
```
## Outputs
The script writes under `output_dir`:
```text
bundle-audit.md
bundle-audit.json
```
Reports include:
- bundle root and profile
- files discovered
- required files present and missing
- optional files present
- manifest status
- zip status
- validation sidecar status
- report status
- warnings and blocking errors
- machine-readable summary
Exit code is `0` when no blockers exist, `1` for audit blockers, and `2` for input/profile errors.
## Safety
- Read only the specified bundle directory and optional profile config.
- Write only audit reports under `output_dir`.
- Do not create, repair, normalize, or delete bundle files.
- Do not edit model cards, selector rules, regression cases, project docs, or source files.
- Treat the audit as evidence for a reviewer, not as review acceptance.
## Validation
After changing audit behavior, run:
```powershell
conda run -n skills-vault python -B -m unittest discover -s skills/review-bundle-audit/tests -v
conda run -n skills-vault python -B C:\Users\wangq\.codex\skills\.system\skill-creator\scripts\quick_validate.py skills/review-bundle-audit
```