You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add optional persona support with first-position output (#36)
* Initial plan
* Initial analysis - planning persona feature implementation
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Add optional persona support with -persona flag
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Update README with persona documentation and examples
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Fix error handling for persona and task file stat calls
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
* Update persona API: use -r flag and positional argument, remove template expansion
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: Alex Collins <alexec@users.noreply.github.com>
**Result:** This generates `./prompt.md` combining your memories and the task prompt with template variables filled in. You can now share this complete context with your AI coding agent!
185
+
**Result:** This generates `./prompt.md` combining your persona (if specified), memories, and the task prompt with template variables filled in. You can now share this complete context with your AI coding agent!
164
186
165
-
**What you'll see in `prompt.md`:**
187
+
**What you'll see in `prompt.md` (with persona):**
166
188
```markdown
189
+
# Expert Developer
190
+
191
+
You are an expert developer with deep knowledge of best practices.
192
+
193
+
167
194
# Project Context
168
195
169
196
- Framework: Go CLI
@@ -187,15 +214,40 @@ The tool searches these directories for context files (in priority order):
187
214
Each directory should contain:
188
215
```
189
216
.prompts/
217
+
├── personas/ # Optional persona files (output first when specified)
218
+
│ └── <persona-name>.md
190
219
├── tasks/ # Task-specific prompt templates
191
220
│ └── <task-name>.md
192
-
└── memories/ # Reusable context files (included in all outputs)
221
+
└── memories/ # Reusable context files (included in all outputs)
193
222
└── *.md
194
223
```
195
224
196
225
197
226
## File Formats
198
227
228
+
### Persona Files
229
+
230
+
Optional persona files define the role or character the AI agent should assume. Personas are output **first** in the generated `prompt.md`, before memories and tasks.
231
+
232
+
**Important:** Persona files do NOT support template variable expansion. They are included as-is in the output.
233
+
234
+
**Example** (`.prompts/personas/expert.md`):
235
+
```markdown
236
+
---
237
+
---
238
+
# Expert Software Engineer
239
+
240
+
You are an expert software engineer with deep knowledge of best practices.
241
+
You are known for writing clean, maintainable code and following industry standards.
242
+
```
243
+
244
+
Run with:
245
+
```bash
246
+
coding-context add-feature expert
247
+
```
248
+
249
+
This will look for `expert.md` in the persona directories. The persona is optional - if you don't specify a persona name as the second argument, the output will contain only memories and the task.
250
+
199
251
### Prompt Files
200
252
201
253
Markdown files with YAML frontmatter and Go template support.
0 commit comments