|
| 1 | +# Final Review Skill |
| 2 | + |
| 3 | +When performing a final review before merge, include the following checks: |
| 4 | + |
| 5 | +## Template Parity Check |
| 6 | + |
| 7 | +Ensure all supported templates have parity across: |
| 8 | + |
| 9 | +1. **Template files** (`templates/` directory): |
| 10 | + - Each template should have a file (e.g., `bash.sh`, `typescript.ts`, `python.py`, `node.js`, `ruby.rb`) |
| 11 | + - All templates should include the same example operations (copy file, update JSON, replace directory) |
| 12 | + |
| 13 | +2. **Template registration** (`src/templates.rs`): |
| 14 | + - Each template file should be registered in the `TEMPLATES` array |
| 15 | + - Verify correct extension mapping |
| 16 | + |
| 17 | +3. **CLI help text** (`src/main.rs`): |
| 18 | + - The `--template` flag help text should list all supported templates |
| 19 | + |
| 20 | +4. **Documentation** (`CLAUDE.md`): |
| 21 | + - The templates section should list all template files |
| 22 | + |
| 23 | +5. **Integration tests** (`tests/integration.rs`): |
| 24 | + - The `test_list_templates` test should assert all templates are present |
| 25 | + |
| 26 | +6. **Fixture tests** (`tests/fixture_operations.rs`): |
| 27 | + - Each template should have a dedicated runtime test (e.g., `test_bash_runtime_migration`, `test_ruby_runtime_migration`) |
| 28 | + |
| 29 | +## CLI Command and Option Coverage |
| 30 | + |
| 31 | +Verify each CLI command and option is documented and tested: |
| 32 | + |
| 33 | +### Commands |
| 34 | + |
| 35 | +| Command | Documentation | Integration Test | Fixture Test | |
| 36 | +|---------|---------------|------------------|--------------| |
| 37 | +| `status` | CLAUDE.md | `test_status_no_migrations_dir`, `test_status_empty_migrations_dir`, `test_status_shows_applied_and_pending` | - | |
| 38 | +| `up` | CLAUDE.md | `test_up_applies_migrations`, `test_failed_migration_stops_execution` | All `test_migration_*` tests | |
| 39 | +| `create` | CLAUDE.md | `test_create_bash_migration`, `test_create_typescript_migration`, `test_create_increments_prefix` | - | |
| 40 | + |
| 41 | +### Global Options |
| 42 | + |
| 43 | +| Option | Documentation | Integration Test | |
| 44 | +|--------|---------------|------------------| |
| 45 | +| `-r, --root` | CLAUDE.md | Used in all integration tests | |
| 46 | +| `-m, --migrations` | CLAUDE.md | Default used in tests | |
| 47 | + |
| 48 | +### `up` Options |
| 49 | + |
| 50 | +| Option | Documentation | Integration Test | Fixture Test | |
| 51 | +|--------|---------------|------------------|--------------| |
| 52 | +| `--dry-run` | CLAUDE.md | `test_up_dry_run` | `test_dry_run_preserves_fixture` | |
| 53 | + |
| 54 | +### `create` Options |
| 55 | + |
| 56 | +| Option | Documentation | Integration Test | |
| 57 | +|--------|---------------|------------------| |
| 58 | +| `--template` | CLAUDE.md | `test_create_typescript_migration` | |
| 59 | +| `--description` | CLAUDE.md | (implicit in template content) | |
| 60 | +| `--list-templates` | CLAUDE.md | `test_list_templates` | |
| 61 | + |
| 62 | +## How to verify template parity |
| 63 | + |
| 64 | +Run this command to list all templates from the CLI: |
| 65 | +```bash |
| 66 | +cargo run -- create dummy --list-templates |
| 67 | +``` |
| 68 | + |
| 69 | +Then verify each template appears in: |
| 70 | +- `templates/` directory (one file per template) |
| 71 | +- `src/templates.rs` TEMPLATES array |
| 72 | +- `src/main.rs` help text for `--template` |
| 73 | +- `CLAUDE.md` templates section |
| 74 | +- `tests/integration.rs` test_list_templates assertions |
| 75 | +- `tests/fixture_operations.rs` runtime test functions |
| 76 | + |
| 77 | +## How to verify CLI coverage |
| 78 | + |
| 79 | +1. Run `cargo run -- -h` and `cargo run -- <command> -h` for each command |
| 80 | +2. Verify each option shown in help output has: |
| 81 | + - A corresponding entry in CLAUDE.md |
| 82 | + - At least one integration test that exercises it |
| 83 | + - A fixture test for options that affect migration execution |
| 84 | + |
| 85 | +## Checklist |
| 86 | + |
| 87 | +- [ ] All templates have parity (same example operations) |
| 88 | +- [ ] All CLI commands documented in CLAUDE.md |
| 89 | +- [ ] All CLI options documented in CLAUDE.md |
| 90 | +- [ ] Each command has integration tests |
| 91 | +- [ ] Each option has at least one test |
| 92 | +- [ ] Migration execution options have fixture tests |
| 93 | +- [ ] `cargo nextest run` passes |
| 94 | +- [ ] `cargo clippy` passes |
| 95 | +- [ ] `cargo fmt --check` passes |
0 commit comments