Chain arithmetic audit
Skill lubochka/xiigen-mvp-engine/.agents/skills/chain-arithmetic-audit
Self-building AI code generation engine that generates application flows instead of implementing them. AGPL-3.0.From the repository description
npx -y skills add lubochka/xiigen-mvp-engine --skill chain-arithmetic-auditAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 18 days oldThe repository was created 18 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, 537 tokens by cl100k_base, as published. Nobody here has run it
Chain Arithmetic Audit Skill
Verifies that baseline + Σ(phase deltas) = final for every tracked metric across all sessions and phases. FC-1 checks single-document consistency; this skill checks end-to-end chain math.
When to Invoke
- At FC-1 check time — extends FC-1 from "do documents agree" to "does the math work end-to-end"
- At session end when writing Section A — verify "Before" equals the previous session's "After"
- Any time a plan spans multiple sessions or phases with incremental counts
Rules
- Extract all count references from STATE.json, REFERENCE-PLAN, and every SESSION file
- Build directed graph:
baseline → S1 delta → S2 delta → ... → final - Verify every edge:
node[n].after == node[n+1].before - Verify terminal:
baseline + Σ(all deltas) == final_expected - Any gap or mismatch = FC-1 FAIL with exact location and value
Detection
# Extract all count transitions
grep -n "before\|after\|delta\|expected\|baseline\|tests_after\|spec_files_after" STATE.json
# For each session A → B: verify A.after == B.before
# Example chain for XIIGen test coverage plan:
# 2365 (Phase 11) → +18 (S1) = 2383 → +10 (S3) = 2393 → +N (S4) = final
Verification Table Format
| Transition | Before | Delta | After | Verified |
|---|---|---|---|---|
| Phase 11 → S1 | 2365 | +18 | 2383 | ✅ |
| S1 → S2 | 2383 | +0 (server) | 2383 | ✅ |
| S2 → S3 | 2383 | +10 | 2393 | ✅ |
| S3 → S4 | 2393 | +N | 2393+N | TBD |
Anti-Pattern
Plan 1 said final_expected_counts: 103 but phase totals summed to 105. FC-1 passed (individual documents agreed). Chain arithmetic failed. This skill catches what FC-1 misses.
Integration
- Extends
plan-review-skillFC-1 - Invoked by
infrastructure-discoveryGate 0 Step 3 - Results feed into Section A "zero-regression delta" at session end
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.