Skip to content

Phase 1: progressive-disclosure refactor — hmrc-api (804 → 188 lines) - #19

Merged
olehsvyrydov merged 2 commits into
mainfrom
feat/refactor-hmrc-api
Jun 5, 2026
Merged

Phase 1: progressive-disclosure refactor — hmrc-api (804 → 188 lines)#19
olehsvyrydov merged 2 commits into
mainfrom
feat/refactor-hmrc-api

Conversation

@olehsvyrydov

Copy link
Copy Markdown
Owner

What

Slice-4 refactor #14. Splits hmrc-api (804 lines) into a lean SKILL.md (188 lines) + 2 references/ files (the ~620-line Expertise block):

  • api-oauth-fraud.md — API endpoints, MTD timeline, OAuth 2.0 implementation, mandatory fraud-prevention headers.
  • self-assessment-error-config.md — Self Assessment API integration, error handling, sandbox testing, configuration.

Lean SKILL.md keeps trigger, context, doc lookup, standards, checklist, anti-patterns, external-ID management, sandbox-vs-production differences.

Why

Same pattern as #5#18. No content lost (804 → 188 + 2 refs); real boundaries; fences verified balanced/non-nested.

Review focus

Content preservation; coherent lean router.

Split the large Expertise block into 2 references/ files: api-oauth-fraud
(endpoints, MTD timeline, OAuth 2.0, fraud-prevention headers) and
self-assessment-error-config (Self Assessment integration, error handling,
sandbox testing, configuration). Lean SKILL.md keeps trigger, context, doc
lookup, standards, checklist, anti-patterns, external-ID management,
sandbox-vs-prod. Real section boundaries; fences verified. No content lost.
Copilot AI review requested due to automatic review settings June 5, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Refactors the hmrc-api skill into a leaner SKILL.md that routes readers to on-demand deep-dive reference docs, reducing always-loaded content while preserving the detailed HMRC integration guidance.

Changes:

  • Replaces the large inlined “Expertise” block in SKILL.md with a short “Deep-dive references” pointer list.
  • Adds references/api-oauth-fraud.md to hold endpoints, OAuth 2.0 flow details, MTD timeline, and fraud-prevention header guidance.
  • Adds references/self-assessment-error-config.md to hold Self Assessment integration examples, error handling, sandbox testing, and configuration details.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
claude/skills/operations/govtech/hmrc-api/SKILL.md Removes the inlined deep expertise section and replaces it with links/pointers to reference docs.
claude/skills/operations/govtech/hmrc-api/references/api-oauth-fraud.md New deep-dive reference for OAuth/endpoints/MTD timeline/fraud header requirements and examples.
claude/skills/operations/govtech/hmrc-api/references/self-assessment-error-config.md New deep-dive reference for Self Assessment integration, error handling, sandbox testing, and configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…nt-error-config.md

Promote the top-level sections from H3 to H2 (and their H4 children to H3) so the
reference goes H1 -> H2 -> H3, consistent with the other references.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@olehsvyrydov
olehsvyrydov merged commit 0e961d4 into main Jun 5, 2026
1 check passed
@olehsvyrydov
olehsvyrydov deleted the feat/refactor-hmrc-api branch June 5, 2026 11:50
olehsvyrydov added a commit that referenced this pull request Jun 6, 2026
…#19)

* Phase 1: progressive-disclosure refactor of hmrc-api (804 -> 188 lines)

Split the large Expertise block into 2 references/ files: api-oauth-fraud
(endpoints, MTD timeline, OAuth 2.0, fraud-prevention headers) and
self-assessment-error-config (Self Assessment integration, error handling,
sandbox testing, configuration). Lean SKILL.md keeps trigger, context, doc
lookup, standards, checklist, anti-patterns, external-ID management,
sandbox-vs-prod. Real section boundaries; fences verified. No content lost.

* Address Copilot review on PR #19: fix heading levels in self-assessment-error-config.md

Promote the top-level sections from H3 to H2 (and their H4 children to H3) so the
reference goes H1 -> H2 -> H3, consistent with the other references.
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