Autonomous Quality Assurance (QA) Agents in xlsxrb

This document defines the architecture, responsibilities, standard commands, and autonomous workflows of the Autonomous QA Agents Squad for xlsxrb.


1. Overview & Architectural Philosophy

xlsxrb is a pure Ruby library for reading and writing Excel spreadsheets with streaming support. Rather than introducing wrapper scripts or ad-hoc tasks, the autonomous QA agents directly leverage the repository’s existing verification infrastructure to guard specific quality attributes:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        xlsxrb Autonomous QA Squad                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    Test Rigor    β”‚   Type Safety    β”‚ Spec Compliance  β”‚MemoryStabilityβ”‚
β”‚ (Mutant 100% Killβ”‚  (Steep & RBS)   β”‚  (ECMA-376 SDK)  β”‚ (O(1) Memory) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ bundle exec      β”‚ bundle exec rake β”‚ bundle exec ruby β”‚ bundle exec   β”‚
β”‚ mutant run ...   β”‚ typecheck / sig  β”‚ test/xsd_...     β”‚ rake test:perfβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Specialized Agents & Quality Attributes

1. Test Rigor Agent (test-rigor)

# Run mutant on all 38 pure subjects (~28s) bundle exec rake mutant:pure β€œβ€˜

2. Type Safety Agent (type-safety)

# Regenerate signatures from inline annotations bundle exec rake sig

# Verify runtime type contracts dynamically TEST_WORKERS=1 bundle exec rake test:rbs β€œβ€˜

3. Specification Compliance Agent (spec-compliance)

# Run Microsoft .NET Open XML SDK E2E interoperability suite (opt-in) bundle exec rake test:e2e β€œβ€˜

4. Memory Stability Agent (memory-stability)

# Run ecosystem benchmark (throughput and allocation comparison) ruby -Ilib benchmark.rb β€œβ€˜


3. Pre-Push Verification

The standard pre-push hook runs the complete verification suite without requiring any custom setup:

# Standard pre-push checks
bin/pre-push

# Complete pre-push checks (including mutation and RBS runtime validation)
bin/pre-push --all

4. Instructions for Generative AI & Autonomous Coding Agents

When any LLM-powered coding assistant or autonomous agent (e.g., Claude, Cursor, Copilot, Gemini, OpenAI, or multi-agent frameworks) works on this repository, it should adopt the corresponding specialized QA role based on the quality attribute at stake:

  1. When modifying pure algorithms, converters, or boundary validators:

  2. Adopt the Test Rigor role.

  3. Run bundle exec mutant run --usage opensource -r ./test/xlsxrb/<test_file>.rb -- "<Subject>" on modified methods, or run bundle exec rake mutant:pure.

  4. Never accept surviving mutants. Add precise, boundary-conscious assertions to maintain a 100.00% kill rate.

  5. When modifying method signatures, interfaces, or adding public APIs:

  6. Adopt the Type Safety role.

  7. Keep inline RBS annotations (#: (...) -> ...) updated in lib/.

  8. Regenerate signatures using bundle exec rake sig and verify zero errors with bundle exec rake typecheck.

  9. When modifying XML generation, serialization, or writer logic:

  10. Adopt the Specification Compliance role.

  11. Run bundle exec ruby -Ilib -Itest test/xsd_validation_test.rb to verify ECMA-376 Part 4 XSD compliance.

  12. Respect schema sequencing (xs:sequence) and required OOXML attributes.

  13. When modifying row streaming, parsing loops, or memory buffers:

  14. Adopt the Memory Stability role.

  15. Run bundle exec rake test:perf to verify that retained memory remains flat ($O(1)$) and below the 5MB threshold.

  16. Avoid creating persistent object references inside stream callbacks.

Detailed Role Playbooks

Reference playbooks detailing analysis techniques and workflows are available at: - Test Rigor: .agents/skills/test-rigor/SKILL.md - Type Safety: .agents/skills/type-safety/SKILL.md - Specification Compliance: .agents/skills/spec-compliance/SKILL.md - Memory Stability: .agents/skills/memory-stability/SKILL.md - Quality & Language Policies: .agents/rules/qa_agents.md