prompts-compiler
Skill1 starsChanged 54 days agoMITView on GitHub
Compiles an existing Intermediate Representation (IR) Markdown document into a deliverable prompt sidecar (`<topic>_PROMPTS.md`) containing content-bound execution profiles for slide decks, video/audio overviews, and standing Q&A. The IR itself is never modified. Use when the user asks to "compile prompts", "prompt compiler", "prompt sidecar", "inject directives", "IR directive injector", "control plane", "downstream directives", "make this IR executable", "NotebookLM directives", "slide deck profile", or "video overview profile".
In this repository2 other files it gives its agents.
- knowledge-compilerSkill
- workbook-compilerSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Write <topic>_PROMPTS.md beside the IR in the same directory.
- Distinctive: line 35
Never write generic rules like "explain the concepts." Bind every instruction to what is actually in this file:
- Very specific: line 41
Score-vs-tag conflict: follow the Jev score and footnote the tag (6 slides per Jev priority.
- Distinctive: line 43
Degrade gracefully: Not every chapter has a figure or a Core Invariant.
- Very specific: line 58
Check first: If <topic>_PROMPTS.md already exists, update it in place.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IR Prompt Compiler
Second half of a two-stage toolchain:
| Skill | Input → Output | Plane |
knowledge-compiler | sources → <topic>_IR.md | Data |
prompts-compiler | <topic>_IR.md → <topic>_PROMPTS.md | Control |
It reads a compiled IR and writes a separate file of deliverable prompts, each bound to that IR's actual figures, failure modes, and priority weights. The IR is left byte-identical.
Core Directives
1. Never Write Into the IR
The IR is the file the user uploads to a RAG system. Directives written into it become retrieval noise, not instructions.
- The IR must be byte-identical before and after this skill runs. Verify with a checksum. If it changed, you have failed.
- Why this rule exists (measured, not theoretical). An earlier version of this skill injected directives inline. The Control Plane grew to 26.6% of the document, the first 2,313 words were stage directions before a single fact, and because the manifests quoted the IR's own vocabulary, 3 of 4 chunks matching a given invariant were slide-deck choreography rather than knowledge. Chat answers degraded accordingly.
- A RAG system treats an uploaded source as evidence, not instruction. Embedded directives may sometimes steer a generated overview, since a context window has no hard privilege boundary — but they are unreliable there and actively harmful to retrieval. A prompt pasted into an instruction field is privileged; the same text inside a source is not.
2. Sidecar Emission
Write <topic>_PROMPTS.md beside the IR in the same directory. Never any other output path, and never an edit to the IR.
3. Two Forms Per Profile
Instruction fields are short; chat windows are not. Every profile emits both:
- Compact form — keep under ~500 characters. Sized for a Customize / instruction box. This is a practical ceiling, not a documented limit; when in doubt, shorter. A 2,000-word manifest cannot be pasted into these fields at all.
- Full form. For a chat turn, a system prompt, or a tool with a large instruction field. The bound manifest goes here.
4. Contextual Semantic Binding (No Generic Boilerplate)
Never write generic rules like "explain the concepts." Bind every instruction to what is actually in this file:
- Name the specific figures to focus on, and the specific node within each.
- Name the specific failure modes and metrics that deserve standalone treatment.
- Dictate narrative progression from the causal mechanisms actually present.
- Allocate by priority. Where the IR carries
[Priority: X%]tags, size each chapter's manifest in proportion. Never give a 12% chapter equal airtime with a 28% one. - Budget by Jev scores when verdicts exist. If
verdicts.jsonsits beside the IR, size each chapter's slide/scene budget ∝ that chapter's Jevpriority_score × priority_confidence, and show the arithmetic inline in the full form (Fetch 0.8×0.75 → 6 slides). Keep score arithmetic in full forms only — compacts keep one binding detail so the ~500-char ceiling holds. - Score-vs-tag conflict: follow the Jev score and footnote the tag (
6 slides per Jev priority; IR tag reads 25%). Never silently pick one. - No verdicts file → tags-only. Fall back to the
[Priority: X%]rule exactly as before; output must equal the pre-Jev behavior. - Degrade gracefully. Not every chapter has a figure or a Core Invariant. Where one is absent, omit that field — never invent a figure or synthesize an invariant to fill a slot.
5. Inherit the IR's Uncertainty
A faithful IR marks what it does not know. The prompts must carry those marks forward, or a truthful IR still yields a confabulated deliverable.
- Never instruct the downstream AI to state an
[INFERRED]claim as fact. If it earns a slide or a scene, the prompt must require it be voiced as reconstructed, not measured. - Never instruct it to resolve an
UNKNOWN_TRANSITION. That token marks a gap in the record. Surface it as an open question. - Preserve conflict registers. Where the IR records two values for one parameter, the prompt must name the conflict rather than silently picking one.
- Carry these into the sidecar's own Fidelity Constraints section so they apply across every profile at once.
- Voice by stated band when verdicts exist. If
verdicts.jsonsits beside the IR, each Fidelity Constraint carries its Jevstated_probabilityband:≥0.9may be voiced as measured;≤0.1([INFERRED]) must be voiced as reconstructed, never measured; mid-band entries get an explicit "surface the uncertainty, do not resolve it" instruction. No verdicts file → fall back to the[INFERRED]/UNKNOWN_TRANSITIONmarks exactly as before.
6. Standing Q&A Rules (Per-Topic Execution Logic)
For major or complex topics, write a rule describing how to reason about that topic — trace the query through the named figure, report the node where it fails, resolve aliases before answering. These live in the sidecar's Profile C. They are never written into the IR.
- Resolve via the ontology map when verdicts exist. If
verdicts.jsonsits beside the IR, each Profile C rule resolves terms through the verdictontologymap (alias → canonical) and the IR's frontmatter alias table. Anew_termverdict becomes an "ask, don't assert" rule: instruct the downstream AI to surface the term as unresolved rather than guessing its meaning. No verdicts file → resolve against the frontmatter alias table only, exactly as before. Never invent a mapping.
7. Idempotency & Migration
- Check first. If
<topic>_PROMPTS.mdalready exists, update it in place; do not append a second copy. - Detect a polluted IR. If the IR already contains inline
[DOWNSTREAM ...],[LOCAL DIRECTIVE ...], or<evaluation_logic>blocks, it was processed by the old inline behavior. Offer to migrate: lift those blocks into the sidecar and restore the IR to pure knowledge. Report the word count recovered. Never migrate without asking.
Output Schema (<topic>_PROMPTS.md)
# [Domain/System Name] — Deliverable Prompts
Companion to `[topic]_IR.md`. Upload the IR. Paste from this file.
## How to use
- **Audio / Video Overview** → Customize box → **B1**
- **Chat Q&A** → paste **C** at the start of a session
- **Slide deck** → paste **A2** into a chat turn or system prompt
## Fidelity Constraints (apply to every profile)
- [Claims the IR marks [INFERRED] — voice as reconstructed, never measured]
- [UNKNOWN_TRANSITIONs — surface as open questions, never resolve]
- [Conflicting values — name the conflict, do not silently pick one]
## Profile A — Slide Deck
### A1. Compact (<500 chars)
[Structure, pacing, word cap, one binding detail]
### A2. Full — bound manifest
[Per-chapter slide budget allocated by priority; named figures and focal nodes;
named edge cases; metric placement]
## Profile B — Video / Audio Overview
### B1. Compact (<500 chars)
[Format, pacing, cold open, one binding detail]
### B2. Full — scene running order
[Fixed scene list; each bound to a named IR state change]
## Profile C — Standing Q&A Rules
[Per-topic execution logic: which figure to trace, which alias table to resolve
against, which register arbitrates contested values. Where verdicts exist,
cite the ontology map per rule (`alias → canonical` per verdicts.json);
`new_term` verdicts become ask-don't-assert rules.]Workflow
- Read the IR. Inventory chapters,
[Priority: X%]tags, figures (type and nodes), Core Invariants, edge cases,[INFERRED]claims,UNKNOWN_TRANSITIONmarkers, and any conflict register. Then look forverdicts.jsonbeside the IR: if present, inventory Jevpriorityscores,ontologymaps, andstatedbands per entry. If absent, proceed tags-only — output must equal the pre-Jev behavior. - Checksum the IR (
sha256sum). You will re-verify at the end. - Check for prior state. Existing sidecar → update in place. Inline directives in the IR → offer migration (Directive 7).
- Derive Fidelity Constraints from the step-1 inventory — voiced by stated band where verdicts exist (Directive 5), by
[INFERRED]/UNKNOWN_TRANSITIONmarks otherwise. - Write the sidecar to
<topic>_PROMPTS.mdin the IR's directory, both forms per profile. - Verify and report:
- Re-checksum the IR — must be unchanged. If not, restore it.
- Confirm each compact form is under ~500 characters.
- Confirm no profile instructs the downstream AI to assert an
[INFERRED]claim as fact. - Confirm every named figure and node actually exists in the IR.
- Confirm every budget number traces to a Jev priority score (with shown arithmetic) or, absent verdicts, to its
[Priority: X%]tag. - Confirm every alias rule traces to an ontology verdict or the frontmatter alias table — no invented mappings.
- Present both file paths.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

