Skip to content

Optimize review-user-guide, review-architecture, analyze-db skills (~75% smaller)#35

Merged
ydesgagn merged 1 commit into
masterfrom
optimize-review-skills
May 9, 2026
Merged

Optimize review-user-guide, review-architecture, analyze-db skills (~75% smaller)#35
ydesgagn merged 1 commit into
masterfrom
optimize-review-skills

Conversation

@ydesgagn
Copy link
Copy Markdown
Contributor

@ydesgagn ydesgagn commented May 9, 2026

Summary

Applies the same optimization pattern proven on code-review-deep to the three largest review skills. Each was bloated with the same anti-patterns: a multi-page inline checkpoint log, per-framework duplicated detection commands, and 4-8 inline templates the model already knows how to render.

Key changes:

  • review-user-guide (1460 → 328 lines, -77%) — replaced the 56-line inline checkpoint tracker with TaskCreate-based phase tracking; consolidated per-framework detection commands into compact bullet lists; replaced the four huge inline templates (Web/CLI/API/Library, ~620 lines) with structured per-product-type guidance that lists required sections and key formatting rules. Preserved all behavioral rules: walkthrough-style step-by-step guides, conditional visibility callouts, UI help-text reuse.
  • review-architecture (1459 → 393 lines, -73%) — same checkpoint-log replacement; flattened the 95-line exempt-type detection into a single decision table; merged Standard and ML/DL templates (~350 lines combined) into compact per-section bullets. Preserved the SOUP validation logic (Requirements / Risk Level / Verification Reasoning), the IEC 62304 risk-level table, and the case-insensitive file checks.
  • analyze-db (1392 → 330 lines, -76%) — replaced 184 lines of per-framework detection patterns with a single consolidated table; collapsed 257 lines of repetitive per-DB connectivity / schema queries into a single CLI Command Reference table; merged 5+ inline templates (SQL/MongoDB/Elasticsearch/Redis/BigQuery/Multi-DB) into per-DB section requirement bullets. Preserved every safety rule: large-table safeguards (estimated counts, sampling, no COUNT(*) on large tables), partition-filter requirements for BigQuery, anti-pattern lists, and the must-document-every-table mandate.

Total: 4311 → 1051 lines (-76%) across the three files, with every quality-preserving rule kept intact.

Types of changes

  • Bugfix (fixes an issue)
  • New feature (adds functionality)
  • Refactoring (improves code without changing functionality)
  • Breaking change (incompatible changes)
  • Build or security update (updates dependencies, libraries, or security patches)
  • Code style or documentation update (formatting, renaming, or documentation changes)
  • Other (please describe):

Checklist

  • Unit tests added to validate my fix/feature
  • I have manually tested my change
  • I did not add automation test. Why ?: Skill files are markdown prompts with no executable code path. Verified by running linters (markdown, GitHub Actions, YAML) — all 0 errors.
  • Database changes requiring migration with downtime or reprocessing of existing data
  • The SOUP file lists the risk Level, requirements and verification reasoning associated with each library
  • readme.md includes sections on introduction, installation, usage, and contributing
  • docs/architecture.md includes sections on the architecture diagram, software units, software of unknown provenance, critical algorithms and risk controls related to PII and security
  • Impact on PII, privacy regulations (CCPA/GDPR/PIPEDA), CIS benchmarks or security (availability/confidentiality/integrity); management must be notified

@ydesgagn ydesgagn merged commit afbc652 into master May 9, 2026
7 checks passed
@ydesgagn ydesgagn deleted the optimize-review-skills branch May 9, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant