Skip to content

Commit 7a19117

Browse files
committed
feat: enhance documentation with consistent markdown formatting and new implementation plan for prompt engineering toolkit
1 parent e24c22d commit 7a19117

File tree

6 files changed

+670
-30
lines changed

6 files changed

+670
-30
lines changed

apps/docs/docs/explanation/prompt-engineering.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Petk treats prompts as structured content rather than code, making them accessib
6969
**Modular Composition**
7070
Break complex prompts into reusable components that can be combined and recombined for different scenarios:
7171

72-
`````markdown
72+
````markdown
7373
<!-- Base instruction template -->
7474
```{petk:include}
7575
path: instructions/base-reasoning.md
@@ -86,7 +86,7 @@ limit: 3
8686
```{petk:include}
8787
path: context/{{domain}}/current-context.md
8888
```
89-
`````
89+
````
9090

9191
**Systematic Experimentation**
9292
Support for deterministic prompt variant generation enables systematic A/B testing and optimization:
@@ -145,7 +145,7 @@ limit: "{{max_examples}}"
145145

146146
## Your Task
147147

148-
\{\{current_task\}\}
148+
\\{\\{current_task\\}\\}
149149
````
150150

151151
**Benefits**:
@@ -171,7 +171,7 @@ path: reasoning/examples/{{domain}}/*.md
171171

172172
## Problem to Solve
173173

174-
\{\{problem_statement\}\}
174+
\\{\\{problem_statement\\}\\}
175175

176176
Think through this step by step:
177177
1. **Understanding**: What is being asked?
@@ -237,7 +237,7 @@ if: model.type !== 'gpt-4' && model.type !== 'claude'
237237

238238
## Task
239239

240-
\{\{task_description\}\}
240+
\\{\\{task_description\\}\\}
241241

242242
```{petk:include}
243243
path: examples/{{model.type}}-examples/*.md
@@ -324,13 +324,13 @@ prompts/
324324
**Best Practice Documentation**:
325325
````markdown
326326
<!-- Meta-template for documenting patterns -->
327-
# \{\{pattern_name\}\} Pattern
327+
# \\{\\{pattern_name\\}\\} Pattern
328328

329329
## Purpose
330-
\{\{pattern_description\}\}
330+
\\{\\{pattern_description\\}\\}
331331

332332
## When to Use
333-
\{\{use_cases\}\}
333+
\\{\\{use_cases\\}\\}
334334

335335
## Template
336336
```{petk:include}
@@ -343,7 +343,7 @@ path: examples/{{pattern_name}}/*.md
343343
```
344344

345345
## Variations
346-
\{\{pattern_variations\}\}
346+
\\{\\{pattern_variations\\}\\}
347347
````
348348

349349
## Measuring Success in Prompt Engineering

apps/docs/docs/learning/first-template.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ path: ../components/ethical-framework.md
284284
Build sophisticated templates that demonstrate complex include patterns:
285285
286286
**templates/persona-generator.md:**
287-
```markdown
287+
````markdown
288288
---
289289
generator: AI Persona Assembly System
290290
version: "`{{version}}`"
@@ -312,7 +312,7 @@ sampling_method: "deterministic"
312312
313313
## Contextual Adaptations
314314
315-
Based on the specified use case: **\{\{use_case\}\}**
315+
Based on the specified use case: **\\{\\{use_case\\}\\}**
316316
317317
```{petk:include}
318318
glob: "adaptations/`{{use_case}}`/*.md"
@@ -334,7 +334,7 @@ This persona definition should be used as a system prompt for AI assistants. Key
334334
335335
*Template processed with Petk v`{{version}}` - `{{project_name}}`*
336336
*For questions or customization, refer to the template documentation.*
337-
```
337+
````
338338

339339
### 7. Add Enhancement Modules
340340

@@ -420,7 +420,7 @@ petk validate templates/persona-generator.md
420420
Add conditional logic to your templates:
421421

422422
**templates/adaptations/enterprise_consulting/security-focus.md:**
423-
```markdown
423+
````markdown
424424
## Security-First Approach
425425

426426
When working with enterprise clients, prioritize:
@@ -434,14 +434,14 @@ When working with enterprise clients, prioritize:
434434
path: "../../components/security-checklist.md"
435435
condition: "`{{security_level}}` == 'high'"
436436
```
437-
```
437+
````
438438
439439
### 11. Dynamic Content Sampling
440440
441441
Use sampling for variety in generated content:
442442
443443
**templates/persona-generator.md** (enhanced section):
444-
```markdown
444+
````markdown
445445
## Personality Variations
446446
447447
```{petk:include}
@@ -450,7 +450,7 @@ sampling_method: "deterministic"
450450
sample_size: 3
451451
seed: "`{{role_type}}`"
452452
```
453-
```
453+
````
454454

455455
### 12. Hierarchical Organization
456456

apps/docs/docs/learning/getting-started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ You can customize these settings for your project needs.
8484
8585
Create a simple template file at `templates/welcome.md`:
8686

87-
```markdown
87+
````markdown
8888
# Welcome to {{project_name}}
8989

9090
This is a template created by {{author}}.
@@ -95,7 +95,7 @@ path: snippets/common-instructions.md
9595

9696
## Project Overview
9797
This project demonstrates Petk's template processing capabilities.
98-
```
98+
````
9999

100100
Create the included snippet at `templates/snippets/common-instructions.md`:
101101

@@ -172,13 +172,13 @@ Use markdown code blocks with the `{petk:include}` directive to dynamically incl
172172

173173
### Advanced Includes
174174
Petk supports sophisticated include patterns:
175-
```markdown
175+
````markdown
176176
```{petk:include}
177177
glob: "examples/*.md"
178178
order_by: "last_updated_desc"
179179
limit: 5
180180
```
181-
```
181+
````
182182

183183
## Development Workflow
184184

apps/docs/docs/learning/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ yarn global add petk
3737

3838
1. Create a new Markdown file called `example.md`:
3939

40-
```markdown
40+
````markdown
4141
# My First Template
4242

4343
This is a basic template that will be processed by Petk.
@@ -51,7 +51,7 @@ Welcome to the content section!
5151
```{petk:include}
5252
path: footer.md
5353
```
54-
```
54+
````
5555

5656
2. Create the included files:
5757

apps/docs/docs/problems/common-issues.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ petk process your-file.md --verbose
104104
````
105105

106106
2. **Verify file paths are correct:**
107-
```markdown
107+
````markdown
108108
<!-- Use relative paths -->
109109
```{petk:include}
110110
path: ./components/header.md
@@ -114,7 +114,7 @@ petk process your-file.md --verbose
114114
```{petk:include}
115115
path: /templates/shared/footer.md
116116
```
117-
```
117+
````
118118

119119
3. **Check file encoding:**
120120
```bash
@@ -135,11 +135,11 @@ petk process your-file.md --verbose
135135
```
136136

137137
2. **Use absolute paths:**
138-
```markdown
138+
````markdown
139139
```{petk:include}
140140
path: /full/path/to/file.md
141141
```
142-
```
142+
````
143143

144144
3. **Set base directory in configuration:**
145145
```javascript
@@ -409,7 +409,7 @@ petk validate ./templates/ --check-circular
409409
```
410410

411411
2. **Restructure includes:**
412-
```markdown
412+
````markdown
413413
<!-- Instead of mutual includes, use a common base -->
414414
<!-- base.md -->
415415
```{petk:include}
@@ -421,15 +421,15 @@ petk validate ./templates/ --check-circular
421421
```{petk:include}
422422
path: footer.md
423423
```
424-
```
424+
````
425425

426426
3. **Use conditional includes:**
427-
```markdown
427+
````markdown
428428
```{petk:include}
429429
path: header.md
430430
if: !included.header
431431
```
432-
```
432+
````
433433

434434
## Getting Help
435435

0 commit comments

Comments
 (0)