|
1 | 1 | --- |
2 | | -description: "Write only the resulting content into files. Never echo prompt instructions, rationale, or meta-commentary into documentation, comments, or code being produced from a prompt." |
| 2 | +description: "Write only the resulting content into files, with no prompt framing or meta-commentary" |
3 | 3 | applyTo: '**' |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # Exclude Prompt Data |
7 | 7 |
|
8 | | -When a prompt contains instructional or contextual data used to guide a change, |
9 | | -that data must not appear in the file being updated. The output must reflect |
10 | | -only the *result* of the instruction — not the instruction itself, the |
11 | | -reasoning behind it, or any acknowledgment that it was applied. |
| 8 | +Write each file as if its content always belonged there. A reader with no |
| 9 | +knowledge of the prompt should find it natural and self-contained. |
12 | 10 |
|
13 | | -## Core Rule |
| 11 | +- Describe the subject, not the change: "Validates email format", not |
| 12 | + "Added email validation as requested". |
| 13 | +- Example data uses generic placeholders (`Jane Doe`, `jane.doe@example.com`, |
| 14 | + `Acme Corp`, `my-org`, `example.com`), never real names, emails, domains, |
| 15 | + enterprises or organizations from the prompt or local configuration. |
| 16 | +- Output is polished and production-ready regardless of how the prompt was |
| 17 | + phrased. |
14 | 18 |
|
15 | | -> **Never echo prompt content into the file being changed.** |
16 | | -> |
17 | | -> Only write the outcome. Strip any meta-commentary, rationale, or framing that |
18 | | -> originated in the prompt. |
19 | | -
|
20 | | -## What Counts as Prompt Data |
21 | | - |
22 | | -Prompt data is any content the user provides as instruction or context rather |
23 | | -than as intended file content: |
24 | | - |
25 | | -- Descriptions of what to add or change (`"add a --verbose flag that..."`) |
26 | | -- Inline rationale or motivation (`"because the old behavior caused..."`) |
27 | | -- References to the prompt itself (`"as requested"`, `"per the prompt"`, |
28 | | - `"the new feature has been added as"`) |
29 | | -- Meta-commentary about the update |
30 | | - (`"This section has been updated to reflect..."`) |
31 | | -- Code comments that narrate a change rather than describe the code |
32 | | - (`"// Added email validation as requested"`, |
33 | | - `"// Now validates the input per the new requirement"`) |
34 | | -- Structural scaffold labels used as section markers or template slots |
35 | | - (the word `this` in `## this Title` is scaffolding, not heading text) |
36 | | - |
37 | | -## What Belongs in the Output |
38 | | - |
39 | | -The output file should contain only: |
40 | | - |
41 | | -- The feature, fix, or content the prompt requested — written as if it always |
42 | | - belonged there |
43 | | -- Documentation or code that a reader would find useful independent of how the |
44 | | - change was requested |
45 | | -- Generic, cliche placeholder data in examples (e.g., `Jane Doe`, |
46 | | - `jane.doe@example.com`, `Acme Corp`, `example.com`) — never real names, |
47 | | - emails, domains, or organization identifiers pulled from the prompt or local |
48 | | - configuration |
49 | | -- Language formatting applied to terms in the prompt carries through to the |
50 | | - output — if the prompt wraps a term in backticks or uses a specific syntax |
51 | | - convention, follow that same convention in the output |
52 | | - |
53 | | -## Output Quality |
54 | | - |
55 | | -The prompt's writing quality does not set the bar for the output. Regardless |
56 | | -of how a prompt is phrased, the result must be polished and production-ready: |
57 | | - |
58 | | -- Correct grammar, capitalization, and punctuation throughout |
59 | | -- No draft-quality prose or casually written sections |
60 | | -- Informal or sloppy phrasing in the prompt must not carry into the output |
61 | | - |
62 | | -## Use Cases |
63 | | - |
64 | | -### Adding a Feature Flag to Documentation |
65 | | - |
66 | | -**Prompt** |
67 | | - |
68 | | -```text |
69 | | -Update file.ext with new feature --new-opt <argument>, documenting the new |
70 | | -feature in features.md |
71 | | -``` |
72 | | - |
73 | | -**Acceptable result — `features.md`** |
74 | | - |
75 | | -```text |
76 | | -### --new-opt |
77 | | -
|
78 | | -Enables extended output. Requires a value argument. Example: |
79 | | -
|
80 | | - ```bash |
81 | | - file --new-opt foo |
82 | | - ``` |
83 | | -``` |
84 | | - |
85 | | -**Unacceptable result — `features.md`** |
86 | | - |
87 | | -```text |
88 | | -### --new-opt |
89 | | -
|
90 | | -The new feature `--new-opt` requiring an argument has now been added as |
91 | | -requested. The feature is documented as such. |
92 | | -
|
93 | | -Enables extended output. Requires a value argument. Example: |
94 | | -
|
95 | | - ```bash |
96 | | - file --new-opt foo |
97 | | - ``` |
98 | | -``` |
99 | | - |
100 | | -The unacceptable version echoes the prompt's framing |
101 | | -(`"has now been added as requested"`, `"The feature is documented as such"`). |
102 | | -That language belongs in the prompt, not the file. |
103 | | - |
104 | | ---- |
105 | | - |
106 | | -### Updating a Code File |
107 | | - |
108 | | -**Prompt** |
109 | | - |
110 | | -```text |
111 | | -Add input validation to the createUser function — email must be a valid format. |
112 | | -``` |
113 | | - |
114 | | -**Acceptable result** |
115 | | - |
116 | | -```js |
117 | | -function createUser(name, email) { |
118 | | - // Rejects addresses missing a local part, @ sign, or domain |
119 | | - if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { |
120 | | - throw new Error('Invalid email address.'); |
121 | | - } |
122 | | - // ... |
123 | | -} |
124 | | -``` |
125 | | - |
126 | | -**Unacceptable result** |
127 | | - |
128 | | -```js |
129 | | -// Added email validation as requested in the prompt |
130 | | -function createUser(name, email) { |
131 | | - // Per the instruction, we now validate that email must be a valid format |
132 | | - if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { |
133 | | - throw new Error('Invalid email address.'); |
134 | | - } |
135 | | - // ... |
136 | | -} |
137 | | -``` |
138 | | - |
139 | | -The unacceptable version leaks prompt phrasing into code comments. Code |
140 | | -comments and documentation updates are appropriate and encouraged — they should |
141 | | -describe what the code does, its constraints, or its intent. What they must |
142 | | -never do is narrate the change, reference the prompt, or report back as if |
143 | | -responding to the user who requested it. |
144 | | - |
145 | | -## Exceptions |
146 | | - |
147 | | -A small number of cases legitimately require prompt content to appear in the |
148 | | -file. Treat these as exceptions, not loopholes: |
149 | | - |
150 | | -- **Verbatim transcription requested.** The user explicitly asks for prompt |
151 | | - text to be inserted as-is (e.g., "paste this block into the README under |
152 | | - `## Notice`"). Insert exactly what was requested and nothing more. |
153 | | -- **The file *is* a prompt or instruction artifact.** When editing prompt |
154 | | - files, skill definitions, or instruction files, instructional content is the |
155 | | - intended payload. The rule still applies one level up: do not add |
156 | | - meta-commentary about *this* edit into those files. |
157 | | -- **Changelog or release-note entries.** A short, factual line describing the |
158 | | - change is appropriate. Keep it about the change, not about the request |
159 | | - (`Added --verbose flag` ✓ / `Added --verbose flag as requested by user` ✗). |
160 | | - |
161 | | -## Self-Check Before Saving |
162 | | - |
163 | | -Before committing an edit produced from a prompt, scan the diff for any of the |
164 | | -following and remove what you find: |
165 | | - |
166 | | -- [ ] Phrases like "as requested", "per the prompt", "per your instruction", |
167 | | - "as you asked" |
168 | | -- [ ] Sentences that announce a change rather than describe the subject |
169 | | - ("This section now covers...", "Updated to include...") |
170 | | -- [ ] Comments that explain why code was written instead of what it does |
171 | | -- [ ] Verbatim restatement of the user's request inside the file |
172 | | -- [ ] Acknowledgments of the prompt's existence at all |
173 | | - |
174 | | -If any of these appear, rewrite the affected section so a fresh reader — with |
175 | | -no knowledge of the prompt — would find the content natural and self-contained. |
176 | | - |
177 | | -## Troubleshooting |
178 | | - |
179 | | -| Symptom | Fix | |
180 | | -|---|---| |
181 | | -| Output contains "as requested" or "per the prompt" | Remove it | |
182 | | -| Docs announce a change instead of documenting it | Rewrite directly | |
183 | | -| Code comments narrate the change | Describe the code's behavior | |
184 | | -| Prompt scaffold labels appear in output headings | Replace with original | |
185 | | - |
186 | | -## Summary |
187 | | - |
188 | | -Write the result, not the story of how you got there. A reader of the |
189 | | -output file should see clean, useful content — with no trace of the prompt |
190 | | -that produced it. |
| 19 | +Exceptions: verbatim text the user asks to insert, and prompt or instruction |
| 20 | +files whose payload is instructions. |
0 commit comments