testing-spine

Tests the Runtime Truth Spine types, dispatch seam, and anti-accretion gate with pytest.

1|3|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill testing-spine-aikagrya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing-spine
Source: https://github.com/AIKAGRYA/dharma_swarm/tree/main/.agents/skills/testing-spine
Command: npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill testing-spine-aikagrya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest.

What problem does it solve? Changes to the Runtime Truth Spine (EvidenceReceipt, RoutingDecision, invoke_agent) can silently corrupt every downstream receipt, and the anti-accretion gate in tools/spine_check.py is often tested only on its PASS side. This Skill provides a complete verification procedure covering acceptance tests, gate rejection, type invariants, and regression sweeps. ## Core Features & Use Cases - Spine acceptance testing: Runs the five doctrine §11 dispatch dropoff scenarios via pytest against tests/test_dispatch_dropoff_sources.py. - Bidirectional gate verification: Proves tools/spine_check.py both rejects undeclared sqlite3 imports and passes files with a proper # spine: header, including temp-file cleanup. - Type invariant checks: Validates frozen immutability, OTel span export shape, and JSON round-trip for EvidenceReceipt, plus the invoke_agent pass-through protocol with an async stub. - Use Case: After modifying dharma_swarm/spine/ or the spine_check gate, run this procedure to confirm all acceptance scenarios pass, the gate still rejects violations, and adjacent surfaces (telic seam, task board, A2A) show no regression versus a same-session baseline. ## Quick Start Run the spine acceptance tests and the anti-accretion gate in both REJECT and PASS directions, then report the verdict using the SPINE TEST VERDICT output format.

Frequently Asked Questions about testing-spine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test changes to the dharma_swarm spine module?▼

Run pytest on tests/test_dispatch_dropoff_sources.py to cover the five doctrine §11 acceptance scenarios, then execute python3 tools/spine_check.py for the anti-accretion gate. Finish with regression sweeps on adjacent test files like test_telic_seam.py and test_task_board.py.

How do I test that a gate rejects violations, not just passes?▼

Create a temporary file importing sqlite3 without a # spine: header and confirm spine_check.py exits 1, then create one with the header and confirm exit 0. Always delete the temp files afterward so the next gate run stays clean.

What invariants should EvidenceReceipt satisfy?▼

EvidenceReceipt must be frozen so mutation raises an error, export an OTel span containing gen_ai.operation.name and dharma.receipt_id attributes, and survive a JSON round-trip through to_dict with fields intact.

Why did spine_check.py fail after my change?▼

The gate fails when a file in enforcement scope imports sqlite3 or aiosqlite without declaring a # spine: header. Check the current _is_grandfathered() list in tools/spine_check.py, and never fix a failure by widening that list or deleting a header requirement.

Can I add a new sqlite store to work around the spine gate?▼

No. Adding new sqlite stores to dodge the gate is explicitly forbidden; instead extend existing spine owners. The gate exists to keep the spine as the single truth layer for receipts.