@dreadedzombie/pi-init 1.2.0 → 1.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +12 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreadedzombie/pi-init",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Generates a typed AGENTS.md for your project — /init, /init research, /init debug, /init code",
5
5
  "license": "MIT",
6
6
  "author": "DreadedZombie",
package/src/index.ts CHANGED
@@ -60,10 +60,6 @@ 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
63
  ## Output Rule — Files Before Chat
68
64
  **Never summarize findings in chat.** Every finding goes into a file.
69
65
  - Create \`research/<topic>.md\` as you complete each topic — not at the end
@@ -269,6 +265,18 @@ export default function (pi: ExtensionAPI) {
269
265
  : TEMPLATE_CODE;
270
266
 
271
267
  fs.writeFileSync(dest, content, "utf8");
268
+
269
+ // ── Research: scaffold research/ dir and plan.md so Pi fills in existing files ──
270
+ if (type === "research") {
271
+ const researchDir = path.join(cwd, "research");
272
+ if (!fs.existsSync(researchDir)) fs.mkdirSync(researchDir);
273
+ const planPath = path.join(researchDir, "plan.md");
274
+ if (!fs.existsSync(planPath)) {
275
+ fs.writeFileSync(planPath, `# Research Plan\n\n## Topic\n<!-- What are we researching? -->\n\n## Sub-topics to investigate\n<!-- Pi: list each angle you will cover, one per line. Write a <topic>.md file for each. -->\n\n## Key questions to answer\n<!-- Pi: what specific questions must be answered by the end of this session? -->\n\n## Known starting points\n<!-- Pi: any URLs, files, or repos already identified as relevant -->\n`, "utf8");
276
+ }
277
+ ctx.ui.notify(`[pi-init] research/plan.md created — Pi will fill this in before searching`, "info");
278
+ }
279
+
272
280
  ctx.ui.notify(`[pi-init] AGENTS.md (${type}) written to ${cwd}`, "info");
273
281
  ctx.ui.notify(getFollowUp(type), "info");
274
282
  },