@maxiaochao/pi-toolkit 0.1.5 → 0.1.6

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2026-08-19 - v0.1.6
2
+
3
+ - expand global agent guidance and reuse-before-writing rules
4
+
1
5
  ## 2026-08-18 - v0.1.5
2
6
 
3
7
  - fix cache rebuild attribution and cache retention reporting
package/global/AGENTS.md CHANGED
@@ -13,6 +13,7 @@ Before implementing:
13
13
  - If multiple interpretations exist, present them - don't pick silently.
14
14
  - If a simpler approach exists, say so. Push back when warranted.
15
15
  - If something is unclear, stop. Name what's confusing. Ask.
16
+ - If requirements conflict (e.g., durability vs latency, correctness vs speed), name the conflict explicitly. Never average conflicting requirements into something that satisfies neither.
16
17
 
17
18
  ## 2. Simplicity First
18
19
 
@@ -42,6 +43,11 @@ When your changes create orphans:
42
43
 
43
44
  The test: Every changed line should trace directly to the user's request.
44
45
 
46
+ When fixing a bug, fix the root cause, not the symptom. Find where the defect actually lives:
47
+ - Grep every caller of the function you touch; a report names a symptom, and patching only the path the ticket mentions leaves sibling callers still broken.
48
+ - If the shared function is wrong, fix it once - do not scatter per-caller guards.
49
+ - If one caller is wrong, fix that caller - do not add defensive handling to a correct shared function.
50
+
45
51
  ## 4. Goal-Driven Execution
46
52
 
47
53
  **Define success criteria. Loop until verified.**
@@ -85,6 +91,14 @@ After each significant step:
85
91
  - "Completed" is wrong if anything was silently skipped.
86
92
  - "Tests pass" is wrong if any test was skipped.
87
93
  - Default to surfacing uncertainty. When in doubt, over-communicate what you're unsure about.
94
+ - If a required input, file, or tool is missing (or a step is impossible under the stated constraints), do NOT fabricate it to make a check pass. Report what is missing and what you need.
95
+
96
+ ## 8. Reuse Before Writing
97
+
98
+ **Before writing new code, check in order:**
99
+ 1. Does it already exist in this codebase? Reuse it - do not re-implement it yourself, even with the standard library. (If the existing helper is itself the bug, fix it once - see Rule 3.)
100
+ 2. Does the standard library cover it? Use it.
101
+ 3. Only then: write the minimum code that works.
88
102
 
89
103
  ---
90
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxiaochao/pi-toolkit",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Personal pi coding agent toolkit: /todos extension + /cache_export interactive cache dashboard.",
5
5
  "type": "module",
6
6
  "keywords": [