pi-crew 0.8.13 → 0.8.14

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
@@ -2628,3 +2628,28 @@ The reply on the issue asks again for a concrete repro.
2628
2628
 
2629
2629
  typecheck clean; +6 user-scope cleanup tests + 1 routing test update; full
2630
2630
  suite 2963/0.
2631
+
2632
+ ## [0.8.14] — stop injecting AGENTS.md on init (Issue #35, redundant) (2026-06-18)
2633
+
2634
+ `team action=init` no longer writes a guidance block into the project's
2635
+ `AGENTS.md`. AGENTS.md is the USER's project-instructions file (Pi loads it as
2636
+ project guidance), and the injected block was **redundant**: the `team` tool
2637
+ already self-describes via its tool registration (`description` + `promptSnippet`
2638
+ in `src/extension/registration/team-tool.ts:63-64`), which Pi injects into the
2639
+ agent's system prompt every session. So agents still learn pi-crew's commands —
2640
+ from the tool, not AGENTS.md.
2641
+
2642
+ - Removed `injectGuidance(AGENTS.md, ...)` call from `initializeProject()`
2643
+ (`src/extension/project-init.ts`).
2644
+ - Removed `guidancePath` / `guidanceModified` from `ProjectInitResult`.
2645
+ - Removed now-unused `getPackageVersion()` + the markers import.
2646
+ - `team action=cleanup` STILL removes any block injected by older versions
2647
+ (<0.8.14) — backward-compat preserved via `removeGuidance`.
2648
+ - README Uninstall section + install.mjs warning note the v0.8.14 behavior
2649
+ change.
2650
+
2651
+ Scope rationale: pi-crew is a sub-agent orchestration extension. Modifying a
2652
+ user's project-instructions file was out-of-scope and unnecessary.
2653
+
2654
+ +4 regression tests (init does NOT create/modify AGENTS.md; API fields removed).
2655
+ typecheck clean; full suite 2972/0.
package/README.md CHANGED
@@ -113,6 +113,12 @@ node ./pi-crew/install.mjs # from local clone
113
113
  extension uninstall hook, so several things pi-crew created are left behind.
114
114
  Reverse them explicitly with `team action=cleanup`. There are **two scopes**:
115
115
 
116
+ > **v0.8.14+**: `team action=init` **no longer injects a guidance block into
117
+ > AGENTS.md** (it was redundant — the `team` tool self-describes via its tool
118
+ > registration, so the agent learns pi-crew's commands from there, not AGENTS.md).
119
+ > The cleanup steps below still work for removing blocks injected by **older
120
+ > versions** (<0.8.14).
121
+
116
122
  #### Project scope (reverse `team action=init`)
117
123
 
118
124
  ```bash
package/install.mjs CHANGED
@@ -70,11 +70,12 @@ console.log("To force-disable or force-enable workers in a shell, use PI_TEAMS_E
70
70
  console.log("\n--- What pi-crew writes (and how to undo it) ---");
71
71
  console.log("pi-crew itself writes nothing on install. The following only happens when you");
72
72
  console.log("explicitly run `team action=init` in a project:");
73
- console.log(" - A marker-delimited block is injected into the project's AGENTS.md.");
74
- console.log(" (Wrapped in <!-- PI-CREW:GUIDANCE:START/END --> — your content is never touched.)");
75
73
  console.log(" - A `.crew/` runtime state dir is created in the project (run history + artifacts).");
76
74
  console.log(" - With --copy-builtins: bundled agents/teams/workflows are copied into the project.");
77
75
  console.log("This install also created the global config above (`~/.pi/agent/pi-crew.json`).");
76
+ console.log("Note: pi-crew v0.8.14+ no longer injects a guidance block into AGENTS.md on init");
77
+ console.log(" (it was redundant — the `team` tool self-describes via tool registration).");
78
+ console.log(" Versions <0.8.14 did inject one; `team action=cleanup` removes it.");
78
79
  console.log("\nFull uninstall (in order):");
79
80
  console.log(" team action=cleanup dryRun=true # preview what would be removed (project)");
80
81
  console.log(" team action=cleanup # remove the AGENTS.md guidance block");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-crew",
3
- "version": "0.8.13",
3
+ "version": "0.8.14",
4
4
  "description": "Pi extension for coordinated AI teams, workflows, worktrees, and async task orchestration",
5
5
  "author": "baphuongna",
6
6
  "license": "MIT",
@@ -2,7 +2,6 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import { configPath as globalConfigPath } from "../config/config.ts";
4
4
  import { DEFAULT_UI } from "../config/defaults.ts";
5
- import { injectGuidance, standardGuidanceBlocks } from "../config/markers.ts";
6
5
  import { packageRoot, projectCrewRoot, projectPiRoot } from "../utils/paths.ts";
7
6
 
8
7
  export interface ProjectInitOptions {
@@ -22,8 +21,6 @@ export interface ProjectInitResult {
22
21
  configScope: "global" | "project" | "none";
23
22
  configCreated: boolean;
24
23
  configSkipped: boolean;
25
- guidancePath: string;
26
- guidanceModified: boolean;
27
24
  }
28
25
 
29
26
  function ensureDir(dir: string, createdDirs: string[]): void {
@@ -147,22 +144,12 @@ export function initializeProject(cwd: string, options: ProjectInitOptions = {})
147
144
  gitignoreUpdated = true;
148
145
  }
149
146
 
150
- // Inject guidance into project AGENTS.md (or similar) using marker-based injection.
151
- const guidancePath = path.join(cwd, "AGENTS.md");
152
- const version = getPackageVersion();
153
- const guidanceResult = injectGuidance(guidancePath, standardGuidanceBlocks(version));
147
+ // v0.8.14: pi-crew no longer injects a guidance block into AGENTS.md on init.
148
+ // AGENTS.md is the USER's project-instructions file (Pi loads it as project
149
+ // guidance) extensions modifying it was out-of-scope and redundant: the
150
+ // `team` tool already self-describes via its schema description, so the agent
151
+ // learns pi-crew's commands from tool registration, not AGENTS.md.
152
+ // `team action=cleanup` still removes any block injected by older versions.
154
153
 
155
- return { createdDirs, copiedFiles, skippedFiles, gitignorePath, gitignoreUpdated, configPath, configScope, configCreated, configSkipped, guidancePath, guidanceModified: guidanceResult.modified };
156
- }
157
-
158
- /** Read the current package version from the nearest package.json. */
159
- function getPackageVersion(): string {
160
- try {
161
- const pkgPath = path.join(packageRoot(), "package.json");
162
- const raw = fs.readFileSync(pkgPath, "utf-8");
163
- const parsed: { version?: string } = JSON.parse(raw) as { version?: string };
164
- return parsed.version ?? "0.0.0";
165
- } catch {
166
- return "0.0.0";
167
- }
154
+ return { createdDirs, copiedFiles, skippedFiles, gitignorePath, gitignoreUpdated, configPath, configScope, configCreated, configSkipped };
168
155
  }