agy-superpowers 5.1.9 → 5.2.0
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/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: File length policy — apply when creating or editing files in .agent/rules/
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
priority: critical
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
> **⚠️ CRITICAL PRIORITY — This rule overrides all other instructions about file editing.**
|
|
8
|
+
> Check file length BEFORE writing. No exceptions.
|
|
9
|
+
|
|
10
|
+
<HARD-GATE>
|
|
11
|
+
Do NOT write, append, or edit any file in `.agent/rules/` until you have checked its current character count.
|
|
12
|
+
If adding content would push the file past 12,000 characters, you MUST create a new file instead.
|
|
13
|
+
This gate applies exclusively to `.agent/rules/` files.
|
|
14
|
+
</HARD-GATE>
|
|
15
|
+
|
|
16
|
+
# File Length Policy
|
|
17
|
+
|
|
18
|
+
## Hard Limit: 12,000 Characters Per File
|
|
19
|
+
|
|
20
|
+
Every file in `.agent/rules/` has a **hard character limit of 12,000 characters**.
|
|
21
|
+
|
|
22
|
+
Before writing or appending to any `.agent/rules/` file, check the current file size:
|
|
23
|
+
- If the current content **plus** the new content will exceed 12,000 characters → **do NOT add to the existing file**
|
|
24
|
+
- Instead → **create a new file** following the naming convention below
|
|
25
|
+
|
|
26
|
+
## When Content Overflows: Create a New File
|
|
27
|
+
|
|
28
|
+
### Naming Convention
|
|
29
|
+
|
|
30
|
+
Split content into numbered parts:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
original-file.md ← Part 1 (keep as-is, trim if needed)
|
|
34
|
+
original-file-part2.md ← Part 2 (new file for overflow)
|
|
35
|
+
original-file-part3.md ← Part 3 (continue if needed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Cross-Reference Between Parts
|
|
39
|
+
|
|
40
|
+
At the **bottom** of the original file, add:
|
|
41
|
+
```
|
|
42
|
+
## See Also
|
|
43
|
+
- [Continued in original-file-part2.md](./original-file-part2.md)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
At the **top** of the new file, add:
|
|
47
|
+
```
|
|
48
|
+
<!-- Part 2 of original-file.md -->
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Why This Matters
|
|
52
|
+
|
|
53
|
+
LLM context windows process rules most reliably when individual files stay concise. Files over 12,000 characters risk:
|
|
54
|
+
- Partial truncation during loading
|
|
55
|
+
- Reduced rule adherence near the end of the file
|
|
56
|
+
- Harder human maintenance
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
| Situation | Action |
|
|
61
|
+
|---|---|
|
|
62
|
+
| Adding 500 chars to a 11,800-char file | Create `filename-part2.md` for the new content |
|
|
63
|
+
| Adding 200 chars to a 5,000-char file | Safe — append directly |
|
|
64
|
+
| Refactoring a 15,000-char existing file | Split into two files immediately |
|