💻 Coding

Pants BUILD Targets from a Module Inventory (Version-Locked, No Invented Backends)

Write Pants BUILD targets from a module inventory. Version-lock backends. Do not invent extra modules.

0.0
0Reviews
P
August 29, 2026

Prompt

Act as a Pants BUILD author who only uses a pasted module inventory. You write BUILD targets and a pants.toml that enable only backends named in Inputs. You do not invent backends, extra modules, or resolver URLs. This is not a Bazel BUILD, not a Buck2 TARGETS file, and not a Dagger pipeline.
You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs.

Inputs:
- Module inventory I lock (names, kinds, sources I allow): [Modules]
- Backends I lock with versions (or UNKNOWN): [Backends]
- Pants version I lock (or UNKNOWN): [Version]
- Interpreter I lock (or UNKNOWN): [Py]
- Words I must not use: [Banned]
- What I must never invent (backends, extra modules, resolver URLs): [Never]
- Output format: [Format]
- Language for comments: [Lang]
- Test targets I allow (or NONE): [Tests]

Generate:
1. Honesty ledger: Modules, Backends, Version, Py, Tests, Lang. Forbidden: invented backends, extra modules, resolver URLs.
2. Backend lock table: each Backends line quoted. If a target needs a backend not listed, write NOT IN INPUTS.
3. pants.toml sketch: pants_version from Version or VERSION UNKNOWN. backend_packages only from Backends. interpreter from Py or PY UNKNOWN.
4. BUILD: targets only from Modules. sources only listed files. Do not add python_distribution unless Modules named it.
5. Refuse list: bazel_dep, Buck2 prelude, dagger.gen, invented pants.backend.python.mixed.
6. Tests: quote Tests or write NONE. Do not add a catch-all python_tests glob.
7. Never: do not write a pytest extra unless Tests named it. Do not invent a PyPI index URL.
8. Compliance pass: quote Banned and Never hits. Cut them. Format as Format.

Constraints:
- Pants BUILD from Modules and Backends only. Not Bazel and not Buck2.
- Never invent backends, extra modules, or resolver URLs.
- Only Tests named in Inputs.
- No emojis.

Instructions

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

Examples

Example Input

Modules: python_sources name=mailer; sources=mailer/cli.py. python_sources name=util; sources=lib/util.py. python_distribution NOT IN INPUTS. Visibility NOT IN INPUTS.
Backends: pants.backend.python as pasted. Do not invent pants.backend.go.
Version: 2.22.0 as pasted
Py: 3.12 as pasted. 3.11 NOT IN INPUTS.
Banned: latest, pypi.org extra, always, guaranteed
Never: invent backends, invent extra modules, invent resolver URLs, invent a test glob
Format: ledger + lock-table + pants.toml + BUILD + refuse + gaps
Lang: English comments
Tests: NONE (do not add python_tests)

Example Output

1. Ledger. Modules: python_sources mailer sources mailer/cli.py; python_sources util sources lib/util.py. python_distribution NOT IN INPUTS. Visibility NOT IN INPUTS. Backends pants.backend.python. Version 2.22.0. Py 3.12. Tests NONE. Lang English. Forbidden: latest, pypi.org extra, always, guaranteed, invented backends, extra modules, resolver URLs, test glob.

2. Lock table. python <- pants.backend.python as pasted. pants.backend.go NOT IN INPUTS. Resolver URL NOT IN INPUTS.

3. pants.toml sketch.
[GLOBAL]
pants_version = "2.22.0"
backend_packages = ["pants.backend.python"]
[python]
interpreter_constraints = ["==3.12.*"]
# 3.11 NOT IN INPUTS. Index URL NOT IN INPUTS.

4. BUILD sketches.
# lib/BUILD
python_sources(name="util", sources=["util.py"])
# mailer/BUILD
python_sources(name="mailer", sources=["cli.py"])
# python_distribution omitted. NOT IN INPUTS.

5. Refuse. bazel_dep: refused. Buck2 prelude: refused. pants.backend.go: refused. python_tests glob: refused. extra PyPI index: refused.

6. Tests. NONE. python_tests not added.

7. Never. No minted go backend. No resolver URL. No catch-all test glob.

8. Compliance. Banned hits none. Format ledger+lock-table+pants.toml+BUILD+refuse+gaps. Gaps: python_distribution, visibility, go backend, test names, index URL.

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...