Skip to content

CONTRIB: Added Regimes Claude Agent#731

Draft
rafaharo wants to merge 1 commit intoinvopop:mainfrom
rafaharo:regime_agent
Draft

CONTRIB: Added Regimes Claude Agent#731
rafaharo wants to merge 1 commit intoinvopop:mainfrom
rafaharo:regime_agent

Conversation

@rafaharo
Copy link
Copy Markdown

Summary

This PR adds an experimental Claude Agent (command) that create a new GOBL tax regime for a given country. The agent can research the new regime on its own by searching specific information on the web or by following the information contained into URLs passed as reference inputs.

The agent follows a phased approach were findings are presented to a reviewer before drafting the regime in code. After some experimentation, the agent seems to do a decent job as a starting point for a new regime and could save a lot of time when working on a new regime

Pre-Review Checklist

  • Opened this PR as a draft
  • Read the CONTRIBUTING.md guide.
  • Performed a self-review of my code.
  • Added thorough tests with at least 90% code coverage.
  • Modified or created example GOBL documents to show my changes in use, if appropriate.
  • Added links to the source of the changes in tax regimes or addons, either structured or in the comments.
  • Run go generate . to ensure that the Schemas and Regime data are up to date.
  • Reviewed and fixed all linter warnings.
  • Been obsessive with pointer nil checks to avoid panics.
  • Updated the CHANGELOG.md with an overview of my changes.
  • Requested a review from Copilot and fixed or dismissed (with a reason) all the feedback raised.

Only after checking off all the previous items:

  • Marked this PR as ready for review and requested one from @samlown.

Copy link
Copy Markdown
Collaborator

@samlown samlown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this! However, at the moment we don't have a strong opinion on how to handle agents and would rather avoid implementation specific details.

The suggestions for the GB regime don't take into account smaller merchants.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment we're trying to avoid documents for specific agents. The permissions listed in this file specifically are not likely to scale very well as more submitters arrive.

Comment thread regimes/gb/invoices.go
return validation.ValidateStruct(p,
validation.Field(&p.TaxID,
validation.Required,
tax.RequireIdentityCode,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentionally left out in order to support companies that are below the minimum VAT thresholds. The simplified tag as a rule is used to imply B2C situations, and not smaller tax payers.

Comment thread regimes/gb/README.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We trying to avoid READMEs now and ensure all the key information is included in the Regime definition.

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.

3 participants