devlyn-cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/bin/devlyn.js +362 -0
- package/config/commands/devlyn.design-system.md +502 -0
- package/config/commands/devlyn.discover-product.md +116 -0
- package/config/commands/devlyn.feature-spec.md +630 -0
- package/config/commands/devlyn.handoff.md +13 -0
- package/config/commands/devlyn.product-spec.md +603 -0
- package/config/commands/devlyn.recommend-features.md +286 -0
- package/config/commands/devlyn.resolve.md +108 -0
- package/config/commands/devlyn.review.md +99 -0
- package/config/commands/devlyn.ui.md +342 -0
- package/config/commit-conventions.md +28 -0
- package/config/skills/feature-gap-analysis/SKILL.md +111 -0
- package/config/skills/investigate/SKILL.md +71 -0
- package/config/skills/prompt-engineering/SKILL.md +243 -0
- package/config/templates/prompt-templates.md +71 -0
- package/config/templates/template-feature.spec.md +255 -0
- package/config/templates/template-product-spec.md +680 -0
- package/package.json +25 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-engineering
|
|
3
|
+
description: Claude 4 prompt optimization for creating, reviewing, or refining prompts. Applies official Anthropic best practices for explicit instructions, context framing, format control, and model-specific tuning. Proactively use this skill when writing system prompts, agent instructions, skill definitions, or meta-prompting.
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Edit, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
Version: 2026-01 | Claude 4.x (Opus 4.5, Sonnet 4.5, Haiku 4.5)
|
|
9
|
+
Source: https://platform.claude.com/docs/build-with-claude/prompt-engineering/claude-4-best-practices
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
# Prompt Engineering for Claude 4
|
|
13
|
+
|
|
14
|
+
Claude 4 models follow instructions precisely. Vague prompts get literal interpretations. Apply these patterns.
|
|
15
|
+
|
|
16
|
+
## Core Principles
|
|
17
|
+
|
|
18
|
+
1. **Be explicit** - Claude does exactly what you ask, not what you might mean
|
|
19
|
+
2. **Add context** - Explain WHY, not just WHAT (Claude generalizes from reasoning)
|
|
20
|
+
3. **Match examples to intent** - Claude treats examples as specifications
|
|
21
|
+
4. **Use XML tags** - Structure complex instructions with semantic tags
|
|
22
|
+
5. **Avoid "think"** - Use "consider", "evaluate", "analyze" instead (when thinking is disabled)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Decision Tree 1: Writing Instructions
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
START: Writing an instruction
|
|
30
|
+
│
|
|
31
|
+
├─► Is the desired behavior obvious?
|
|
32
|
+
│ NO → Add explicit detail
|
|
33
|
+
│ Example: "Create a dashboard" → "Create a dashboard with charts,
|
|
34
|
+
│ filters, and export functionality. Go beyond basics."
|
|
35
|
+
│
|
|
36
|
+
├─► Could Claude interpret this literally in an unhelpful way?
|
|
37
|
+
│ YES → Add context explaining WHY
|
|
38
|
+
│ Example: "NEVER use ellipses" → "Never use ellipses because
|
|
39
|
+
│ text-to-speech can't pronounce them."
|
|
40
|
+
│
|
|
41
|
+
└─► Do I want Claude to be proactive or conservative?
|
|
42
|
+
PROACTIVE → "Implement changes rather than suggesting them"
|
|
43
|
+
CONSERVATIVE → "Default to recommendations; only act when explicitly asked"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Correct: Explicit with Context
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
<default_to_action>
|
|
50
|
+
Implement changes rather than suggesting them. If intent is unclear, infer the
|
|
51
|
+
most useful action and proceed. Use tools to discover missing details instead of guessing.
|
|
52
|
+
</default_to_action>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Wrong: Vague Instructions
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
Help me with the code.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Decision Tree 2: Format Control
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
START: Controlling output format
|
|
67
|
+
│
|
|
68
|
+
├─► Want prose instead of markdown?
|
|
69
|
+
│ → "Write in smoothly flowing prose paragraphs."
|
|
70
|
+
│ → Wrap content in <prose> tags
|
|
71
|
+
│
|
|
72
|
+
├─► Want to minimize bullet points?
|
|
73
|
+
│ → "Incorporate items naturally into sentences.
|
|
74
|
+
│ Avoid ordered/unordered lists unless truly discrete items."
|
|
75
|
+
│
|
|
76
|
+
├─► Want structured data?
|
|
77
|
+
│ → Use XML tags: "Write in <response_format> tags"
|
|
78
|
+
│ → Specify JSON schema explicitly
|
|
79
|
+
│
|
|
80
|
+
└─► Output still wrong?
|
|
81
|
+
→ Match your PROMPT style to desired OUTPUT style
|
|
82
|
+
→ Remove markdown from prompt if you don't want markdown output
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Pattern: Minimize Markdown
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
<avoid_excessive_markdown>
|
|
89
|
+
Write in clear, flowing prose using complete paragraphs. Reserve markdown for:
|
|
90
|
+
- `inline code` and code blocks
|
|
91
|
+
- Simple headings (##, ###)
|
|
92
|
+
|
|
93
|
+
DO NOT use bullets/numbered lists unless presenting truly discrete items or
|
|
94
|
+
explicitly requested. Incorporate information naturally into sentences.
|
|
95
|
+
</avoid_excessive_markdown>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Decision Tree 3: Model Selection
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
START: Which Claude model?
|
|
104
|
+
│
|
|
105
|
+
├─► Complex reasoning, multi-step analysis, or highest quality?
|
|
106
|
+
│ → Opus 4.5 (claude-opus-4-5-20250929)
|
|
107
|
+
│
|
|
108
|
+
├─► Balance of quality, speed, and cost?
|
|
109
|
+
│ → Sonnet 4.5 (claude-sonnet-4-5-20250929)
|
|
110
|
+
│
|
|
111
|
+
└─► Fast responses, simple tasks, cost-sensitive?
|
|
112
|
+
→ Haiku 4.5 (claude-haiku-4-5-20250929)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Decision Tree 4: Tool Usage
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
START: Claude needs to use tools
|
|
121
|
+
│
|
|
122
|
+
├─► Want Claude to be proactive with tools?
|
|
123
|
+
│ → "Use tools to discover details instead of asking."
|
|
124
|
+
│
|
|
125
|
+
├─► Want Claude to parallelize?
|
|
126
|
+
│ → "If calls are independent, make them in parallel."
|
|
127
|
+
│
|
|
128
|
+
├─► Claude over-triggering on tools?
|
|
129
|
+
│ → Remove aggressive language ("MUST", "CRITICAL", "ALWAYS")
|
|
130
|
+
│ → Use natural phrasing: "Use this tool when..."
|
|
131
|
+
│
|
|
132
|
+
└─► Claude under-triggering?
|
|
133
|
+
→ Be more specific about trigger conditions
|
|
134
|
+
→ Add "Default to using X tool for Y tasks"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Pattern: Parallel Tool Usage
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
<parallel_tool_calls>
|
|
141
|
+
If multiple tool calls have no dependencies, make them in parallel. When reading
|
|
142
|
+
3 files, run 3 tool calls simultaneously. However, if calls depend on previous
|
|
143
|
+
results, execute sequentially. Never use placeholders for missing parameters.
|
|
144
|
+
</parallel_tool_calls>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Anti-Patterns (Claude 4 Specific)
|
|
150
|
+
|
|
151
|
+
| Anti-Pattern | Why It Fails | Fix |
|
|
152
|
+
|--------------|--------------|-----|
|
|
153
|
+
| "Can you suggest changes?" | Claude will only suggest, not implement | "Change this function to..." |
|
|
154
|
+
| "Think about this carefully" | Triggers thinking sensitivity | "Consider this carefully" |
|
|
155
|
+
| "CRITICAL: You MUST..." | Opus 4.5 may over-trigger | "Use this when..." |
|
|
156
|
+
| Vague instructions | Literal interpretation | Add explicit detail |
|
|
157
|
+
| No context for rules | Claude can't generalize | Explain WHY behind rules |
|
|
158
|
+
| Examples with unwanted patterns | Claude mimics examples precisely | Remove unwanted behaviors from examples |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Prompt Templates
|
|
163
|
+
|
|
164
|
+
### System Prompt: Proactive Agent
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
<agent_behavior>
|
|
168
|
+
Default to implementing changes rather than suggesting them. When intent is unclear,
|
|
169
|
+
infer the most useful action and proceed using tools to discover missing details.
|
|
170
|
+
</agent_behavior>
|
|
171
|
+
|
|
172
|
+
<code_exploration>
|
|
173
|
+
Always read and understand relevant files before proposing edits. Do not speculate
|
|
174
|
+
about code you have not inspected. Be rigorous in searching for key facts.
|
|
175
|
+
</code_exploration>
|
|
176
|
+
|
|
177
|
+
<output_style>
|
|
178
|
+
Provide concise, direct updates. Skip verbose summaries unless asked. After tool
|
|
179
|
+
use, briefly state what was done and proceed to the next action.
|
|
180
|
+
</output_style>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### System Prompt: Conservative Agent
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
<conservative_mode>
|
|
187
|
+
Do not implement changes unless explicitly instructed. Default to providing
|
|
188
|
+
information, research, and recommendations. Only proceed with modifications
|
|
189
|
+
when the user explicitly requests them.
|
|
190
|
+
</conservative_mode>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### System Prompt: Long-Running Tasks
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
<context_management>
|
|
197
|
+
Your context window will be compacted automatically. Do not stop tasks early due
|
|
198
|
+
to token budget. Save progress to files before context refreshes. Be as persistent
|
|
199
|
+
and autonomous as possible.
|
|
200
|
+
</context_management>
|
|
201
|
+
|
|
202
|
+
<state_tracking>
|
|
203
|
+
Use structured formats (JSON) for tracking test results and task status.
|
|
204
|
+
Use unstructured text for progress notes.
|
|
205
|
+
Use git for checkpoints that can be restored.
|
|
206
|
+
Focus on incremental progress.
|
|
207
|
+
</state_tracking>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Reducing Over-Engineering
|
|
213
|
+
|
|
214
|
+
Claude 4 can over-engineer. Counter with:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
<minimal_solutions>
|
|
218
|
+
Only make changes directly requested. Keep solutions simple and focused.
|
|
219
|
+
|
|
220
|
+
- Don't add features beyond what was asked
|
|
221
|
+
- Don't refactor surrounding code during bug fixes
|
|
222
|
+
- Don't add error handling for impossible scenarios
|
|
223
|
+
- Don't create abstractions for one-time operations
|
|
224
|
+
- Don't design for hypothetical future requirements
|
|
225
|
+
|
|
226
|
+
The right complexity is the minimum needed for the current task.
|
|
227
|
+
</minimal_solutions>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Quick Reference
|
|
233
|
+
|
|
234
|
+
| Goal | Prompt Pattern |
|
|
235
|
+
|------|----------------|
|
|
236
|
+
| More detail | "Include as many features as possible. Go beyond basics." |
|
|
237
|
+
| Less markdown | "Write in flowing prose. Avoid bullet lists." |
|
|
238
|
+
| Proactive | "Implement rather than suggest. Infer intent and proceed." |
|
|
239
|
+
| Conservative | "Only act when explicitly asked. Default to recommendations." |
|
|
240
|
+
| Parallel tools | "Make independent tool calls in parallel." |
|
|
241
|
+
| Code exploration | "Always read files before proposing changes." |
|
|
242
|
+
| Less verbose | "Skip summaries. Provide direct, concise updates." |
|
|
243
|
+
| More verbose | "After tool use, provide a summary of work done." |
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Prompt Templates
|
|
2
|
+
|
|
3
|
+
Reusable prompts optimized for common workflows based on usage patterns.
|
|
4
|
+
|
|
5
|
+
## Investigation with Checkpoints
|
|
6
|
+
|
|
7
|
+
Use for code investigation or feature analysis to ensure findings are captured:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Investigate [issue/feature]. As you go, use TodoWrite to checkpoint your findings.
|
|
11
|
+
Every 5-10 minutes of analysis, output a 'Current Understanding' summary so I have
|
|
12
|
+
something actionable if we need to stop.
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Time-Boxed Sessions
|
|
16
|
+
|
|
17
|
+
Use when you have limited time and need guaranteed deliverables:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
I have [X] minutes. My goal is [specific goal]. Success means [specific deliverable].
|
|
21
|
+
Start with the minimum viable solution, then improve if time allows.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Debugging
|
|
25
|
+
|
|
26
|
+
For systematic debugging, use `/devlyn.resolve [issue description]` which includes:
|
|
27
|
+
- Code path mapping
|
|
28
|
+
- Hypothesis-driven analysis
|
|
29
|
+
- Test-driven fix validation
|
|
30
|
+
- Full regression check
|
|
31
|
+
|
|
32
|
+
## Parallel Feature Analysis
|
|
33
|
+
|
|
34
|
+
Use for comprehensive feature gap analysis:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Spawn separate agents to:
|
|
38
|
+
(1) analyze the data layer for this feature
|
|
39
|
+
(2) check the API endpoints
|
|
40
|
+
(3) review the UI components
|
|
41
|
+
Consolidate findings into a single summary.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Autonomous Feature Implementation
|
|
45
|
+
|
|
46
|
+
Use for end-to-end feature implementation with validation:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Implement [feature] end-to-end. First, use Task to spawn a sub-agent to analyze
|
|
50
|
+
existing patterns in the codebase. Then implement the feature with:
|
|
51
|
+
1) [Component 1]
|
|
52
|
+
2) [Component 2]
|
|
53
|
+
3) [Component 3]
|
|
54
|
+
Write comprehensive tests and iterate on the implementation until all tests pass.
|
|
55
|
+
Run the full test suite before presenting the final diff. Do not stop until you
|
|
56
|
+
have working, tested code ready for PR.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Autonomous Bug Fix
|
|
60
|
+
|
|
61
|
+
For complex bugs that need autonomous resolution:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
/devlyn.resolve [bug description]
|
|
65
|
+
|
|
66
|
+
After analysis, implement the fix autonomously:
|
|
67
|
+
- Write failing test first
|
|
68
|
+
- Iterate through hypotheses until test passes
|
|
69
|
+
- Run full test suite before completing
|
|
70
|
+
- Do not stop at 'needs more investigation'
|
|
71
|
+
```
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# {Feature Name}
|
|
2
|
+
|
|
3
|
+
## Meta
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
id: F-{number}
|
|
7
|
+
status: draft
|
|
8
|
+
version: "0.1"
|
|
9
|
+
created: { date }
|
|
10
|
+
product_spec: "{behavior}"
|
|
11
|
+
phase: { phase }
|
|
12
|
+
platform: { platform }
|
|
13
|
+
interfaces: [{ list }]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
purpose: { one sentence }
|
|
20
|
+
success_criteria:
|
|
21
|
+
- { outcome }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Data Model
|
|
27
|
+
|
|
28
|
+
### {Entity}
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
attributes:
|
|
32
|
+
{ field }:
|
|
33
|
+
type: { type }
|
|
34
|
+
required: { bool }
|
|
35
|
+
constraints: { rules }
|
|
36
|
+
|
|
37
|
+
relations:
|
|
38
|
+
{ name }:
|
|
39
|
+
target: { Entity }
|
|
40
|
+
type: { relation }
|
|
41
|
+
|
|
42
|
+
examples:
|
|
43
|
+
typical: {}
|
|
44
|
+
edge: {}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
<!-- Include sections based on interfaces[] -->
|
|
50
|
+
|
|
51
|
+
## API
|
|
52
|
+
|
|
53
|
+
<!-- if: api in interfaces -->
|
|
54
|
+
|
|
55
|
+
### {METHOD} {/path}
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
purpose: { text }
|
|
59
|
+
auth: { level }
|
|
60
|
+
request: {}
|
|
61
|
+
response:
|
|
62
|
+
success: {}
|
|
63
|
+
errors: []
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## CLI
|
|
69
|
+
|
|
70
|
+
<!-- if: commands in interfaces -->
|
|
71
|
+
|
|
72
|
+
### {command}
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
usage: { pattern }
|
|
76
|
+
arguments: {}
|
|
77
|
+
options: {}
|
|
78
|
+
output: {}
|
|
79
|
+
examples: []
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Public API
|
|
85
|
+
|
|
86
|
+
<!-- if: public_api in interfaces -->
|
|
87
|
+
|
|
88
|
+
### {function}
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
signature: { sig }
|
|
92
|
+
parameters: {}
|
|
93
|
+
returns: {}
|
|
94
|
+
throws: []
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## MCP
|
|
100
|
+
|
|
101
|
+
<!-- if: tools in interfaces -->
|
|
102
|
+
|
|
103
|
+
### Tool: {name}
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
description: { text }
|
|
107
|
+
parameters: {}
|
|
108
|
+
returns: { text }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## UI
|
|
114
|
+
|
|
115
|
+
<!-- if: ui in interfaces -->
|
|
116
|
+
|
|
117
|
+
### {View}
|
|
118
|
+
|
|
119
|
+
```yaml
|
|
120
|
+
route: { path }
|
|
121
|
+
states: {}
|
|
122
|
+
flow: []
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## SmartContract (EVM, non-EVM like Solana)
|
|
128
|
+
|
|
129
|
+
<!-- if: contract_functions in interfaces -->
|
|
130
|
+
|
|
131
|
+
### State
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
{ variable }:
|
|
135
|
+
type: { type }
|
|
136
|
+
visibility: { visibility }
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Functions
|
|
140
|
+
|
|
141
|
+
#### {function}
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
visibility: { external|public }
|
|
145
|
+
mutability: { view|pure|payable }
|
|
146
|
+
modifiers: []
|
|
147
|
+
parameters: {}
|
|
148
|
+
returns: {}
|
|
149
|
+
requires: []
|
|
150
|
+
emits: []
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Events
|
|
154
|
+
|
|
155
|
+
```yaml
|
|
156
|
+
{ Event }:
|
|
157
|
+
params: {}
|
|
158
|
+
indexed: []
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Access Control
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
roles: {}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Events
|
|
170
|
+
|
|
171
|
+
<!-- if: events in interfaces -->
|
|
172
|
+
|
|
173
|
+
### {event}
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
trigger: { when }
|
|
177
|
+
payload: {}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Jobs
|
|
183
|
+
|
|
184
|
+
<!-- if: jobs in interfaces -->
|
|
185
|
+
|
|
186
|
+
### {job}
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
trigger: { type }
|
|
190
|
+
schedule: { cron }
|
|
191
|
+
input: {}
|
|
192
|
+
output: {}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Business Logic
|
|
198
|
+
|
|
199
|
+
### Rules
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
- rule: { name }
|
|
203
|
+
when: { condition }
|
|
204
|
+
then: { action }
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Validations
|
|
208
|
+
|
|
209
|
+
```yaml
|
|
210
|
+
- field: { name }
|
|
211
|
+
rules: []
|
|
212
|
+
message: { text }
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Integrations
|
|
218
|
+
|
|
219
|
+
<!-- if: has external services -->
|
|
220
|
+
|
|
221
|
+
```yaml
|
|
222
|
+
- service: { name }
|
|
223
|
+
operation: { what }
|
|
224
|
+
fallback: { backup }
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Test Scenarios
|
|
230
|
+
|
|
231
|
+
### Unit
|
|
232
|
+
|
|
233
|
+
```yaml
|
|
234
|
+
- scenario: { text }
|
|
235
|
+
given: { setup }
|
|
236
|
+
when: { action }
|
|
237
|
+
then: { result }
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Edge Cases
|
|
241
|
+
|
|
242
|
+
```yaml
|
|
243
|
+
- case: { text }
|
|
244
|
+
input: { value }
|
|
245
|
+
expected: { handling }
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Dependencies
|
|
251
|
+
|
|
252
|
+
```yaml
|
|
253
|
+
requires: []
|
|
254
|
+
enables: []
|
|
255
|
+
```
|