|
| 1 | +--- |
| 2 | +# / Context: https://ctx.ist |
| 3 | +# ,'`./ do you remember? |
| 4 | +# `.,'\ |
| 5 | +# \ Copyright 2026-present Context contributors. |
| 6 | +# SPDX-License-Identifier: Apache-2.0 |
| 7 | + |
| 8 | +title: Prompting Guide |
| 9 | +icon: lucide/message-circle |
| 10 | +--- |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +## Prompting Guide |
| 15 | + |
| 16 | +Effective prompts for working with AI assistants in ctx-enabled projects. |
| 17 | + |
| 18 | +### Why This Matters |
| 19 | + |
| 20 | +AI assistants don't automatically read context files. The right prompt triggers |
| 21 | +the right behavior. This guide documents prompts that reliably produce good results. |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Session Start |
| 26 | + |
| 27 | +### "Do you remember?" |
| 28 | + |
| 29 | +**What it does**: Triggers the AI to read AGENT_PLAYBOOK, CONSTITUTION, sessions/, |
| 30 | +and other context files before responding. |
| 31 | + |
| 32 | +**When to use**: Start of every important session. |
| 33 | + |
| 34 | +``` |
| 35 | +Do you remember what we were working on? |
| 36 | +``` |
| 37 | + |
| 38 | +**Why it works**: The question implies prior context exists. The AI checks files |
| 39 | +rather than admitting ignorance. |
| 40 | + |
| 41 | +### "What's the current state?" |
| 42 | + |
| 43 | +**What it does**: Prompts reading of TASKS.md, recent sessions, and status overview. |
| 44 | + |
| 45 | +**When to use**: Resuming work after a break. |
| 46 | + |
| 47 | +**Variants**: |
| 48 | + |
| 49 | +- "Where did we leave off?" |
| 50 | +- "What's in progress?" |
| 51 | +- "Show me the open tasks" |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## During Work |
| 56 | + |
| 57 | +### "Why doesn't X work?" |
| 58 | + |
| 59 | +**What it does**: Triggers root cause analysis rather than surface-level fixes. |
| 60 | + |
| 61 | +**When to use**: When something fails unexpectedly. |
| 62 | + |
| 63 | +**Why it works**: Framing as "why" encourages investigation before action. |
| 64 | +The AI will trace through code, check configurations, and identify the actual cause. |
| 65 | + |
| 66 | +!!! example "Real example" |
| 67 | + "Why can't I run /ctx-save?" led to discovering missing permissions |
| 68 | + in settings.local.json bootstrapping—a fix that benefited all users. |
| 69 | + |
| 70 | +### "Is this consistent with our decisions?" |
| 71 | + |
| 72 | +**What it does**: Prompts checking DECISIONS.md before implementing. |
| 73 | + |
| 74 | +**When to use**: Before making architectural choices. |
| 75 | + |
| 76 | +**Variants**: |
| 77 | + |
| 78 | +- "Check if we've decided on this before" |
| 79 | +- "Does this align with our conventions?" |
| 80 | + |
| 81 | +### "What would break if we..." |
| 82 | + |
| 83 | +**What it does**: Triggers defensive thinking and impact analysis. |
| 84 | + |
| 85 | +**When to use**: Before making significant changes. |
| 86 | + |
| 87 | +``` |
| 88 | +What would break if we change the Settings struct? |
| 89 | +``` |
| 90 | + |
| 91 | +### "Before you start, read X" |
| 92 | + |
| 93 | +**What it does**: Ensures specific context is loaded before work begins. |
| 94 | + |
| 95 | +**When to use**: When you know relevant context exists in a specific file. |
| 96 | + |
| 97 | +``` |
| 98 | +Before you start, read .context/sessions/2026-01-20-auth-discussion.md |
| 99 | +``` |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +## Reflection & Persistence |
| 104 | + |
| 105 | +### "What did we learn?" |
| 106 | + |
| 107 | +**What it does**: Prompts reflection on the session and often triggers adding |
| 108 | +learnings to LEARNINGS.md. |
| 109 | + |
| 110 | +**When to use**: After completing a task or debugging session. |
| 111 | + |
| 112 | +**Why it works**: Explicit reflection prompt. The AI will summarize insights |
| 113 | +and often offer to persist them. |
| 114 | + |
| 115 | +### "Add this as a learning/decision" |
| 116 | + |
| 117 | +**What it does**: Explicit persistence request. |
| 118 | + |
| 119 | +**When to use**: When you've discovered something worth remembering. |
| 120 | + |
| 121 | +``` |
| 122 | +Add this as a learning: "JSON marshal escapes angle brackets by default" |
| 123 | +``` |
| 124 | + |
| 125 | +### "Save context before we end" |
| 126 | + |
| 127 | +**What it does**: Triggers context persistence before session close. |
| 128 | + |
| 129 | +**When to use**: End of session, or before switching topics. |
| 130 | + |
| 131 | +**Variants**: |
| 132 | + |
| 133 | +- "Let's persist what we did" |
| 134 | +- "Update the context files" |
| 135 | +- `/ctx-save` (slash command in Claude Code) |
| 136 | + |
| 137 | +--- |
| 138 | + |
| 139 | +## Exploration & Research |
| 140 | + |
| 141 | +### "Explore the codebase for X" |
| 142 | + |
| 143 | +**What it does**: Triggers thorough codebase search rather than guessing. |
| 144 | + |
| 145 | +**When to use**: When you need to understand how something works. |
| 146 | + |
| 147 | +**Why it works**: "Explore" signals that investigation is needed, not immediate action. |
| 148 | + |
| 149 | +### "How does X work in this codebase?" |
| 150 | + |
| 151 | +**What it does**: Prompts reading actual code rather than explaining general concepts. |
| 152 | + |
| 153 | +**When to use**: Understanding existing implementation. |
| 154 | + |
| 155 | +``` |
| 156 | +How does session saving work in this codebase? |
| 157 | +``` |
| 158 | + |
| 159 | +### "Find all places where X" |
| 160 | + |
| 161 | +**What it does**: Comprehensive search across the codebase. |
| 162 | + |
| 163 | +**When to use**: Before refactoring or understanding impact. |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +## Meta & Process |
| 168 | + |
| 169 | +### "What should we document from this?" |
| 170 | + |
| 171 | +**What it does**: Prompts identifying learnings, decisions, and conventions |
| 172 | +worth persisting. |
| 173 | + |
| 174 | +**When to use**: After complex discussions or implementations. |
| 175 | + |
| 176 | +### "Is this the right approach?" |
| 177 | + |
| 178 | +**What it does**: Invites the AI to challenge the current direction. |
| 179 | + |
| 180 | +**When to use**: When you want a sanity check. |
| 181 | + |
| 182 | +**Why it works**: Gives permission to disagree. AIs often default to agreeing; |
| 183 | +this prompt signals you want honest assessment. |
| 184 | + |
| 185 | +### "What am I missing?" |
| 186 | + |
| 187 | +**What it does**: Prompts thinking about edge cases, overlooked requirements, |
| 188 | +or unconsidered approaches. |
| 189 | + |
| 190 | +**When to use**: Before finalizing a design or implementation. |
| 191 | + |
| 192 | +--- |
| 193 | + |
| 194 | +## Anti-Patterns |
| 195 | + |
| 196 | +Prompts that tend to produce poor results: |
| 197 | + |
| 198 | +| Prompt | Problem | Better Alternative | |
| 199 | +|--------|---------|-------------------| |
| 200 | +| "Fix this" | Too vague, may patch symptoms | "Why is this failing?" | |
| 201 | +| "Make it work" | Encourages quick hacks | "What's the right way to solve this?" | |
| 202 | +| "Just do it" | Skips planning | "Plan this, then implement" | |
| 203 | +| "You should remember" | Confrontational | "Do you remember?" | |
| 204 | +| "Obviously..." | Discourages questions | State the requirement directly | |
| 205 | + |
| 206 | +--- |
| 207 | + |
| 208 | +## Quick Reference |
| 209 | + |
| 210 | +| Goal | Prompt | |
| 211 | +|------|--------| |
| 212 | +| Load context | "Do you remember?" | |
| 213 | +| Resume work | "What's the current state?" | |
| 214 | +| Debug | "Why doesn't X work?" | |
| 215 | +| Validate | "Is this consistent with our decisions?" | |
| 216 | +| Impact analysis | "What would break if we..." | |
| 217 | +| Reflect | "What did we learn?" | |
| 218 | +| Persist | "Add this as a learning" | |
| 219 | +| Explore | "How does X work in this codebase?" | |
| 220 | +| Sanity check | "Is this the right approach?" | |
| 221 | +| Completeness | "What am I missing?" | |
| 222 | + |
| 223 | +--- |
| 224 | + |
| 225 | +## Contributing |
| 226 | + |
| 227 | +Found a prompt that works well? |
| 228 | +[Open an issue](https://github.com/ActiveMemory/ctx/issues) or PR with: |
| 229 | + |
| 230 | +1. The prompt text |
| 231 | +2. What behavior it triggers |
| 232 | +3. When to use it |
| 233 | +4. Why it works (optional but helpful) |
0 commit comments