Skip to content

Audit and tighten /diagnose-issue slash command#895

Merged
PavelMakarchuk merged 3 commits into
mainfrom
audit/diagnose-issue-skill
May 11, 2026
Merged

Audit and tighten /diagnose-issue slash command#895
PavelMakarchuk merged 3 commits into
mainfrom
audit/diagnose-issue-skill

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

Summary

Based on running the /diagnose-issue workflow on ~10 recent issues (#877#890), this PR tightens the skill to:

  1. Add Step 0 pre-triage that short-circuits work when:
  2. Reframe Critical Rule Added connector to LLM. Added requirements.txt. #1 to "current PE vs TaxAct only" (the reporter's PE in output.txt is useful for triage in Step 0b but never for the actual diagnosis comparison).
  3. Mandate direct PE queries in Step 4 — every PE value in the comparison table must come from Simulation.calculate(...) or the CSV output; never inferred from gaps between variables. (Lesson from ME 2025 HoH 259Kpensions 30Kgssi 30Kproptax 20Kmortgage 2depx #883 where guessing led to a vague write-up.)
  4. Tighten Step 7 — when PE and TaxAct disagree on a specific credit/deduction, fetch the primary sources (statute + current-year form PDF + instructions booklet). Web-search summaries about state tax law are routinely wrong (literal example: a search told me WV doesn't have a state CDCC; the statute and 2025 IT-140 booklet both clearly establish it).
  5. Document mstat=1 + depx≥1 → HoH inference in Step 2.
  6. Drop stale references: the always-404 <issue>.yaml from the batch download, the issue_analysis/ tracker step we never use, the broken self-referencing example URL.
  7. Fix the variable-table placeholders that lost their {state} braces, plus the misleading state_income_tax PE-variable name.

Test plan

Validated on six issues during the audit:

🤖 Generated with Claude Code

PavelMakarchuk and others added 3 commits May 10, 2026 19:56
Based on recent issue runs (#877, #879, #884, #885, #886, #889, #890):

- Add Step 0 pre-triage with three short-circuit checks:
  (a) bug claim vs informational question,
  (b) compare reporter's PE version to local + CHANGELOG grep,
  (c) gh search for existing PE-US tracking issue/PR.
- Reframe Critical Rule #1 from "PE / TAXSIM / TaxAct" to
  "current PE / reporter's PE / TaxAct" — matches what the bundle
  actually contains.
- Add Critical Rule #4: verify against primary sources, not
  search summaries (search results on state tax law are frequently
  stale or wrong).
- Expand Step 7: when PE and TaxAct disagree, fetch all three —
  statute text, current-year form PDF, instructions booklet — and
  cross-reference before concluding.
- Document mstat=1 + depx>=1 -> HoH inference in Step 2.
- Step 5 PDF snippet iterates all bundle PDFs instead of hardcoded
  form.pdf.
- Step 9 drops stale issue_analysis tracker; adds cross-link step.
- Remove the always-404 <issue>.yaml from the batch download.
- Fix v37/v38/v39 variable-table placeholders that lost their
  state-substitution braces.
- Fix self-referencing example link in Common Root Causes.

Tested on issue #886 (WV CDCC): new Step 0c surfaced PR #3019
quickly; new Step 7 forced fetching the 2025 IT-140 booklet
(page 7 recap + page 17 description), confirming PE correctly
implements W.Va. Code §11-21-26.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two adjustments based on testing on issue #883:

- Critical Rule #1: comparison is now "current PE vs TaxAct only".
  Reporter's PE version is still useful for Step 0b triage (version
  comparison + changelog grep) but never for the actual diagnosis
  comparison. Avoids confusion about which PE values to use.
- Step 4: comparison table now has just two PE columns and an
  explicit rule that every PE value MUST come from a direct query
  (Step 3 CSV or `Simulation.calculate(...)`). Never infer a PE
  value from a gap between other variables.
- Debugging checklist updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-taxsim Ready Ready Preview, Comment May 11, 2026 2:20pm

Request Review

@PavelMakarchuk PavelMakarchuk merged commit 2e1d2d5 into main May 11, 2026
12 checks passed
@PavelMakarchuk PavelMakarchuk deleted the audit/diagnose-issue-skill branch May 11, 2026 14:46
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