Skip to content

Correct the firm-level VAT docs page (#1320) - #1712

Merged
vahid-ahmadi merged 8 commits into
mainfrom
vahid-ahmadi/issue-1320-firm-vat-plan
Oct 24, 2026
Merged

vahid-ahmadi merged 8 commits into
mainfrom
vahid-ahmadi/issue-1320-firm-vat-plan

Conversation

@vahid-ahmadi

@vahid-ahmadi vahid-ahmadi commented May 27, 2026 •

Copy link
Copy Markdown
Collaborator

Corrects the firm-level VAT planning page (docs/book/programs/gov/hmrc/firm-vat.md), written for #1320.

The page itself is already on main: it shipped in #2386 (merged 21 October 2026), and its original .added changelog entry was released in 2.143.0. This branch has merged main, dropped the released fragment and now carries only corrections to main's copy of the page.

What this PR corrects (from its changelog fragment):

Corrected the firm-level VAT planning page (docs/book/programs/gov/hmrc/firm-vat.md): #1333 is closed as a duplicate of #1320, the proposed Firm entity no longer names a non-existent state containing entity, the data table now says FRS self-employment income is profit rather than turnover and that the FRS carries a main-job SIC division, and turnover-band counts come from ONS UK business: activity, size and location rather than Business demography.

The claim-by-claim review behind these corrections, with sources, is in the "Ready for hub review" comment on this PR.

  • Changelog fragment: changelog.d/1320-firm-vat-page-corrections.changed.md (changed).
  • Docs and changelog only; no code changes.

🤖 Generated with Claude Code

@vahid-ahmadi
vahid-ahmadi force-pushed the vahid-ahmadi/issue-1320-firm-vat-plan branch from 168ca87 to 5b263d8 Compare October 8, 2026 14:54
vahid-ahmadi and others added 3 commits October 12, 2026 11:02
#1320 and #1333 are filed as planning trackers for a Firm-entity VAT
implementation. Persist the plan in-repo as a "planned: not yet
modelled" docs page mirroring the BiK plan added in #1654.

The page covers:

- the current state (household-side VAT only; no Firm entity),
- the policy questions that firm-side VAT enables (registration
  threshold reforms, supplier-side rate changes, flat-rate scheme),
- Phase 1 MVP scope: Firm entity, threshold logic, supply split,
  output/input/net VAT,
- proposed entity definition and variable/parameter trees,
- the data gap and a synthetic-firm-panel imputation approach
  consistent with the second-stage pattern flagged in #1621,
- effort estimate and open questions (panel location, MTD mechanics,
  Datalab access).

When the MVP lands the "planned" warning at the top is dropped and the
file becomes the live VAT-firm-side docs page.
…elog fragment

Checked every variable, parameter, path and link against main in October
2026, updated the data pipeline references to Microcosm UK, and renamed the
changelog fragment to a Towncrier type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Anchor the VAT thresholds to 1 April 2024 (gov.uk lists £90,000 to
register and £88,000 to deregister) instead of "currently", drop the
unverified Microcosm UK release date and replacement claim, name the
Windsor Framework rather than the Northern Ireland Protocol, put the
flat-rate scheme under the planned gov.hmrc.vat.firm tree, remove em
dashes and sentence-case the phase headings. Drop the leading bullet
from the changelog fragment so towncrier does not render it twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vahid-ahmadi
vahid-ahmadi force-pushed the vahid-ahmadi/issue-1320-firm-vat-plan branch from 5b263d8 to 68f51b6 Compare October 12, 2026 09:10
The Lint job now runs ruff format --check on Markdown code blocks for
every pull request, docs-only ones included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 4 commits October 23, 2026 02:02
Main already carries this page (added by #2386); the merge brings the
branch up to date before the page is corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- #1333 was closed on 20 October 2026 as a duplicate of #1320.
- The proposed Firm entity no longer copies the "state" containing entity
  (PolicyEngine UK has no state entity, entities.py:46), and its owner role
  holds people, since only people can be members of a group entity.
- FRS self-employment income is profit, not turnover
  (self_employment_income.py:8), and the FRS does carry the main job's SIC
  division (sic_industry_division.py).
- Turnover-band counts come from ONS UK business: activity, size and
  location, not Business demography; the reference now names that release.
- Cut the unsupported link to #1621's second-stage imputation and the
  claim that uk-vatlab sizes each step; fixed the redirected GOV.UK VAT
  thresholds link.
- Replaced the released .added fragment with a .changed fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the independent review of the corrections: policyengine-core puts
every person in exactly one instance of each group entity and gives anyone
unlisted a one-person instance (simulation_builder.py:449-458), which the
proposed Firm design has to handle; and ONS's UK business counts cover only
VAT- and/or PAYE-based enterprises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Second-round review: a situation that lists households but no firms puts
everyone in one firm (simulation_builder.py add_default_group_entity), and
a dataset build must give every person a group id; only a situation that
lists firms gives the unlisted a one-person firm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Collaborator

UK hub (Claude build session, for Max)
Ready for hub review

Head: ae8513db5a9a612ddf30ad9eccd212c5e46b02d5

Context. This page already reached main, byte for byte, through #2386 (merged 21 October 2026; batch commit d50ee85), and its 1320.added.md entry is already in CHANGELOG.md under 2.143.0. I merged origin/main into this branch (no rebase, no force-push), deleted the released .added fragment, and corrected the page. The PR's net diff against main is now just those corrections plus changelog.d/1320-firm-vat-page-corrections.changed.md. Suggested title: "Correct the firm-level VAT planning page". Merging it with a fragment triggers a release. If the hub would rather batch the docs corrections from this run, git diff origin/main...ae8513db5 applies as one patch.

Review. I had a verifier extract and check every claim, checked each correction myself, and then ran independent adversarial reviews. Round 1 approved; round 2 asked for one wording fix; round 3 approved this head.

Corrected (12)

  1. Add firm analysis files #1333 is closed (20 October 2026, "not planned", duplicate of Add firm-level VAT logic with new Firm entity #1320); only Add firm-level VAT logic with new Firm entity #1320 is open. Source: gh api repos/PolicyEngine/policyengine-uk/issues/1333.
  2. The proposed Firm entity no longer copies containing_entities=["state"]. PolicyEngine UK has no state entity (policyengine_uk/entities.py:19,35,46). The block runs as written: build_entity in policyengine-core entities/helpers.py:7-15.
  3. The owner role holds people, because only people are members of a group entity (core taxbenefitsystems/tax_benefit_system.py:216,220; simulation_builder.py:490-496).
  4. Added core's membership rule for each build type: everyone is in exactly one firm; an unlisted person gets a one-person firm (simulation_builder.py:449-458); a situation with no firms listed puts everyone in one firm (add_default_group_entity); a dataset build must assign ids (join_with_persons).
  5. FRS self-employment income is profit, not turnover (policyengine_uk/variables/input/self_employment_income.py:8).
  6. The FRS does carry the main job's SIC division (policyengine_uk/variables/household/income/sic_industry_division.py:4-12, from Add employment sector (public/private) and SIC industry input variables #1785).
  7. Turnover-band counts come from ONS UK business: activity, size and location, not Business demography, which has no turnover bands. Fixed in the table and in step 1 of the imputation approach.
  8. The ONS reference now names that dataset: counts of VAT- and/or PAYE-based enterprises by SIC and turnover band from the IDBR (https://www.ons.gov.uk/businessindustryandtrade/business/activitysizeandlocation/datasets/ukbusinessactivitysizeandlocation).
  9. Cut "This mirrors the second-stage imputation pattern discussed in Align UK model/data pipeline with US patterns: reported-anchoring, second-stage imputation, and downstream bugs #1621". Align UK model/data pipeline with US patterns: reported-anchoring, second-stage imputation, and downstream bugs #1621's second stage is a QRF for FRS-only variables, not calibration to receipts.
  10. uk-vatlab "hosts the firm-level VAT analysis files linked from Add firm analysis files #1333", rather than files "used to size each step".
  11. The GOV.UK thresholds link redirected; it now points to https://www.gov.uk/how-vat-works/vat-thresholds (£90,000 to register, £88,000 to deregister).
  12. Replaced the released .added fragment with a .changed fragment.

Checked and correct (unchanged)

  • vat applies gov.hmrc.vat.standard_rate and reduced_rate to full_rate_vat_consumption and reduced_rate_vat_consumption, then divides by vat_grossing_factor. Sources: policyengine_uk/variables/gov/hmrc/vat.py:12-23 and policyengine_uk/utils/vat.py:20-34.
  • There is no business-side VAT anywhere on main (grep).
  • Registration threshold £90,000 and deregistration threshold £88,000 from 1 April 2024: SI 2024/307 art. 2; VATA 1994 Sch. 1 paras 1 and 4.
  • vat_change and consumer_incident_tax_revenue_change exist (variables/contrib/policyengine/consumer_incident_tax_revenue_change.py). The flat-rate scheme, VAT groups and partial exemption exist (GOV.UK). policyengine/uk-vatlab is public and linked from Add firm analysis files #1333.
  • All links return 200.

Uncertain

  • The "not in FRS" cell for VAT registration status: there is no such field in the model or uk-data's FRS loader, but I didn't check an FRS codebook.
  • The page proposes incorporated firms that "stand alone" with no members. Core may not support an empty group instance; this is flagged in the page as something the design must handle.

@vahid-ahmadi vahid-ahmadi changed the title Add firm-level VAT planning docs page (#1320 #1333) Correct the firm-level VAT docs page (#1320) Oct 23, 2026
@vahid-ahmadi
vahid-ahmadi added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit ef3ef38 Oct 24, 2026
10 checks passed
@vahid-ahmadi
vahid-ahmadi deleted the vahid-ahmadi/issue-1320-firm-vat-plan branch October 24, 2026 07:41
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.

2 participants