@jstxn/agentdir-pi 0.7.6 → 0.7.8

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 CHANGED
@@ -95,7 +95,8 @@ curl -fsSL https://raw.githubusercontent.com/jstxn/agentdir/main/scripts/install
95
95
 
96
96
  The installer uses `pipx` when available. Otherwise it creates a self-contained
97
97
  virtual environment under `~/.local/share/agentdir` and links the CLI into
98
- `~/.local/bin`.
98
+ `~/.local/bin`. It does not edit Git configuration or ignore files; after
99
+ installation it prints the explicit adoption choices.
99
100
 
100
101
  Verify:
101
102
 
@@ -104,6 +105,16 @@ agentdir --version
104
105
  agentdir --help
105
106
  ```
106
107
 
108
+ Update an existing install to the latest release and refresh adoption for the
109
+ current repository:
110
+
111
+ ```bash
112
+ agentdir update
113
+ agentdir update --dry-run
114
+ ```
115
+
116
+ The older `agentdir --upgrade` interface remains supported for compatibility.
117
+
107
118
  ## Pi Package
108
119
 
109
120
  Pi users can install this repository as a Pi package so the AgentDir skill is
@@ -112,7 +123,7 @@ available automatically during coding tasks:
112
123
  Package page: [@jstxn/agentdir-pi](https://pi.dev/packages/@jstxn/agentdir-pi)
113
124
 
114
125
  ```bash
115
- pi install npm:@jstxn/agentdir-pi@0.7.6
126
+ pi install npm:@jstxn/agentdir-pi@0.7.8
116
127
  # or install directly from a local checkout / release tag:
117
128
  pi install /absolute/path/to/agentdir
118
129
  pi install git:github.com/jstxn/agentdir@<tag-or-commit>
@@ -131,6 +142,13 @@ Run once from a git repository:
131
142
  agentdir adopt
132
143
  ```
133
144
 
145
+ Coding agents use the non-interactive form below so `.agentdir/` is ignored at
146
+ the user level without creating a repository `.gitignore` change:
147
+
148
+ ```bash
149
+ agentdir adopt --gitignore user
150
+ ```
151
+
134
152
  This is intentionally boring setup. It prepares the repository once, then agents
135
153
  operate AgentDir during normal coding work:
136
154
 
@@ -158,6 +176,16 @@ instead of project instruction files:
158
176
  agentdir adopt --install-skill store --install-generic store --integration-target store
159
177
  ```
160
178
 
179
+ Adoption adapts to repos where other tools own these files. When
180
+ [rulesync](https://github.com/dyoshikawa/rulesync) generates the guidance
181
+ files, the managed rule is written to `.rulesync/rules/agentdir.md` instead so
182
+ it survives regeneration, and files with generated-file headers are never
183
+ edited without `--force`. When lefthook, husky, or pre-commit own the Git
184
+ hooks, adopt warns up front, `agentdir doctor` flags hook shims those tools
185
+ later overwrite, and `agentdir hooks install` restores them. See
186
+ [docs/INSTALL.md](docs/INSTALL.md#coexisting-with-rule-generators-and-hook-managers)
187
+ for details.
188
+
161
189
  For non-interactive installs, choose the ignore destination explicitly:
162
190
 
163
191
  ```bash
@@ -166,6 +194,10 @@ agentdir adopt --gitignore user # write the user-level Git excludes file
166
194
  agentdir adopt --gitignore none # leave ignore files unchanged
167
195
  ```
168
196
 
197
+ Generated AgentDir guidance selects `--gitignore user` by default. The plain
198
+ interactive command still prompts, and all three explicit choices remain
199
+ available.
200
+
169
201
  Undo managed setup while keeping the `.agentdir` evidence store:
170
202
 
171
203
  ```bash
@@ -179,17 +211,22 @@ Default adoption writes only local files:
179
211
 
180
212
  ```text
181
213
  <repo>/.agentdir/ # evidence, artifacts, indexes, state
182
- <repo>/.git/hooks/* # managed hook shims with backups
214
+ <repo>/.agentdir/hooks.json # installed-hook drift manifest
215
+ <active-hooks-directory>/* # managed hook shims with backups
183
216
  <repo>/AGENTS.md # generic / Codex-readable guidance
184
217
  <repo>/CLAUDE.md # Claude Code guidance
185
218
  <repo>/.github/copilot-instructions.md # Copilot guidance
186
219
  <repo>/.cursor/rules/agentdir.mdc # Cursor guidance
187
220
  <repo>/.windsurf/rules/agentdir.md # Windsurf guidance
221
+ <repo>/.rulesync/rules/agentdir.md # rulesync source, when detected
188
222
  ~/.codex/skills/agentdir/SKILL.md # Codex skill, by default
189
223
  ```
190
224
 
191
225
  Managed guidance is wrapped in AgentDir markers. Existing unmanaged content is
192
- preserved where the target format supports managed blocks.
226
+ preserved where the target format supports managed blocks. The active hooks
227
+ directory is `.git/hooks` by default and follows `core.hooksPath` or linked
228
+ worktree configuration. In rulesync repos, the source rule replaces the listed
229
+ project guidance files as the managed source of truth.
193
230
 
194
231
  ## Inspect A Session
195
232
 
@@ -9,7 +9,9 @@ skills/agentdir/SKILL.md
9
9
 
10
10
  The skill teaches Pi to start AgentDir sessions, wrap evidence-bearing shell
11
11
  commands, use local memory/context packs, and produce evidence-aware handoffs.
12
- It does not install the `agentdir` CLI; install AgentDir separately first.
12
+ It also tells Pi to adopt unprepared repositories with `--gitignore user`, so
13
+ the local store stays out of Git without changing project files. It does not
14
+ install the `agentdir` CLI; install AgentDir separately first.
13
15
 
14
16
  ## Install
15
17
 
@@ -34,7 +36,7 @@ pi install git:github.com/jstxn/agentdir@<tag-or-commit>
34
36
  If the npm package has been published:
35
37
 
36
38
  ```bash
37
- pi install npm:@jstxn/agentdir-pi@0.7.6
39
+ pi install npm:@jstxn/agentdir-pi@0.7.8
38
40
  ```
39
41
 
40
42
  Use `pi config` to enable or disable the bundled skill after installation.
@@ -48,7 +50,7 @@ The root `package.json` declares the Pi resources:
48
50
  "keywords": ["pi-package"],
49
51
  "pi": {
50
52
  "skills": ["./skills"],
51
- "image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.6/docs/assets/agentdir-overview.png"
53
+ "image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.8/docs/assets/agentdir-overview.png"
52
54
  }
53
55
  }
54
56
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jstxn/agentdir-pi",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "Pi package for AgentDir local-first coding-agent memory and evidence capture.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -29,6 +29,6 @@
29
29
  "skills": [
30
30
  "./skills"
31
31
  ],
32
- "image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.6/docs/assets/agentdir-overview.png"
32
+ "image": "https://raw.githubusercontent.com/jstxn/agentdir/v0.7.8/docs/assets/agentdir-overview.png"
33
33
  }
34
34
  }
@@ -21,7 +21,7 @@ This Pi package teaches Pi how to operate AgentDir. It does not install the `age
21
21
 
22
22
  At the start of a non-trivial coding task in a software repository:
23
23
 
24
- 1. If `.agentdir` is missing, run `agentdir adopt` once before work begins.
24
+ 1. If `.agentdir` is missing, run `agentdir adopt --gitignore user` once so the local store stays out of Git without changing the repository's `.gitignore`.
25
25
  2. Start the session with `agentdir work start "<short task>" --emit-context`.
26
26
  3. Keep any returned context pack id/source ids if you plan to cite or consume retrieved context later.
27
27
 
@@ -56,6 +56,14 @@ Use `agentdir evidence --brief` and `agentdir timeline` to skim what has been re
56
56
 
57
57
  Emit important plans, blockers, diffs, review decisions, and final handoffs as immutable events when they matter for future replay or audit.
58
58
 
59
+ ## Exit Codes And Structured Errors
60
+
61
+ - 0 success; `agentdir run` passes through the wrapped command's exit code (124 = `--timeout` kill).
62
+ - 2 user error, 3 state error (no root / no active session), 4 missing dependency, 5 configuration error.
63
+ - State errors name the recovery command in the message (`agentdir adopt`, `agentdir work start`).
64
+ - Add `--json` to get a `{"success": false, "exit_code": ..., "error_code": ...}` envelope on failure; add `--quiet` for exit-code-only checks.
65
+ - `agentdir run --session require` fails fast instead of auto-creating a session; `--session create` forces a fresh one.
66
+
59
67
  ## Finish Work
60
68
 
61
69
  Before the final response, run `agentdir work finish --json` when practical. Read the `agent_handoff` object before making final verification claims.