💻 Coding
GitLab CODEOWNERS File from a Repo Map (No Invented Usernames)
Write a GitLab CODEOWNERS file from a repo map. No invented usernames, groups, or paths.
0Reviews
Prompt
Act as a GitLab CODEOWNERS author who only uses a pasted repo map. You write path rules and optional sections. You do not invent usernames, groups, or paths. This is not a GitHub CODEOWNERS plus branch-protection kit, not an OWNERS file for Gerrit, and not a CODEOWNERS v2 essay. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Repo map (paths and owners I allow): [Map] - Default owners I allow (or NONE): [Default] - Sections I allow (or NONE): [Sections] - Words I must not use: [Banned] - What I must never invent (usernames, groups, paths): [Never] - Output format: [Format] - Language for comments: [Lang] - Max rules: [Max] - GitLab version note I lock (or UNKNOWN): [Version] Generate: 1. Honesty ledger: Map paths, Default, Sections, Version, Lang, Max. Forbidden: invented @users, invented groups, extra paths. 2. Version note: quote Version or write VERSION UNKNOWN. GitLab section syntax only if Sections is not NONE. 3. CODEOWNERS body: at most Max rules. Paths and owners only from Map and Default. 4. Default: if Default is NONE, do not add a * rule. 5. Refuse list: GitHub branch protection YAML, Gerrit OWNERS, invented @backend-team. 6. Groups: only groups written in Map. Do not expand a team name into people. 7. Never: do not add @root or @admin unless listed. 8. Compliance pass: quote Banned and Never hits. Cut them. Count rules vs Max. Format as Format. Constraints: - GitLab CODEOWNERS from Map. Not GitHub branch protection and not Gerrit. - Never invent usernames, groups, or paths. - Stay at or under Max rules. - No emojis.
Instructions
Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.
Examples
Example Input
Map: /cmd/mailer/ @harbor/mailer as pasted; /docs/ @harbor/docs as pasted; ci path NOT IN INPUTS; person usernames NOT IN INPUTS. Default: NONE (do not add a * @harbor/all rule) Sections: NONE (do not invent a Mailer optional-approvals section Banned: @root, @admin, protect main, required reviews 2 (unless pasted) Never: invent usernames, invent groups, invent /ci/ paths, invent section headers Format: ledger + version + file + refuse + gaps Lang: English comments Max: 4 Version: GitLab 17 as pasted
Example Output
1. Ledger. Paths: /cmd/mailer/ @harbor/mailer as pasted; /docs/ @harbor/docs as pasted. CI path NOT IN INPUTS. Person usernames NOT IN INPUTS. Default NONE. Sections NONE. Version GitLab 17 as pasted. Lang English. Max 4. Forbidden: @root, @admin, protect main, required reviews 2, invented users, invented groups, invented /ci/, invented sections. 2. Version. GitLab 17 as pasted. Section syntax skipped because Sections NONE. 3. CODEOWNERS (2 vs Max 4). # GitLab 17 as pasted. Default NONE. Sections NONE. /cmd/mailer/ @harbor/mailer /docs/ @harbor/docs # /ci/ NOT IN INPUTS # * rule omitted (Default NONE) 4. Default. NONE. No star rule. @harbor/all not added. 5. Refuse. GitHub branches protection YAML: refused. Gerrit OWNERS: refused. @backend-team: refused (not in Map). 6. Groups. Only @harbor/mailer and @harbor/docs. Not expanded to people. 7. Never. No @root. No @admin. No invented person. 8. Compliance. Banned hits none. Rules 2 vs Max 4. Format ledger+version+file+refuse+gaps. Gaps: CI path owners, default owners, section optional-review counts, CODEOWNERS file location, approval settings. Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.