@pieai/pro-gov 0.3.10 → 0.3.12

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
@@ -45,6 +45,8 @@ pro-gov assets discover --target .
45
45
  pro-gov assets recommend --target .
46
46
  pro-gov portfolio check --config /path/to/portfolio.json
47
47
  pro-gov portfolio plan --config /path/to/portfolio.json --target web-app --json
48
+ pro-gov portfolio assets-check --config /path/to/portfolio.json --json
49
+ pro-gov portfolio doctor --config /path/to/portfolio.json --json
48
50
  pro-gov lens inspect --target .
49
51
  pro-gov lens report --target . --out .pro-gov/lens-report.md
50
52
  pro-gov init --profile engineering-runtime --dry-run
@@ -63,6 +65,8 @@ What these commands do:
63
65
  | `assets recommend` | Suggests relevant asset bundles with reasons. | No |
64
66
  | `portfolio check` | Validates an external portfolio manifest owned by the user or organization. | No |
65
67
  | `portfolio plan` | Builds dry-run asset plans for manifest targets, using packaged public assets unless a full checkout is supplied. | No |
68
+ | `portfolio assets-check` | Checks the integrity of each target's current managed asset lock and symlinks. | No |
69
+ | `portfolio doctor` | Runs the offline fleet gate: package, target CLI, bundle, asset, symlink, Git-state evidence, and optional host-tooling checks. | No |
66
70
  | `lens inspect` | Produces ProjectLens-style local evidence. | No |
67
71
  | `lens report` | Writes the requested report file. | Only the explicit output |
68
72
  | `init --dry-run` | Shows starter/profile files that would be needed. | No |
@@ -98,7 +102,10 @@ User-scoped skills, such as a personal loop library, are not installed into
98
102
  project targets; link them once under the user's skill roots instead.
99
103
 
100
104
  The plan is the safety gate. `apply` may update managed targets described by the
101
- plan; it must not overwrite an unrelated unmanaged file.
105
+ plan; it must not overwrite an unrelated unmanaged file. When an asset leaves a
106
+ bundle, a plan may remove its old symlink only when the previous lock proves
107
+ ownership and both plan-time and apply-time checks confirm that the path is
108
+ still the same managed symlink.
102
109
 
103
110
  These checkout-only workflows depend on a maintainer-local `agent-assets/`
104
111
  registry when local-only assets are being used. The public repository and npm
@@ -111,7 +118,7 @@ the private-source and public-copy hashes recorded during promotion.
111
118
  - `pro-gov` distributes starter, profile, integration, and adoption assets.
112
119
  - `pro-gov assets discover|recommend` provides read-only project evidence and
113
120
  deterministic recommendations.
114
- - `pro-gov portfolio check|plan` reads an external portfolio manifest. Real
121
+ - `pro-gov portfolio check|plan|assets-check|doctor` reads an external portfolio manifest. Real
115
122
  downstream project lists belong in the user's control repository, not in this
116
123
  public package. The manifest does not require a private headquarters repo:
117
124
  npm users can omit `controlPlane` and `executionEngine`, and PGS will use the
@@ -127,6 +134,8 @@ the private-source and public-copy hashes recorded during promotion.
127
134
  use `--dry-run` and a deliberate migration so local truth is never overwritten.
128
135
  - Superpowers, Compound Engineering, and Ponytail are external tools, not
129
136
  bundled runtime dependencies.
137
+ - Optional `hostTooling` entries let `portfolio doctor` verify required Codex or
138
+ Claude Code plugins. PGS does not install or upgrade those plugins.
130
139
 
131
140
  ## Recommended Companion Tools
132
141
 
@@ -155,6 +164,15 @@ host behavior contract is covered by PGS package tests against recorded
155
164
  per-host Stop/SubagentStop fixtures. Open a fresh AI session after installing or
156
165
  changing hooks; old sessions may not reload host configuration.
157
166
 
167
+ Antigravity hook commands enable `PGS_HOST_HOOK_DEBUG=1` by default in PGS
168
+ starters. The hook writes local diagnostics to `.git/pro-gov-hook-debug/` when
169
+ it is actually invoked, including the input summary, decision, and output JSON.
170
+ This directory lives inside Git's private metadata so it does not dirty the
171
+ worktree. If an Antigravity test does not create a diagnostic file, inspect
172
+ whether the host loaded `.agents/hooks.json` before changing PGS policy.
173
+ `.pro-gov/assets.json` is only an asset-install manifest; its `host` field does
174
+ not control runtime hook dispatch.
175
+
158
176
  Ponytail can be installed as an optional complexity adviser. Keep its global mode
159
177
  `off`; test `lite` in one isolated task before considering a stronger mode.
160
178
  Ponytail must not remove requested scope, tests, safety, accessibility, or proof.
@@ -153,6 +153,10 @@ Managed symlinks are relative by default. A target project's normal
153
153
  public package to know a maintainer's private registry. Maintainers can add
154
154
  `--strict-registry`, or run `pro-gov portfolio assets-check --config
155
155
  /path/to/portfolio.json`, when they need central private-registry validation.
156
+ Use `pro-gov portfolio doctor --config /path/to/portfolio.json` as the final
157
+ offline fleet gate when package versions, target-local routers and hooks,
158
+ declared bundles, locks, managed symlinks, and optional host plugins all need to
159
+ be checked together. The command reports dirty Git state but does not edit it.
156
160
 
157
161
  When a maintainer promotes a private asset into `public-agent-assets/`, the
158
162
  public registry must record the private-source hash and the public-copy hash.
@@ -294,6 +298,12 @@ engineering runtime profile.
294
298
  It proves the project has hook files that call `pro-gov host-hook`; PGS package
295
299
  tests prove the expected Stop/SubagentStop behavior for the supported host
296
300
  schemas. After installing or changing hooks, validate from a fresh AI session.
301
+ For Antigravity, a real invocation writes diagnostics under
302
+ `.git/pro-gov-hook-debug/` because the starter hook command sets
303
+ `PGS_HOST_HOOK_DEBUG=1`. Absence of a diagnostic file after a fresh
304
+ Antigravity session usually means the host did not load or run
305
+ `.agents/hooks.json`. The `.pro-gov/assets.json` `host` field records asset
306
+ placement only; it does not control runtime hook dispatch.
297
307
 
298
308
  Engineering projects should also run their local verification ladder.
299
309
 
@@ -125,4 +125,7 @@ install PGS packages
125
125
 
126
126
  PGS does not automatically install, enable, update, or remove these external
127
127
  plugins in another person's AI host. It documents the recommended boundary and
128
- lets each project or user adopt tools deliberately.
128
+ lets each project or user adopt tools deliberately. A user-owned portfolio may
129
+ declare required Codex or Claude Code plugin ids in `hostTooling`; `portfolio
130
+ doctor` then verifies installed/enabled state and reports observed versions.
131
+ The host's native plugin manager remains the installation and update authority.
@@ -5,7 +5,7 @@
5
5
  "hooks": [
6
6
  {
7
7
  "type": "command",
8
- "command": "cd \"$(git rev-parse --show-toplevel)\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host antigravity --event Stop; elif [ -f packages/pro-gov/src/cli.ts ] && command -v pnpm >/dev/null 2>&1; then pnpm --silent --filter @pieai/pro-gov dev host-hook --host antigravity --event Stop; else npx --no-install @pieai/pro-gov host-hook --host antigravity --event Stop; fi",
8
+ "command": "cd \"$(git rev-parse --show-toplevel)\" && if [ -x ./node_modules/.bin/pro-gov ]; then PGS_HOST_HOOK_DEBUG=1 ./node_modules/.bin/pro-gov host-hook --host antigravity --event Stop; elif [ -f packages/pro-gov/src/cli.ts ] && command -v pnpm >/dev/null 2>&1; then PGS_HOST_HOOK_DEBUG=1 pnpm --silent --filter @pieai/pro-gov dev host-hook --host antigravity --event Stop; else PGS_HOST_HOOK_DEBUG=1 npx --no-install @pieai/pro-gov host-hook --host antigravity --event Stop; fi",
9
9
  "timeout": 30
10
10
  }
11
11
  ]
@@ -16,7 +16,7 @@
16
16
  "hooks": [
17
17
  {
18
18
  "type": "command",
19
- "command": "cd \"$(git rev-parse --show-toplevel)\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host antigravity --event SubagentStop; elif [ -f packages/pro-gov/src/cli.ts ] && command -v pnpm >/dev/null 2>&1; then pnpm --silent --filter @pieai/pro-gov dev host-hook --host antigravity --event SubagentStop; else npx --no-install @pieai/pro-gov host-hook --host antigravity --event SubagentStop; fi",
19
+ "command": "cd \"$(git rev-parse --show-toplevel)\" && if [ -x ./node_modules/.bin/pro-gov ]; then PGS_HOST_HOOK_DEBUG=1 ./node_modules/.bin/pro-gov host-hook --host antigravity --event SubagentStop; elif [ -f packages/pro-gov/src/cli.ts ] && command -v pnpm >/dev/null 2>&1; then PGS_HOST_HOOK_DEBUG=1 pnpm --silent --filter @pieai/pro-gov dev host-hook --host antigravity --event SubagentStop; else PGS_HOST_HOOK_DEBUG=1 npx --no-install @pieai/pro-gov host-hook --host antigravity --event SubagentStop; fi",
20
20
  "timeout": 30
21
21
  }
22
22
  ]
package/cli-guide.md CHANGED
@@ -18,6 +18,8 @@ pro-gov assets discover --target .
18
18
  pro-gov assets recommend --target .
19
19
  pro-gov portfolio check --config /path/to/portfolio.json
20
20
  pro-gov portfolio plan --config /path/to/portfolio.json --target web-app --json
21
+ pro-gov portfolio assets-check --config /path/to/portfolio.json --json
22
+ pro-gov portfolio doctor --config /path/to/portfolio.json --json
21
23
  pro-gov lens inspect --target .
22
24
  pro-gov lens report --target . --out .pro-gov/lens-report.md
23
25
  pro-gov lens audit init --target /path/to/project --out audits/project/2026-07-01
@@ -46,6 +48,8 @@ Full upstream-checkout commands:
46
48
  pro-gov assets list --json
47
49
  pro-gov portfolio check --config /path/to/control-repo/.pro-gov/portfolio.json --json
48
50
  pro-gov portfolio plan --config /path/to/control-repo/.pro-gov/portfolio.json --target web-app --json
51
+ pro-gov portfolio assets-check --config /path/to/control-repo/.pro-gov/portfolio.json --json
52
+ pro-gov portfolio doctor --config /path/to/control-repo/.pro-gov/portfolio.json --json
49
53
  pro-gov assets plan --bundle base-governance --target . --out .pro-gov/asset-plan.json
50
54
  pro-gov assets plan --bundle project-lens --target /path/to/project --host codex --placement manual --out /tmp/project-lens-plan.json
51
55
  pro-gov assets apply --plan .pro-gov/asset-plan.json
@@ -72,6 +76,27 @@ public assets packaged with `@pieai/pro-gov`. Add `executionEngine.path` only
72
76
  when a full local checkout should provide a private asset registry for strict
73
77
  maintainer checks.
74
78
 
79
+ `portfolio assets-check` verifies that the currently recorded lock and managed
80
+ links are healthy. `portfolio doctor` additionally compares each target with the
81
+ current portfolio `assetBundles`, registry hashes, package versions, target-local
82
+ router/hook checks, and optional `hostTooling` requirements. The doctor is
83
+ offline and read-only by default. A dirty product worktree is reported as
84
+ evidence but is not itself a governance failure.
85
+
86
+ Third-party update discovery is deliberately separate and low frequency:
87
+
88
+ ```bash
89
+ pro-gov assets npx update --plan
90
+ codex plugin marketplace upgrade
91
+ codex plugin list --json
92
+ claude plugin update <plugin>
93
+ claude plugin list --json
94
+ ```
95
+
96
+ The native tools own fetching and installation. PGS reviews resulting asset
97
+ changes, regenerates plans, and verifies the fleet; it does not implement a
98
+ second plugin marketplace or silently accept upstream changes.
99
+
75
100
  `lens audit init` creates a raw-first audit package for Project Lens plus
76
101
  Ponytail reviews. For a "read-only project audit", the target repository remains
77
102
  read-only, but the audit package is still the required output record. `lens