@dreadedzombie/pi-init 1.0.0 → 1.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/README.md +5 -1
- package/package.json +1 -1
- package/src/index.ts +26 -6
package/README.md
CHANGED
|
@@ -5,10 +5,14 @@ Adds `/init` to [Pi](https://pi.dev/) — generates or updates an AGENTS.md in y
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
+
# via npm (recommended)
|
|
9
|
+
pi install npm:@dreadedzombie/pi-init
|
|
10
|
+
|
|
11
|
+
# via GitHub
|
|
8
12
|
pi install https://github.com/joenilan/pi-init
|
|
9
13
|
```
|
|
10
14
|
|
|
11
|
-
Pi
|
|
15
|
+
Pi loads the extension automatically on next start.
|
|
12
16
|
|
|
13
17
|
## Usage
|
|
14
18
|
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -60,12 +60,23 @@ const TEMPLATE_RESEARCH = `# Research Agent
|
|
|
60
60
|
|
|
61
61
|
**Started:** <!-- Pi: insert today's date (YYYY-MM-DD) -->
|
|
62
62
|
|
|
63
|
+
## FIRST ACTION — Before anything else
|
|
64
|
+
Create the \`research/\` directory and write \`research/plan.md\` listing the topics you will investigate.
|
|
65
|
+
Do this before any searching or reading. This is not optional.
|
|
66
|
+
|
|
67
|
+
## Output Rule — Files Before Chat
|
|
68
|
+
**Never summarize findings in chat.** Every finding goes into a file.
|
|
69
|
+
- Create \`research/<topic>.md\` as you complete each topic — not at the end
|
|
70
|
+
- Update the Research Findings section in this file after writing each doc
|
|
71
|
+
- Chat response comes last, only to say what files were written and what to do next
|
|
72
|
+
- **If you are about to type a finding into chat — stop. Write it to a file instead.**
|
|
73
|
+
- The goal is a handoff document set for the next agent, not a conversation
|
|
74
|
+
|
|
63
75
|
## Search Protocol
|
|
64
76
|
- Run at least **4 distinct queries** approaching the topic from different angles before drawing conclusions
|
|
65
77
|
- Read the **full content** of at least 6 sources — not just summaries or snippets
|
|
66
78
|
- For JS-heavy or dynamically rendered pages where \`fetch\` returns sparse HTML, use **Playwright** to render and extract
|
|
67
79
|
- Cross-reference findings across sources before responding
|
|
68
|
-
- Do **not** respond until you have read multiple sources and built a complete picture
|
|
69
80
|
|
|
70
81
|
## Source Quality Standards
|
|
71
82
|
- Prefer primary sources: official documentation, research papers, original announcements
|
|
@@ -78,9 +89,18 @@ const TEMPLATE_RESEARCH = `# Research Agent
|
|
|
78
89
|
2. **Dive** — read the full content of the 5-6 most relevant sources
|
|
79
90
|
3. **Cross-reference** — identify what sources agree and disagree on
|
|
80
91
|
4. **Synthesize** — build a coherent picture with citations
|
|
81
|
-
5. **
|
|
82
|
-
6. **Update** — add
|
|
83
|
-
7.
|
|
92
|
+
5. **Write** — save to \`research/<topic>.md\` with full detail, citations, code snippets, and gaps
|
|
93
|
+
6. **Update AGENTS.md** — add the file to Research Findings below, one line per file
|
|
94
|
+
7. Repeat steps 1-6 for each sub-topic before moving on
|
|
95
|
+
|
|
96
|
+
## research/<topic>.md format
|
|
97
|
+
Each file should contain:
|
|
98
|
+
- **What was found** — detailed findings with citations (URLs)
|
|
99
|
+
- **Key facts** — bullet list of the most important discoveries
|
|
100
|
+
- **Conflicts** — where sources disagreed and which is more credible
|
|
101
|
+
- **Code / config** — any relevant snippets, commands, or configuration found
|
|
102
|
+
- **Gaps** — what could not be found or verified
|
|
103
|
+
- **Next steps** — what a follow-up agent should investigate or try
|
|
84
104
|
|
|
85
105
|
## Tools
|
|
86
106
|
- \`searxng\` — start here for all searches (private, no tracking)
|
|
@@ -91,9 +111,9 @@ const TEMPLATE_RESEARCH = `# Research Agent
|
|
|
91
111
|
- \`pi-docparser\` — for PDFs, papers, Word docs, spreadsheets
|
|
92
112
|
|
|
93
113
|
## Research Findings
|
|
94
|
-
<!-- Pi:
|
|
114
|
+
<!-- Pi: after writing each research/<topic>.md, add a line here immediately:
|
|
95
115
|
- [Topic title](research/filename.md) — one-line summary of what was found
|
|
96
|
-
|
|
116
|
+
Do not wait until the end. Update this section after every file written. -->
|
|
97
117
|
`;
|
|
98
118
|
|
|
99
119
|
const TEMPLATE_DEBUG = `# Debug Agent
|