@pieai/pro-gov 0.7.3 → 0.9.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.
@@ -38,7 +38,7 @@ content under the target project's ownership. Optional Lefthook and CI
38
38
  guardrails are also consumer-owned when installed; `doc-gov doctor` checks that
39
39
  their required governance commands remain present.
40
40
 
41
- For non-trivial engineering work, run `pro-gov learn recall --query "<task
41
+ For non-trivial engineering work, run `pnpm pro-gov learn recall --query "<task
42
42
  summary>"` before changing files so existing `docs/reference/learnings/**` and
43
43
  `CONCEPTS.md` lessons can shape the work. After completed, verified, non-trivial
44
44
  work, let `capture-learning` make a visible soft closeout decision. Capture only
@@ -5,7 +5,6 @@
5
5
  "assets": [
6
6
  "pie-rules/ai-in-the-loop",
7
7
  "pie-rules/rule-evolution-methodology",
8
- "pie-skills/beginner-friendly-docs",
9
- "pie-skills/doc-cross-validator"
8
+ "pie-skills/beginner-friendly-docs"
10
9
  ]
11
10
  }
@@ -25,11 +25,11 @@
25
25
  "notes": "Public rule for choosing evidence lanes and requiring fresh verification before completion.",
26
26
  "promotion": {
27
27
  "privateSourcePath": "rules/pie-rules/ai-in-the-loop.md",
28
- "privateSourceHash": "sha256:045f9dcd0b1425155a89c863d24ba1509dee4e1e572f23f27fb7fe6f201874ec",
28
+ "privateSourceHash": "sha256:71f487152123491a2c110ad839a90780b08e04ae3a133d59bbe977bf8b2f64e4",
29
29
  "publicHash": "sha256:911702baf6ea1d724e41ea1876d23d80f4de8dfaaadbf1399a40c982c810224c",
30
30
  "sanitized": true,
31
- "lastReviewed": "2026-06-25",
32
- "reviewNotes": "Public copy keeps the evidence-loop method while removing private wording and local-only assumptions."
31
+ "lastReviewed": "2026-08-17",
32
+ "reviewNotes": "Reviewed after the private source gained governed front matter and normalized formatting. The public copy intentionally keeps the portable evidence-loop method without the private Grok compatibility lane or project governance metadata."
33
33
  }
34
34
  },
35
35
  {
@@ -87,46 +87,13 @@
87
87
  "notes": "Public skill for writing teaching-oriented documentation with stories, analogies, diagrams, and examples.",
88
88
  "promotion": {
89
89
  "privateSourcePath": "skills/pie-skills/beginner-friendly-docs",
90
- "privateSourceHash": "sha256:0098a81bf811f4044a62cbc4ddae30728c219be19df9006df593a2f7b610912e",
91
- "publicHash": "sha256:0098a81bf811f4044a62cbc4ddae30728c219be19df9006df593a2f7b610912e",
90
+ "privateSourceHash": "sha256:1d33061af9376ca30a046c26e2d15f67d2972ea2364e799472fcd31c62ba7104",
91
+ "publicHash": "sha256:1d33061af9376ca30a046c26e2d15f67d2972ea2364e799472fcd31c62ba7104",
92
92
  "sanitized": false,
93
- "lastReviewed": "2026-06-25",
93
+ "lastReviewed": "2026-07-16",
94
94
  "reviewNotes": "Public copy is byte-for-byte aligned with the private source at review time."
95
95
  },
96
96
  "defaultPlacement": "auto"
97
- },
98
- {
99
- "id": "pie-skills/doc-cross-validator",
100
- "title": "Doc Cross Validator",
101
- "family": "pie-skills",
102
- "kind": "skill",
103
- "visibility": "public",
104
- "sourceKind": "local",
105
- "sourcePath": "skills/pie-skills/doc-cross-validator",
106
- "hosts": [
107
- "codex",
108
- "claude-code",
109
- "gemini-cli",
110
- "antigravity"
111
- ],
112
- "tags": [
113
- "skill",
114
- "pie-skills",
115
- "documentation",
116
- "validation"
117
- ],
118
- "publishable": true,
119
- "origin": "Promoted from maintainer-authored PGS local skills after public review.",
120
- "notes": "Public skill for checking documentation claims against source code, config, data structures, and command output.",
121
- "promotion": {
122
- "privateSourcePath": "skills/pie-skills/doc-cross-validator",
123
- "privateSourceHash": "sha256:8aadfc76f9c660ca42ac1dc2c2b25119f8f8328fcf759adb35f9106969411ab4",
124
- "publicHash": "sha256:46bd797682876c3973ae6abf757bfc90fcbb3c451ace493eb091ea86e2b2ee0e",
125
- "sanitized": true,
126
- "lastReviewed": "2026-06-25",
127
- "reviewNotes": "Public copy keeps the validation workflow while removing private checkout wording."
128
- },
129
- "defaultPlacement": "manual"
130
97
  }
131
98
  ]
132
99
  }
@@ -186,16 +186,14 @@ graph LR
186
186
 
187
187
  ### 第六步:交叉验证
188
188
 
189
- 这一步至关重要,单独列为一个技能(见 `doc-cross-validator` 技能)。
190
-
191
- 写完后必须对照真实系统验证文档内容,确保没有自己想当然地编造流程。
189
+ 这一步至关重要。写完后必须直接对照真实系统的源代码、配置、数据结构和命令输出验证文档内容,确保没有自己想当然地编造流程。
192
190
 
193
191
  ## 红线(这些是 AI 写教学文档时反复栽的坑,记住"为什么"就不会犯)
194
192
 
195
193
  **所有层级**:
196
194
  - 别用"简单来说"开头——它八成是"我没讲清楚"的遮羞布,真清楚的解释不需要这个前缀
197
195
  - 别让一整段纯文字不带任何视觉元素(图/表/引用块)——读者的眼睛需要落脚点,文字墙会劝退人
198
- - 别写完不做交叉验证——读着顺但流程是错的,比"丑但对"更危险(见 `doc-cross-validator`)
196
+ - 别写完不做交叉验证——读着顺但流程是错的,比"丑但对"更危险
199
197
  - 别在没有比喻或例子的情况下抛出复杂概念——抽象概念没有抓手,读者会假装看懂然后悄悄放弃
200
198
 
201
199
  **初级额外**:
@@ -20,14 +20,28 @@
20
20
  - Its selected agents routing file is `PROFILE_ROUTE` under
21
21
  `docs/governance/agents-routing/`.
22
22
 
23
+ ## Policy Discovery
24
+
25
+ All Markdown under `docs/policy/**/*.md`, including subdirectories and any
26
+ symlinked shared-rule files, belongs to the discoverable policy index. This is
27
+ not a command to load every policy at startup. Read the project-local baseline
28
+ and only the shared rules whose task surface actually matches.
29
+
30
+ ## Skill Availability
31
+
32
+ An asset manifest or lock records desired state; it does not prove that an
33
+ optional skill is installed, host-discoverable, loaded, or invoked. Use a skill
34
+ only when its SKILL.md actually exists and can be read. Centrally managed
35
+ project links may need the portfolio control plane to materialize them after a
36
+ fresh clone; their absence must not hide or replace the portable policy rules.
37
+
23
38
  ## Documentation Tasks
24
39
 
25
40
  When the task creates, edits, moves, deletes, or governs documentation, read
26
41
  `docs/governance/boundary.md`, `docs/governance/ssot-v1.1.md`,
27
42
  `docs/governance/doc-agent-rules.md`, `docs/governance/doc-types.md`, the
28
- selected agents routing file, and all Markdown under `docs/policy/**/*.md`.
29
- That policy set includes subdirectories and symlinked shared-rule files; keep
30
- project AI development policy in `docs/policy/`.
43
+ selected agents routing file, and the policy files that govern the changed
44
+ surface. Keep project AI development policy in `docs/policy/`.
31
45
 
32
46
  <!-- PGS-ROUTER:END -->
33
47
 
@@ -6,7 +6,7 @@ status: stable
6
6
  canonical: true
7
7
  owner: human
8
8
  created: 2026-07-13
9
- last_reviewed: 2026-07-16
9
+ last_reviewed: 2026-08-17
10
10
  domain: agents-routing
11
11
  tags:
12
12
  - agents-routing
@@ -30,13 +30,22 @@ This file decides **how to choose a workflow**, not what the project is currentl
30
30
 
31
31
  ```mermaid
32
32
  flowchart TD
33
- A["Task arrives"] --> B["Read project router and current work"]
34
- B --> C["Classify with local lane profile"]
35
- C --> F["Enter local lane"]
36
- F --> H["Use AI-in-the-Loop evidence cycle"]
37
- H --> I["Record evidence in doc-gov"]
33
+ A["Task arrives"] --> B["Read project router and local baseline"]
34
+ B --> C{"Does the task depend on current priorities or in-flight work?"}
35
+ C -->|"yes"| D["Read current work"]
36
+ C -->|"no"| E["Skip current work"]
37
+ D --> F["Classify with local lane profile"]
38
+ E --> F
39
+ F --> G["Enter local lane"]
40
+ G --> H["Use the relevant verification cycle"]
41
+ H --> I["Record durable evidence only when its document role requires it"]
38
42
  ```
39
43
 
44
+ `current-work` is a conditional state surface, not universal startup context.
45
+ Likewise, AI-in-the-Loop applies when implementation or runtime verification
46
+ needs it; a documentation-only or read-only routing task does not load that
47
+ policy by default.
48
+
40
49
  ## Keep It Small
41
50
 
42
51
  Use this router only to pick depth and workflow. Do not use it as a project roadmap.
package/cli-guide.md CHANGED
@@ -21,6 +21,9 @@ pro-gov portfolio plan --config /path/to/portfolio.json --target web-app --json
21
21
  pro-gov portfolio assets-check --config /path/to/portfolio.json --json
22
22
  pro-gov portfolio doctor --config /path/to/portfolio.json --json
23
23
  pro-gov portfolio ai-health --config /path/to/portfolio.json --target all --out audits/portfolio-ai-health/2026-07-12
24
+ pro-gov host-lens inspect --config /path/to/portfolio.json --json
25
+ pro-gov host-lens scan --config /path/to/portfolio.json --out audits/host-lens/2026-07-16
26
+ pro-gov host-lens plan --config /path/to/portfolio.json --out audits/host-lens/cleanup-review.json
24
27
  pro-gov learn recall --query "release downstream sync" --target .
25
28
  pro-gov learn capture --title "Reusable learning" --summary "Reusable lesson..." --target .
26
29
  pro-gov lens inspect --target .
@@ -31,9 +34,12 @@ pro-gov init --profile engineering-runtime --dry-run
31
34
  pro-gov init --profile engineering-runtime --apply
32
35
  pro-gov init --profile doc-only --dry-run
33
36
  pro-gov sync --check [--profile engineering-runtime|doc-only]
34
- pro-gov doctor
37
+ pro-gov package-doctor
35
38
  ```
36
39
 
40
+ `package-doctor` checks the installed package itself; it is not a target-project
41
+ health claim. The older `doctor` command remains a compatibility alias.
42
+
37
43
  `init --apply` is safe for a fresh target: it preflights every destination and
38
44
  refuses the entire operation if any target file already exists. It never merges
39
45
  or overwrites an existing router or project-local policy. Existing projects
@@ -73,6 +79,7 @@ pro-gov portfolio plan --config /path/to/control-repo/.pro-gov/portfolio.json --
73
79
  pro-gov portfolio assets-check --config /path/to/control-repo/.pro-gov/portfolio.json --json
74
80
  pro-gov portfolio doctor --config /path/to/control-repo/.pro-gov/portfolio.json --json
75
81
  pro-gov portfolio ai-health --config /path/to/control-repo/.pro-gov/portfolio.json --target all --out audits/portfolio-ai-health/2026-07-12
82
+ pro-gov host-lens scan --config /path/to/portfolio.json --out .scratch/scheduled/host-lens
76
83
  pro-gov assets plan --bundle base-governance --target . --out .pro-gov/asset-plan.json
77
84
  pro-gov assets plan --bundle project-lens --target /path/to/project --host codex --placement manual --out /tmp/project-lens-plan.json
78
85
  pro-gov assets apply --plan .pro-gov/asset-plan.json
@@ -94,7 +101,7 @@ target.
94
101
  `portfolio ai-health` performs a read-only structural inventory of the control
95
102
  plane, execution engine, registered targets, user/project AI-host configuration,
96
103
  exact technology-version policy, the four verification-gate scripts, bounded
97
- legacy-directory/Playwright-cache evidence, and machine-level specialist checks
104
+ project legacy-directory evidence, and machine-level specialist checks
98
105
  explicitly declared in the private manifest (currently DevSpace). It then writes
99
106
  a fixed local HTML dashboard plus JSON evidence to the explicit `--out`
100
107
  directory. `--target <id>` refreshes one target and merges it into the existing
@@ -102,8 +109,17 @@ same-portfolio board; `--target all` creates complete coverage. Specialist
102
109
  checks retain derived health states only; credentials, URLs, and raw process
103
110
  environments are never written. The inventory records MCP server names and
104
111
  environment filenames, but never reads or emits secret values, environment
105
- values, MCP commands, arguments, or MCP environment maps. Redundancy evidence is
106
- read-only and never deletes caches or legacy directories.
112
+ values, MCP commands, arguments, or MCP environment maps. Project redundancy
113
+ evidence is read-only and never deletes legacy directories.
114
+
115
+ `host-lens` owns host-storage inspection that does not belong in ProjectLens.
116
+ It measures known AI-host roots, package stores, Playwright browsers, explicit
117
+ backup/cache/temp groups, and protected runtime/configuration groups without
118
+ reading file contents. `scan` writes a second fixed SwimmerUIKit dashboard;
119
+ `plan` writes only a review checklist with `executable: false` and
120
+ `approved: false`. Prefer each package manager or host's native maintenance
121
+ tool over generic recursive deletion. See `docs/reference/host-lens.md` in a
122
+ full PGS checkout for the boundary and scheduled-operation contract.
107
123
 
108
124
  Portfolio manifests are external configuration files owned by a user or
109
125
  organization. PGS provides the format and commands; it does not publish a real