Skip to content

Commit e340bef

Browse files
authored
Merge pull request #19 from Codeplain-ai/feat/update-docs-on-plain-language-sec
Update docs for plain language spec
2 parents 920abe2 + 5365c64 commit e340bef

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

Plain-language-specification.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,45 @@ Here's an example of a linked resource (see Task manager example application for
196196
- Show The Task List. The details of the user interface are provided in the file [task_list_ui_specification.yaml](task_list_ui_specification.yaml).
197197
```
198198

199-
Please note that only links to files in the same folder (and its subfolders) as the Plain specification are supported. Links to external resources are not supported.
199+
**Important Notes:**
200+
- Only links to files in the same folder (and its subfolders) as the Plain specification are supported. Links to external resources are not supported.
201+
- File paths are resolved relative to the location of the Plain specification file.
202+
- All types are supported, except binary files.
203+
204+
### Hierarchical Resource Visibility
205+
206+
Due to the hierarchical structure of the Plain specification, file attachments follow a scoping rule: **a functional requirement can only access linked resources that are defined in its own section or in any parent section**.
207+
208+
Here's an example demonstrating this hierarchical nature:
209+
210+
```plain
211+
# Section 1
212+
213+
***Non-Functional Requirements:***
214+
215+
- Simple non-functional requirement with [file_attachment_1.yaml](file_attachment_1.yaml)
216+
217+
# Section 2
218+
219+
***Non-Functional Requirements:***
220+
221+
- Simple non-functional requirement with [file_attachment_2.yaml](file_attachment_2.yaml)
222+
223+
## Section 2.1
224+
225+
***Functional Requirements:***
226+
227+
- Simple functional requirement with [file_attachment_2_1.yaml](file_attachment_2_1.yaml)
228+
```
229+
230+
**Resource visibility for Section 2.1:**
231+
-`file_attachment_2_1.yaml` - same section
232+
-`file_attachment_2.yaml` - parent section (Section 2)
233+
-`file_attachment_1.yaml` - sibling section (Section 1), not accessible
234+
235+
This hierarchical scoping ensures that resources are properly encapsulated and prevents accidental access to unrelated files.
236+
237+
This design allows you to optimize context size by attaching only the necessary resources to the functional requirements that need them, improving the performance of the rendering process.
200238

201239
## Liquid templates
202240

0 commit comments

Comments
 (0)