aienvmp 0.1.50 → 0.1.51

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.
@@ -11,20 +11,26 @@ The goal is to help multiple AI agents avoid silently installing or using differ
11
11
 
12
12
  ## Preflight
13
13
 
14
- Before environment-impacting work, run:
14
+ Before environment-impacting work, run the light preflight first:
15
15
 
16
16
  ```bash
17
- npx aienvmp context
17
+ npx aienvmp status --write
18
18
  ```
19
19
 
20
- If the output says `review-required`, do not change global runtimes, package managers, Docker settings, or global packages without asking the user.
20
+ Then read the short handoff:
21
21
 
22
- For machine-readable context, use:
22
+ ```bash
23
+ cat .aienvmp/summary.md
24
+ ```
25
+
26
+ For deeper machine-readable context, use:
23
27
 
24
28
  ```bash
25
29
  npx aienvmp context --json
26
30
  ```
27
31
 
32
+ If the output says `review-required`, do not change global runtimes, package managers, Docker settings, dependencies, lockfiles, or global packages without asking the user.
33
+
28
34
  ## Before Environment Changes
29
35
 
30
36
  Record intent before changing shared environment state:
@@ -38,26 +44,25 @@ Use this for changes such as:
38
44
  - installing or upgrading Node, Python, Docker, package managers, or global CLIs
39
45
  - changing `.nvmrc`, `.python-version`, `mise.toml`, `.tool-versions`, or `.aienvmp/policy.yml`
40
46
  - switching package managers
47
+ - changing dependencies or lockfiles
41
48
  - changing Docker daemon/context assumptions
42
49
 
43
50
  ## After Environment Changes
44
51
 
45
- Refresh the environment map:
52
+ Use the one-command checkpoint after an accepted environment change:
46
53
 
47
54
  ```bash
48
- npx aienvmp sync
55
+ npx aienvmp checkpoint --actor agent:codex --summary "<what changed>" --target "<tool-or-runtime>"
49
56
  ```
50
57
 
51
- Record what changed:
58
+ This records the change, refreshes the env map, writes status/summary/SBOM artifacts, and records a handoff.
52
59
 
53
- ```bash
54
- npx aienvmp record --actor agent:codex --summary "<what changed>" --target "<tool-or-runtime>" --evidence "<command or file>"
55
- ```
56
-
57
- Resolve the original intent if complete:
60
+ If checkpoint is not available, use the explicit fallback:
58
61
 
59
62
  ```bash
60
- npx aienvmp resolve --actor agent:codex --id "<intent-id>"
63
+ npx aienvmp sync
64
+ npx aienvmp record --actor agent:codex --summary "<what changed>" --target "<tool-or-runtime>" --evidence "<command or file>"
65
+ npx aienvmp handoff --record --actor agent:codex
61
66
  ```
62
67
 
63
68
  ## Safety Rules
@@ -66,6 +71,7 @@ npx aienvmp resolve --actor agent:codex --id "<intent-id>"
66
71
  - Treat policy mismatches as review-required.
67
72
  - Do not install, upgrade, downgrade, or remove global software unless the user explicitly asks.
68
73
  - Prefer project-local version files and local environments.
74
+ - Do not switch package managers or rewrite lockfiles only to satisfy a tool preference.
69
75
  - Do not use warnings as permission to interrupt production or shared workspace operations.
70
76
  - Use `npx aienvmp doctor --ci` only in CI or explicit strict-mode automation.
71
77
 
package/BUGFIXES.md CHANGED
@@ -94,6 +94,12 @@ Short record of bugs, fixes, and follow-up checks.
94
94
  - Fix: `readJson` now strips a leading UTF-8 BOM before parsing.
95
95
  - Verification: regression tests cover BOM JSON parsing and Windows smoke testing confirmed dependency counts in `summary.md`.
96
96
 
97
+ ### Agent instructions lagged behind the current protocol
98
+
99
+ - Issue: packaged skill and pointer snippets still emphasized older context/record flows and did not direct agents to `summary.md`.
100
+ - Fix: snippets and the Codex skill now use the current status, summary, context, intent, and checkpoint flow with agent-specific actor examples.
101
+ - Verification: regression tests cover snippet output for AGENTS.md, Claude, and Gemini, and summary/status tests cover the read order and dependency protocol.
102
+
97
103
  ## Template
98
104
 
99
105
  ### Title
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.51
4
+
5
+ - Updated Codex/Claude/Gemini pointer snippets to use the current `status -> summary.md -> context` read order.
6
+ - Added agent-specific actor examples for Codex, Claude, and Gemini snippet output.
7
+ - Added dependency and lockfile changes to the snippet environment-change scope.
8
+ - Updated the packaged Codex skill to prefer `status --write`, `summary.md`, and `checkpoint`.
9
+ - Added `.aienvmp/summary.md` to the shared preflight read order and next-agent hint.
10
+ - Added a Dependency changes section to `summary.md` with read files, intent command, checkpoint command, and package-manager policy.
11
+ - Updated README agent-file guidance and added regression coverage for the AI snippet and summary protocol.
12
+
3
13
  ## 0.1.50
4
14
 
5
15
  - Added `aienvmp summary` for a compact Markdown AI/CI handoff view.
package/README.md CHANGED
@@ -65,11 +65,14 @@ AIENV.md # Markdown env map for AI agents
65
65
  `aienvmp` does not replace AGENTS.md, CLAUDE.md, or GEMINI.md. It gives them a live environment source of truth.
66
66
 
67
67
  ```bash
68
+ npx aienvmp snippet codex
68
69
  npx aienvmp snippet agents
69
70
  npx aienvmp snippet claude
70
71
  npx aienvmp snippet gemini
71
72
  ```
72
73
 
74
+ Snippets point each AI to `status`, `summary.md`, `context --json`, intent, and checkpoint without taking over the instruction file.
75
+
73
76
  ## Commands
74
77
 
75
78
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aienvmp",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "description": "AI-first environment maps and lightweight runtime SBOMs for shared development machines.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -140,7 +140,7 @@ Advanced:
140
140
  aienvmp resolve [--dir .] --actor human:you --id <intent-id> [--status resolved|cancelled]
141
141
  aienvmp record [--dir .] --actor agent:codex --summary "updated .nvmrc" [--target node] [--before 20] [--after 24]
142
142
  aienvmp checkpoint [--dir .] --actor agent:codex --summary "updated dependency" [--target dependency]
143
- aienvmp snippet [agents|claude|gemini] [--write AGENTS.md]
143
+ aienvmp snippet [agents|codex|claude|gemini] [--write AGENTS.md]
144
144
  aienvmp compile [--dir .]
145
145
  aienvmp diff [--dir .]
146
146
  aienvmp doctor [--dir .] [--json] [--ci] [--strict security|policy|coordination|all]
@@ -48,6 +48,9 @@ export function renderSummary(status = {}, manifest = {}) {
48
48
  const riskSignals = toList(sbomRisk.signals).slice(0, 3);
49
49
  const conflictTargets = toList(coordination.conflictTargets);
50
50
  const multiActorTargets = toList(activity.multiActorTargets);
51
+ const dependencyProtocol = status.dependencyChangeProtocol || {};
52
+ const dependencyCommands = dependencyProtocol.commands || {};
53
+ const dependencyFiles = dependencyFilesFor(status.dependencyReadSet);
51
54
 
52
55
  return [
53
56
  "# aienvmp summary",
@@ -76,6 +79,13 @@ export function renderSummary(status = {}, manifest = {}) {
76
79
  `- signals: ${riskSignals.length ? riskSignals.join("; ") : "none"}`,
77
80
  `- verify: ${sbomRisk.next || "Use a dedicated scanner for security decisions."}`,
78
81
  "",
82
+ "## Dependency changes",
83
+ "",
84
+ `- read files: ${dependencyFiles.length ? dependencyFiles.join(", ") : "none detected"}`,
85
+ `- before: ${dependencyCommands.recordIntent || "aienvmp intent --actor agent:id --action planned-change --target dependency"}`,
86
+ `- after: ${dependencyCommands.checkpointAfterChange || "aienvmp checkpoint --actor agent:id --summary dependency-change --target dependency"}`,
87
+ `- package manager policy: ${dependencyProtocol.packageManagerPolicy || "not-detected"}`,
88
+ "",
79
89
  "## Artifacts",
80
90
  "",
81
91
  "- AIENV.md",
@@ -94,3 +104,15 @@ function valueOrZero(value) {
94
104
  function toList(value) {
95
105
  return Array.isArray(value) ? value.filter(Boolean) : [];
96
106
  }
107
+
108
+ function dependencyFilesFor(readSet = []) {
109
+ const files = [];
110
+ for (const item of toList(readSet).slice(0, 3)) {
111
+ if (item.manifest) files.push(item.manifest);
112
+ for (const lockfile of toList(item.lockfiles).slice(0, 3)) {
113
+ const file = typeof lockfile === "string" ? lockfile : lockfile?.file;
114
+ if (file && !files.includes(file)) files.push(file);
115
+ }
116
+ }
117
+ return files.slice(0, 8);
118
+ }
package/src/preflight.js CHANGED
@@ -66,6 +66,7 @@ export function buildPreflight(manifest = {}, warnings = [], intents = [], timel
66
66
  artifacts: preflightArtifacts(),
67
67
  readOrder: [
68
68
  ".aienvmp/status.json",
69
+ ".aienvmp/summary.md",
69
70
  "AIENV.md",
70
71
  ".aienvmp/manifest.json",
71
72
  ".aienvmp/plan.json",
@@ -195,6 +196,7 @@ function nextAgentHint(state, dependencyReadSet = [], dependencyChangeProtocol =
195
196
  return {
196
197
  handoffCommand: dependencyChangeProtocol.commands?.handoff || "aienvmp handoff --record --actor agent:id",
197
198
  readFirst: ".aienvmp/status.json",
199
+ readSummary: ".aienvmp/summary.md",
198
200
  readNext: "aienvmp context --json",
199
201
  reviewState: state,
200
202
  dependencyFiles,
package/src/render.js CHANGED
@@ -114,18 +114,30 @@ function preflightLines(preflight = {}) {
114
114
 
115
115
  export function renderAgentPointer(target = "agents") {
116
116
  const label = target === "claude" ? "Claude" : target === "gemini" ? "Gemini" : "AI agents";
117
+ const actor = target === "claude"
118
+ ? "agent:claude"
119
+ : target === "gemini"
120
+ ? "agent:gemini"
121
+ : target === "codex"
122
+ ? "agent:codex"
123
+ : "agent:id";
117
124
  return `## aienvmp Environment Map
118
125
 
119
126
  ${label} should use \`aienvmp\` as the workspace environment source of truth.
120
127
 
121
- Before changing runtimes, package managers, Docker settings, global packages, or environment policy:
128
+ Fast read order:
122
129
 
123
130
  1. Run \`aienvmp status --write\`.
124
- 2. Run \`aienvmp context --json\` for details.
125
- 3. Read \`AIENV.md\`.
126
- 4. If status or context says \`review-required\`, ask the user before changing the environment.
127
- 5. Record planned environment changes with the recommended target, for example \`aienvmp intent --actor agent:id --action planned-change --target dependency\`.
128
- 6. After environment changes, run \`aienvmp checkpoint --actor agent:id --summary what-changed --target environment\`.
131
+ 2. Read \`.aienvmp/summary.md\` for the short handoff.
132
+ 3. Run \`aienvmp context --json\` for details.
133
+ 4. Read \`AIENV.md\` when Markdown context is easier.
134
+
135
+ Before changing runtimes, package managers, Docker settings, global packages, dependencies, lockfiles, or environment policy:
136
+
137
+ 1. If status or context says \`review-required\`, ask the user before changing the environment.
138
+ 2. Record planned environment changes with the recommended target, for example \`aienvmp intent --actor ${actor} --action planned-change --target dependency\`.
139
+ 3. Prefer project-local version files and local environments.
140
+ 4. After accepted environment changes, run \`aienvmp checkpoint --actor ${actor} --summary what-changed --target environment\`.
129
141
 
130
142
  \`aienvmp\` does not replace this instruction file. It provides the live env map, lightweight runtime SBOM, intent log, timeline, and dashboard.`;
131
143
  }