💻 Coding

Bazel BUILD Target Dependency Map from Package Inventory (No Invented Labels)

Turn a Bazel package inventory into a BUILD target dependency map only. No invented labels, deps edges, or visibility values beyond the inventory.

0.0
0Reviews
P
September 11, 2026

Prompt

Act as a Bazel build graph engineer who only uses a pasted package inventory. You write a BUILD target dependency map the inventory already supports. You do not invent labels, deps edges, visibility values, or select() keys. This is not a live bazel query run and not a migration quote.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- Package inventory I lock (target stubs, deps cues, package notes): [Inventory]
- Bazel / rules version notes I lock: [Version]
- Monorepo or workspace label I may quote (or UNKNOWN): [Workspace]
- Required target or package names I may quote (or UNKNOWN): [SpecNames]
- Label strings already present in BUILD files (or UNKNOWN): [BuildLabels]
- Deps edges already written (or UNKNOWN): [DepsEdges]
- Visibility scopes already present (or UNKNOWN): [VisibilityScopes]
- Words I must not use: [Banned]
- What I must never invent (labels, deps edges, visibility values, select keys): [Never]
- Output format: [Format]
- Language: [Lang]

Generate:
1. Honesty ledger: Inventory nouns, Version, Workspace, SpecNames, BuildLabels, DepsEdges, VisibilityScopes, Lang. Forbidden: invented labels, deps edges, visibility values, select keys. Banner: not a live bazel query; not a migration quote.
2. BUILD target dependency map table: one row per Inventory target stub or deps cue. Missing package notes write NOT IN INPUTS. Use Bazel BUILD, deps, visibility, and label language when Inventory supports it. Quote BuildLabels and DepsEdges only when present.
3. Spec name set: only names in SpecNames. Unnamed targets stay NOT IN INPUTS. Never print label or deps VALUES not in Inventory.
4. Version lock: print Version. Refuse Bazel features newer than Version if Version is named.
5. Refuse list: inventing labels, inventing deps edges, inventing visibility values, inventing select keys.
6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format.

Constraints:
- Map from Inventory only. No invented label VALUES. Teach Bazel BUILD target dependency mapping, not a generic Make swap.
- Honor Version. No emojis.

Instructions

Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.

Generated Output

This image was generated using the prompt above.

Bazel BUILD Target Dependency Map from Package Inventory (No Invented Labels) - Result

Examples

Example Input

Inventory: target Harbor Quay Cleat Lib as pasted deps cue //quay/cleat:lib as pasted package note quay/cleat as pasted; target River Ops Gate Bin as pasted deps cue //ops/gate:bin as pasted. Label invent NONE. Deps edge count NOT IN INPUTS.
Version: Bazel 7.1 as pasted (do not invent unreleased bzlmod APIs)
Workspace: Harbor Quay Monorepo as pasted
SpecNames: Cleat Lib as pasted; Gate Bin as pasted. Test suite UNKNOWN.
BuildLabels: //quay/cleat:lib as pasted; //ops/gate:bin as pasted. //shared:util UNKNOWN.
DepsEdges: Cleat Lib -> //third_party:absl as pasted. Gate Bin edge UNKNOWN.
VisibilityScopes: //quay:__pkg__ as pasted. public UNKNOWN.
Banned: guaranteed label, deps invent, visibility invent, select invent
Never: invent labels, invent deps edges, invent visibility values, invent select keys
Format: ledger + table + specs + version + refuse + compliance
Lang: English

Example Output

1. Ledger. Inventory: target Harbor Quay Cleat Lib deps cue //quay/cleat:lib package note quay/cleat; target River Ops Gate Bin deps cue //ops/gate:bin. Label invent NONE. Deps edge count NOT IN INPUTS. Version Bazel 7.1. Workspace Harbor Quay Monorepo. SpecNames Cleat Lib; Gate Bin; Test suite UNKNOWN. BuildLabels //quay/cleat:lib; //ops/gate:bin; //shared:util UNKNOWN. DepsEdges Cleat Lib -> //third_party:absl; Gate Bin edge UNKNOWN. VisibilityScopes //quay:__pkg__; public UNKNOWN. Lang English. Banner: not a live bazel query; not a migration quote. Forbidden: invented labels, deps edges, visibility values, select keys, guaranteed label, deps invent, visibility invent, select invent.

2. BUILD target dependency map.
1. Harbor Quay Cleat Lib | label //quay/cleat:lib as pasted (BuildLabels) | deps //third_party:absl as pasted (DepsEdges) | package quay/cleat as pasted | visibility //quay:__pkg__ as pasted (VisibilityScopes) | select keys NOT IN INPUTS | Bazel BUILD map only.
2. River Ops Gate Bin | label //ops/gate:bin as pasted (BuildLabels) | deps NOT IN INPUTS | package NOT IN INPUTS | visibility NOT IN INPUTS | select keys NOT IN INPUTS.
Deps edge counts not printed. select() keys not invented.

3. Spec name set. Cleat Lib; Gate Bin as SpecNames. Test suite UNKNOWN so write Test suite NOT IN INPUTS. No label VALUES beyond BuildLabels. No third target invented.

4. Version lock. Bazel 7.1 as pasted. Unreleased bzlmod APIs not used. Aspects NOT IN INPUTS.

5. Refuse. Label invent: refused. Deps invent: refused. Visibility invent: refused. Select invent: refused. Guaranteed label: refused.

6. Compliance. Banned hits none. Format ledger+table+specs+version+refuse+compliance. Gaps: package for River Ops Gate Bin, Gate Bin DepsEdges, Test suite decision, //shared:util BuildLabels, public VisibilityScopes if any.

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.

Reviews (0)

Please login to leave a review.
Loading reviews...