|
| 1 | +# Maintenance Report Card - 2026-03-23 (v2) |
| 2 | + |
| 3 | +## Executive Summary |
| 4 | +This second audit focused on the **lenient structural testing** of all commands and agents. While the initial synchronization tests (`tests/test_sync.py`) were a significant improvement, many commands and agents still lack basic structural verification. Furthermore, some tests remain brittle by asserting on specific prompt content. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## 🛠️ Testing Inventory & Gaps |
| 9 | + |
| 10 | +### Commands (.gemini/commands/) - 15 Total |
| 11 | +- **Covered (5):** `review`, `maintenance`, `draft`, `plan`, `document`. (Through `test_review_command.py` and `test_sync.py`) |
| 12 | +- **Missing (10):** `commit`, `cron`, `debug`, `issues`, `learn`, `onboard`, `release`, `research`, `scaffold`, `task`. |
| 13 | +- **Gaps:** No basic TOML validity or key presence (`description`, `prompt`) checks for these commands. |
| 14 | + |
| 15 | +### Agents (.gemini/agents/) - 6 Total |
| 16 | +- **Covered (3):** `reviewer`, `planner`, `writer`. (Through `test_review_command.py`) |
| 17 | +- **Missing (3):** `debugger`, `learner`, `researcher`. |
| 18 | +- **Gaps:** No basic Markdown structure (e.g., presence of a title or specific name in frontmatter) checks for these agents. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## 🔍 Synchronization Issues |
| 23 | + |
| 24 | +### 1. Brittle Documentation Skips |
| 25 | +- **Issue:** `tests/test_sync.py` contains hardcoded skips for `scaffold` and `onboard` regarding their presence in `docs/user-guide.md`. |
| 26 | +- **Impact:** If these commands are ever removed or renamed, the tests won't catch it. The documentation should be updated, and the skips removed. |
| 27 | + |
| 28 | +### 2. Brittle Content Matching |
| 29 | +- **Issue:** `tests/test_review_command.py` still checks for specific strings like `"codebase_investigator"` or `"Maintenance Report Card"`. |
| 30 | +- **Impact:** Small wording changes in the prompts will break the tests unnecessarily. |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +## 📝 Actionable Recommendations |
| 35 | + |
| 36 | +### 1. Unified Dynamic Testing Strategy |
| 37 | +Implement a new test file, `tests/test_structure.py`, that uses `pytest.mark.parametrize` to dynamically discover and test all files in `.gemini/commands/` and `.gemini/agents/`. |
| 38 | + |
| 39 | +#### **Command Requirements (Lenient):** |
| 40 | +- Must be valid TOML. |
| 41 | +- Must contain `description` (string) and `prompt` (string) keys. |
| 42 | +- Prompt must not be empty. |
| 43 | + |
| 44 | +#### **Agent Requirements (Lenient):** |
| 45 | +- Must be valid Markdown. |
| 46 | +- Must contain the agent's name (case-insensitive) in the content or as a header. |
| 47 | +- Should contain a `tools` section (if relevant to the framework's schema). |
| 48 | + |
| 49 | +### 2. Cleanup `tests/test_review_command.py` |
| 50 | +- Move generalized structural tests to the new dynamic suite. |
| 51 | +- Keep only migration-specific tests (e.g., checking that `editor.md` or `revise.toml` no longer exist). |
| 52 | + |
| 53 | +### 3. Finalize Documentation Sync |
| 54 | +- Ensure `scaffold` and `onboard` are fully documented in `docs/user-guide.md`. |
| 55 | +- Remove the hardcoded skips from `tests/test_sync.py`. |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## 💡 Orchestration Tip |
| 60 | +Use the `/plan` command, pointing to this report, to formulate a strategy for implementing `tests/test_structure.py`. This will provide "blanket" coverage for all current and future commands/agents with minimal maintenance overhead. |
0 commit comments