Add central reusable-code catalog with explicit overlap counts and repo-onboarding workflow#2
Draft
Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Add YAML catalog for reusable code audit
Add central reusable-code catalog with explicit overlap counts and repo-onboarding workflow
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR restructures the audit output into a single extensible catalog model. It addresses the three gaps identified: no central index, no explicit overlap counts/groupings, and no defined process for adding new repositories against existing overlaps.
Central source of truth (
catalog.yml)total_projects_audited,total_snippets,last_updated)overlap_count+ project listsHuman-readable catalog (
catalog.md)Extensibility workflow (
ADDING-NEW-REPOS.md)catalog.mdsections and matrixaudit-report.mdEntry-point docs refresh
README.mdwith a new Catalog section near the top linkingcatalog.mdandcatalog.ymlwith headline stats.code-snippets/README.mdwith catalog-first guidance, folder structure, and per-folder snippet counts.Repository hygiene
.gitignorerules for__pycache__/and*.pyc.__pycache__artifacts undercode-snippets/.Original prompt
Context
The
nhsengland/reusable-code-auditrepository has already been set up with:audit-report.md— a themed audit reportcode-snippets/— 7 themed folders each with 2 snippet files and a READMEThe branch
copilot/setup-reusable-code-auditcontains all of this work.The user has identified three gaps they want addressed:
Your Task
Work on the existing branch
copilot/setup-reusable-code-audit. Do NOT merge to main.1. Create
catalog.ymlCreate a machine-readable YAML catalog at the root of the repo:
catalog.ymlThis is the single source of truth for all code snippets. Structure it as follows:
Fill in ALL snippets accurately based on the actual files already in the repo and the source attributions in their header comments.
2. Create
catalog.mdCreate a human-readable rendered catalog at the root:
catalog.mdThis should be the go-to document for understanding overlaps. Structure:
Header
Overlap Summary Table
A table with one row per theme:
Per-Theme Sections
For each theme, include:
Which projects overlap (with links to their repos)
What the overlap is — a plain-English description of the repeated pattern
Snippet inventory — a sub-table:
nhs_reuse.synthetic.metricsRaw snippet inline — embed the actual code of each snippet inline using fenced code blocks so it can be read without navigating to the file
Cross-Project Overlap Map
A matrix table showing ALL 21 projects vs ALL 7 themes, with the count of snippets rather than just a tick mark, e.g.:
Reuse Candidates Summary
A flat tab...
This pull request was created from Copilot chat.