@pieai/pro-gov 0.3.3

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.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/assets/docs/reference/adoption/adoption-playbook.md +215 -0
  4. package/assets/docs/reference/adoption/downstream-project-registry.md +78 -0
  5. package/assets/docs/reference/adoption/migration-v0.9.md +74 -0
  6. package/assets/docs/reference/adoption/project-relationship.md +128 -0
  7. package/assets/docs/reference/adoption/public-release-checklist.md +123 -0
  8. package/assets/docs/reference/adoption/site-publication-brief.md +86 -0
  9. package/assets/integrations/directed-development.md +36 -0
  10. package/assets/integrations/superpowers.md +52 -0
  11. package/assets/profiles/doc-only/manifest.yml +21 -0
  12. package/assets/profiles/doc-only/profile.md +37 -0
  13. package/assets/profiles/engineering-runtime/manifest.yml +22 -0
  14. package/assets/profiles/engineering-runtime/profile.md +39 -0
  15. package/assets/starter/.github/workflows/docs-check.yml +59 -0
  16. package/assets/starter/AGENTS.template.md +48 -0
  17. package/assets/starter/CLAUDE.template.md +6 -0
  18. package/assets/starter/docs/archive/.gitkeep +1 -0
  19. package/assets/starter/docs/canon/.gitkeep +1 -0
  20. package/assets/starter/docs/decisions/.gitkeep +1 -0
  21. package/assets/starter/docs/governance/agents-routing/doc-only-v0.9.md +83 -0
  22. package/assets/starter/docs/governance/agents-routing/engineering-runtime-v0.9.md +78 -0
  23. package/assets/starter/docs/governance/boundary.md +76 -0
  24. package/assets/starter/docs/governance/doc-agent-rules.md +71 -0
  25. package/assets/starter/docs/governance/doc-types.md +50 -0
  26. package/assets/starter/docs/governance/ssot-v0.9.md +166 -0
  27. package/assets/starter/docs/governance/templates/adr.md +24 -0
  28. package/assets/starter/docs/governance/templates/archive.md +23 -0
  29. package/assets/starter/docs/governance/templates/canon-entry.md +24 -0
  30. package/assets/starter/docs/governance/templates/plan.md +33 -0
  31. package/assets/starter/docs/governance/templates/policy.md +24 -0
  32. package/assets/starter/docs/governance/templates/reference.md +24 -0
  33. package/assets/starter/docs/governance/templates/spec.md +24 -0
  34. package/assets/starter/docs/plans/active/.gitkeep +1 -0
  35. package/assets/starter/docs/plans/completed/.gitkeep +1 -0
  36. package/assets/starter/docs/policy/best-practice-for-this-project.md +35 -0
  37. package/assets/starter/docs/reference/documentation-map.md +51 -0
  38. package/assets/starter/docs/reference/execution/current-work.md +36 -0
  39. package/assets/starter/docs/specs/active/.gitkeep +1 -0
  40. package/assets/starter/docs/specs/completed/.gitkeep +1 -0
  41. package/assets/starter/lefthook.template.yml +18 -0
  42. package/cli-guide.md +36 -0
  43. package/dist/cli.js +244 -0
  44. package/package.json +56 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PieAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @pieai/pro-gov
2
+
3
+ Project-level distribution kit for Project Governance System.
4
+
5
+ `@pieai/doc-gov` remains the validator package. `@pieai/pro-gov` ships reusable
6
+ project-governance assets and a conservative project-level CLI. It is the
7
+ package that answers: "What starter/profile material does this project need,
8
+ and what would change if we adopted it?"
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pnpm add -D @pieai/pro-gov @pieai/doc-gov
14
+ ```
15
+
16
+ Add scripts in the target project:
17
+
18
+ ```json
19
+ {
20
+ "scripts": {
21
+ "pro-gov": "pro-gov",
22
+ "doc-gov": "doc-gov"
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## Commands
28
+
29
+ ```bash
30
+ pro-gov assets list
31
+ pro-gov init --profile engineering-runtime --dry-run
32
+ pro-gov init --profile doc-only --dry-run
33
+ pro-gov sync --check
34
+ pro-gov doctor
35
+ ```
36
+
37
+ The first release is read-only by default. It reports what would change before
38
+ any future write path is added.
39
+
40
+ ## Package Boundary
41
+
42
+ - `pro-gov` lists and compares starter/profile/integration assets.
43
+ - `doc-gov` validates governed Markdown, router integrity, manifest freshness,
44
+ links, local hooks, and CI wiring.
45
+ - Project-local product truth stays in the target project.
46
+ - Write-mode install or upgrade behavior is intentionally not enabled in the
47
+ first release.
@@ -0,0 +1,215 @@
1
+ ---
2
+ id: REF-ADOPTION-PLAYBOOK
3
+ title: Project Governance System Adoption Playbook
4
+ type: reference
5
+ status: stable
6
+ canonical: true
7
+ owner: human
8
+ created: 2026-05-06
9
+ last_reviewed: 2026-06-13
10
+ domain: adoption
11
+ tags:
12
+ - adoption
13
+ - migration
14
+ - profiles
15
+ pinned: false
16
+ related:
17
+ - POLICY-SYNC-STRATEGY
18
+ - REF-PROJECT-RELATIONSHIP
19
+ ---
20
+
21
+ # Adoption Playbook
22
+
23
+ Use this when a project wants to migrate into the Project Governance System.
24
+
25
+ ## The Short Version
26
+
27
+ 1. Pick one profile.
28
+ 2. Inventory the project's current docs/rules.
29
+ 3. Install the governance packages.
30
+ 4. Add starter `docs/governance/` and `docs/policy/` files.
31
+ 5. Add the selected `docs/governance/agents-routing/` profile rule.
32
+ 6. Move current truth into the governed layers.
33
+ 7. Archive or delete old systems.
34
+ 8. Run validation.
35
+
36
+ Do not migrate by slowly adding random files. Migrate by making one clear current work surface.
37
+
38
+ ## Step 1: Pick A Profile
39
+
40
+ | Project kind | Profile |
41
+ | --- | --- |
42
+ | App / game / runtime / service / browser product | `engineering-runtime` |
43
+ | IP / writing / research / AI media / asset library | `doc-only` |
44
+
45
+ If unsure, pick `doc-only` first. Add engineering agents routing only when the project has real runtime/code behavior that needs lane-specific proof.
46
+
47
+ ## Step 2: Inventory Current Truth
48
+
49
+ Before moving anything, list:
50
+
51
+ - current project router files (`AGENTS.md`, `CLAUDE.md`, etc.)
52
+ - current docs index files
53
+ - current active plans/specs
54
+ - current canon/reference/archive locations
55
+ - old/legacy documentation roots
56
+ - project-local runtime truth, if any
57
+
58
+ ## Step 3: Install The Governance Core
59
+
60
+ Current package-based method:
61
+
62
+ - install `@pieai/pro-gov` as the target project's project-level asset source
63
+ - install `@pieai/doc-gov` as the target project's validator CLI source
64
+ - preserve project-local package scripts
65
+ - run `pro-gov init --profile <engineering-runtime|doc-only> --dry-run` to see
66
+ the starter files that would be installed
67
+ - run `pro-gov sync --check` to compare reusable starter files without changing
68
+ the project
69
+ - run `doc-gov migrate --profile <engineering-runtime|doc-only> --check` before
70
+ changing files so profile mismatches fail early
71
+ - run `doc-gov router-check` after the sync so stale router/profile paths fail
72
+ mechanically
73
+ - copy `starter/lefthook.template.yml` to `lefthook.yml` and
74
+ `starter/.github/workflows/docs-check.yml` to `.github/workflows/docs-check.yml`
75
+ when the target project is ready for standard guardrails
76
+ - run `doc-gov doctor` after wiring guardrails to verify they are actually
77
+ connected
78
+ - treat the npm package as the CLI source and the local `docs/governance/`
79
+ files as the project's checked-in governance contract
80
+
81
+ Later Stage 2 method:
82
+
83
+ ```bash
84
+ pnpm add -D @pieai/pro-gov @pieai/doc-gov
85
+ ```
86
+
87
+ Do not jump to write-mode installation until package installation is
88
+ deliberately enabled and the read-only checks are understood.
89
+ Do not use an absolute-path script as the default for collaborators; it is fine
90
+ for one local machine, but it is brittle once a repo moves or another person
91
+ checks it out.
92
+
93
+ Keep the upstream checkout path out of reusable project wiring. The central
94
+ repository and local checkout currently use `ProjectGovernanceSystem`, while
95
+ the private workspace package name is `pro-gov`. Target projects should use
96
+ `@pieai/pro-gov` and `@pieai/doc-gov` for commands, use the canonical GitHub URL
97
+ for public links, and refer to the source as the Project Governance System
98
+ upstream repository.
99
+
100
+ ## Step 4: Add Starter Structure
101
+
102
+ Use `starter/` as the reference, but keep local facts local.
103
+
104
+ Required concepts:
105
+
106
+ - `docs/reference/documentation-map.md`
107
+ - `docs/governance/boundary.md`
108
+ - `docs/governance/ssot-v0.9.md`
109
+ - `docs/governance/doc-agent-rules.md`
110
+ - `docs/governance/doc-types.md`
111
+ - `docs/governance/agents-routing/<selected-profile>-v0.9.md`
112
+ - `docs/governance/templates/*.md`
113
+ - `docs/policy/best-practice-for-this-project.md`
114
+ - `docs/reference/execution/current-work.md`
115
+ - `docs/plans/active/`
116
+ - `docs/plans/completed/`
117
+ - `docs/specs/active/`
118
+ - `docs/specs/completed/`
119
+ - `docs/archive/`
120
+ - `AGENTS.md` as the project router
121
+ - `CLAUDE.md` as a thin adapter that forwards to `AGENTS.md`
122
+
123
+ ## Step 5: Apply The Profile
124
+
125
+ ### Engineering Runtime
126
+
127
+ Add:
128
+
129
+ - `docs/governance/agents-routing/engineering-runtime-v0.9.md`
130
+ - engineering lane summary in `AGENTS.md`
131
+ - detailed lane profile in `docs/policy/best-practice-for-this-project.md`
132
+
133
+ The project must define local lanes and proof commands.
134
+ Do not copy the upstream root `integrations/` directory into target projects by default.
135
+ If a project needs local external-workflow guidance, keep it thin in `AGENTS.md` or put project-specific notes under `docs/reference/integrations/`.
136
+
137
+ ### Doc-Only
138
+
139
+ Add:
140
+
141
+ - `docs/governance/agents-routing/doc-only-v0.9.md`
142
+ - `docs/governance/ssot-v0.9.md`
143
+ - AI-in-the-Loop rules linked from the project's external shared-rule source
144
+ - canon/provenance/archive rules in `docs/policy/best-practice-for-this-project.md`
145
+
146
+ Do not add Superpowers TDD or Directed Development by default.
147
+
148
+ ## Step 6: Create Current Work
149
+
150
+ Create or update:
151
+
152
+ ```text
153
+ docs/reference/execution/current-work.md
154
+ ```
155
+
156
+ This file answers:
157
+
158
+ - What is active now?
159
+ - Which plan/spec is current?
160
+ - Where are completed proof records?
161
+ - What should a new AI session read next?
162
+
163
+ This is not the agents-routing algorithm.
164
+
165
+ ## Step 7: Retire Old Systems
166
+
167
+ Old documentation systems must become one of:
168
+
169
+ - migrated into the governed layers
170
+ - archived under `docs/archive/`
171
+ - deleted if stale and misleading
172
+
173
+ Do not keep old and new current surfaces alive together.
174
+
175
+ Do not migrate product artifacts into `docs/**` just because they are Markdown.
176
+ Prompts, generated media notes, project-package canon, source assets, and
177
+ workbench files stay in their product package unless the project explicitly opts
178
+ them into doc-gov.
179
+
180
+ For the v0.9 structural migration, use
181
+ `docs/reference/adoption/migration-v0.9.md` as the checklist.
182
+
183
+ ## Step 8: Validate
184
+
185
+ Minimum:
186
+
187
+ ```bash
188
+ pnpm doc-gov check
189
+ pnpm doc-gov router-check
190
+ pnpm doc-gov scan --check
191
+ pnpm doc-gov links
192
+ pnpm doc-gov audit
193
+ pnpm doc-gov doctor
194
+ git diff --check
195
+ ```
196
+
197
+ Engineering projects should also run their local verification ladder.
198
+
199
+ ## Example: Migrating A Runtime Product
200
+
201
+ If the target project is an app/runtime project:
202
+
203
+ 1. Pick `engineering-runtime`.
204
+ 2. Inventory existing docs and current runtime truth.
205
+ 3. Install `@pieai/pro-gov` and `@pieai/doc-gov`, or keep the existing local
206
+ tool copy until the project is ready to move scripts and CI together.
207
+ 4. Add governed `docs/governance/` and `docs/policy/` starter files.
208
+ 5. Write `docs/policy/best-practice-for-this-project.md` with project-specific truth, stack, lanes, and verification commands.
209
+ 6. Create `docs/reference/execution/current-work.md`.
210
+ 7. Move current plans into `docs/plans/active/`; move finished plans into `docs/plans/completed/`.
211
+ 8. Move stable product truth into `docs/canon/`; guides into `docs/reference/`; historical material into `docs/archive/`.
212
+ 9. Delete or archive old parallel doc roots.
213
+ 10. Run validation and commit the migration as a clean checkpoint.
214
+
215
+ If the project is mostly a docs/content workspace, start with `doc-only` instead and do not install engineering routing until real runtime work requires it.
@@ -0,0 +1,78 @@
1
+ ---
2
+ id: REF-DOWNSTREAM-PROJECT-REGISTRY
3
+ title: Downstream Project Registry
4
+ type: reference
5
+ status: active
6
+ canonical: true
7
+ owner: human
8
+ created: 2026-06-09
9
+ last_reviewed: 2026-06-13
10
+ domain: adoption
11
+ tags:
12
+ - downstream
13
+ - adoption
14
+ - registry
15
+ pinned: false
16
+ related:
17
+ - REF-PROJECT-RELATIONSHIP
18
+ - POLICY-SYNC-STRATEGY
19
+ ---
20
+
21
+ # Downstream Project Registry
22
+
23
+ This registry is the central Project Governance System ledger for known local
24
+ projects that have adopted this system.
25
+
26
+ It records governance adoption state, not product truth. Product plans, runtime
27
+ details, IP canon, audit outputs, and project-specific policies remain in the
28
+ downstream projects.
29
+
30
+ ## Registry Rules
31
+
32
+ - Update this file when a project adopts, leaves, renames, or changes profile.
33
+ - Treat package versions as the versions installed in the downstream project's
34
+ `package.json`. Existing rows may list only `doc-gov` until that project is
35
+ intentionally synced to `pro-gov`.
36
+ - Treat health as a snapshot. A project can be on the latest version but still
37
+ have local working-tree cleanup in progress.
38
+ - Do not add a project-specific profile here unless at least two projects need
39
+ the same reusable profile.
40
+ - Do not use this registry to freeze the upstream local checkout path. The
41
+ current local upstream folder may be `ProjectGovernanceSystem`, but downstream
42
+ governed docs should prefer `@pieai/doc-gov`, `@pieai/pro-gov`, and "Project
43
+ Governance System upstream repository" wording over machine-local paths.
44
+
45
+ ## Current Downstream Projects
46
+
47
+ Checked on 2026-06-09.
48
+
49
+ | Project | Local path | Profile | Installed doc-gov | Health snapshot | Notes |
50
+ | --- | --- | --- | --- | --- | --- |
51
+ | Non-Heroes | `/Users/yuanfei/PieAI/Non-Heroes` | `engineering-runtime` | `0.3.2` | Partial | Package and router are current; local doc migration work is in progress, so `doctor` currently fails on moved/archive reference docs until that project is cleaned up. |
52
+ | Show | `/Users/yuanfei/PieAI/Show` | `engineering-runtime` | `0.3.2` | Healthy | `router-check` and `doctor` pass. |
53
+ | PieFlow | `/Users/yuanfei/PieAI/PieFlow` | `engineering-runtime` | `0.3.2` | Healthy | `router-check` and `doctor` pass. |
54
+ | story-creator | `/Users/yuanfei/PieAI/_NovelFrameworks/story-creator` | `engineering-runtime` | `0.3.2` | Healthy | Uses engineering routing because the repository contains a TypeScript CLI, tests, hooks, gates, and writing-system runtime. |
55
+ | PieAIStudio-Site | `/Users/yuanfei/PieAI/PieAIStudio-Site` | `engineering-runtime` | `0.3.2` | Healthy | `router-check` and `doctor` pass. |
56
+ | PieHQ | `/Users/yuanfei/PieAI/PieHQ` | `doc-only` | `0.3.2` | Healthy | `router-check` and `doctor` pass; unrelated FounderLogs work is present locally. |
57
+ | PieIP | `/Users/yuanfei/PieAI/PieIP` | `doc-only` | `0.3.2` | Healthy | `router-check` and `doctor` pass. |
58
+ | ProjectLens | `/Users/yuanfei/PieAI/ProjectLens` | `doc-only` | `0.3.2` | Healthy | `router-check` and `doctor` pass; ProjectLens is a project-level audit workspace, not a runtime product. |
59
+
60
+ ## Representative Examples
61
+
62
+ The `examples/` directory is not the full registry. It contains representative
63
+ case studies:
64
+
65
+ - `examples/non-heroes/example.md` for an engineering-runtime product.
66
+ - `examples/pieflow/example.md` for a complex app/runtime product.
67
+ - `examples/pieip/example.md` for a doc-only AI media / asset-governance
68
+ project.
69
+
70
+ Add a new example only when a project teaches a reusable adoption pattern that
71
+ the existing examples do not cover.
72
+
73
+ ## Removal / Rename Notes
74
+
75
+ - `Supa` is no longer tracked here because that project was renamed/replaced by
76
+ `Non-Heroes`.
77
+ - GitNexus is intentionally absent. It has been removed from the central system
78
+ and should not be reintroduced through downstream policy links.
@@ -0,0 +1,74 @@
1
+ ---
2
+ id: REF-MIGRATION-V0-9
3
+ title: Project Governance System v0.9 Migration Checklist
4
+ type: reference
5
+ status: stable
6
+ canonical: true
7
+ owner: human
8
+ created: 2026-05-09
9
+ last_reviewed: 2026-06-04
10
+ domain: adoption
11
+ tags:
12
+ - migration
13
+ - v0.9
14
+ - router-check
15
+ pinned: false
16
+ related:
17
+ - REF-ADOPTION-PLAYBOOK
18
+ - POLICY-VERSIONING
19
+ ---
20
+
21
+ # v0.9 Migration Checklist
22
+
23
+ Use this checklist when moving a project from the older root `governance/` or
24
+ `routing/` shape to the current Project Governance System boundary.
25
+
26
+ ## Required Moves
27
+
28
+ Move documentation governance into `docs/governance/`:
29
+
30
+ - `governance/agent-rules.md` -> `docs/governance/doc-agent-rules.md`
31
+ - `governance/doc-types.md` -> `docs/governance/doc-types.md`
32
+ - `governance/README.md` -> `docs/governance/boundary.md`
33
+ - `governance/MANIFEST.yml` -> `docs/governance/MANIFEST.yml`
34
+ - `governance/templates/` -> `docs/governance/templates/`
35
+
36
+ Move project AI/development policy into `docs/policy/`:
37
+
38
+ - `governance/best-practice-for-this-project.md` -> `docs/policy/best-practice-for-this-project.md`
39
+ - `governance/refactor-rules.md` -> `docs/policy/refactor-rules.md`
40
+ - eligible `governance/shared-rules/` entries -> `docs/policy/shared-rules/`,
41
+ preferably as links to their external SSOT sources. Skip `ssot.md` and
42
+ `task-routing.md`; those move into `docs/governance/` as listed below.
43
+
44
+ Move reusable governance rules into the new core:
45
+
46
+ - old SSOT rule -> `docs/governance/ssot-v0.9.md`
47
+ - old task routing rule -> selected file under `docs/governance/agents-routing/`
48
+
49
+ ## Required Deletions
50
+
51
+ After the move, these should not exist:
52
+
53
+ - root `governance/`
54
+ - root `routing/`
55
+ - `starter/governance/`
56
+ - `docs/policy/shared-rules/ssot.md`
57
+ - `docs/policy/shared-rules/task-routing.md`
58
+ - non-root `README.md` under governed docs
59
+
60
+ ## Required Checks
61
+
62
+ ```bash
63
+ pnpm doc-gov check
64
+ pnpm doc-gov router-check
65
+ pnpm doc-gov scan --check
66
+ pnpm doc-gov links
67
+ pnpm doc-gov audit
68
+ pnpm doc-gov doctor
69
+ git diff --check
70
+ ```
71
+
72
+ For engineering projects, also run the project's normal typecheck/test/build
73
+ ladder. For doc-only projects, run the project's content/workbench validation
74
+ commands.
@@ -0,0 +1,128 @@
1
+ ---
2
+ id: REF-PROJECT-RELATIONSHIP
3
+ title: Project Governance System Project Relationship Model
4
+ type: reference
5
+ status: stable
6
+ canonical: true
7
+ owner: human
8
+ created: 2026-05-06
9
+ last_reviewed: 2026-06-13
10
+ domain: adoption
11
+ tags:
12
+ - ownership
13
+ - upstream
14
+ - project-local
15
+ pinned: false
16
+ related:
17
+ - POLICY-UPSTREAMING
18
+ - POLICY-SYNC-STRATEGY
19
+ ---
20
+
21
+ # Project Relationship Model
22
+
23
+ This file answers the most important beginner question:
24
+
25
+ > If Non-Heroes already has doc-gov, and this central repo now exists, who owns what?
26
+
27
+ ## Short Answer
28
+
29
+ The central repo owns the **engine**. Each project owns its **local product content**.
30
+
31
+ | Thing | Owner |
32
+ | --- | --- |
33
+ | Status lifecycle, document types, SSOT, agents routing, CLI checks, templates | Project Governance System upstream repository |
34
+ | Non-Heroes product plans, runtime canon, product rules | Non-Heroes |
35
+ | PieFlow product truth, connector rules, browser lanes | PieFlow |
36
+ | PieIP character/script/asset governance | PieIP |
37
+ | Current downstream adoption list and health snapshot | `docs/reference/adoption/downstream-project-registry.md` |
38
+
39
+ ## Naming And Checkout Paths
40
+
41
+ Keep these identities separate:
42
+
43
+ - **System name:** Project Governance System.
44
+ - **Local upstream checkout:** currently `ProjectGovernanceSystem`.
45
+ - **GitHub repository slug:** `ProjectGovernanceSystem`.
46
+ - **Private workspace package name:** `pro-gov`.
47
+ - **Published validator package:** `@pieai/doc-gov`.
48
+ - **Project-level distribution package:** `@pieai/pro-gov`.
49
+
50
+ A local folder rename should not force downstream projects to rewrite package
51
+ names or CLI commands. If the GitHub repository slug changes, downstream public
52
+ links and repository remotes should use the canonical repository URL. Downstream
53
+ projects should point to the package and the upstream repository concept, not to
54
+ a hard-coded local checkout path. If a local automation or handoff prompt truly
55
+ needs a clone path, write it as `<local ProjectGovernanceSystem checkout path>`
56
+ and keep it out of reusable router text.
57
+
58
+ ## Does Non-Heroes Now Import This Repo?
59
+
60
+ Not yet automatically.
61
+
62
+ Known downstream projects are listed in
63
+ `docs/reference/adoption/downstream-project-registry.md`.
64
+
65
+ Originally Non-Heroes, PieFlow, and PieIP had local working copies because the
66
+ system was born inside active projects. This central repo is now the upstream
67
+ source, and downstream projects should use `@pieai/doc-gov`, `@pieai/pro-gov`,
68
+ and their selected profile instead of keeping private CLI or starter copies.
69
+
70
+ ## Why Not Auto-Symlink Everything?
71
+
72
+ Because project governance has two kinds of files:
73
+
74
+ 1. **Shared/core files** that can be linked or packaged.
75
+ 2. **Project-local files** that must stay local.
76
+
77
+ The old `governance/` folder mixed both kinds. The clearer split is:
78
+
79
+ - `docs/governance/` contains doc-system rules, SSOT, agents-routing, document types, templates, and manifest.
80
+ - `docs/policy/` contains project-local AI development policy, lane wording, proof commands, and truth hierarchy.
81
+
82
+ Symlinking or copying the whole policy layer would be wrong because Non-Heroes and PieFlow need different local lane profiles. The safe rule:
83
+
84
+ - shared rules may be symlinked
85
+ - doc-gov core should become the installed validator package
86
+ - pro-gov should become the installed project-level asset package
87
+ - project profiles are templates
88
+ - project-local best-practice files remain in each project's `docs/policy/`
89
+ - product artifacts outside `docs/**` stay in the product package unless a project explicitly opts them into doc-gov
90
+
91
+ ## How Non-Heroes Improvements Flow Upstream
92
+
93
+ When Non-Heroes discovers a better governance rule:
94
+
95
+ 1. Ask: is this core, profile, or Non-Heroes-local?
96
+ 2. If core, update this repo.
97
+ 3. If profile, update the relevant `profiles/**`.
98
+ 4. If Non-Heroes-local, keep it in Non-Heroes.
99
+ 5. Other projects then upgrade from this central source.
100
+
101
+ Example:
102
+
103
+ - An active project discovered active plans were piling up.
104
+ - The generic fix is a `completed` lifecycle state.
105
+ - Therefore `completed` belongs in this repo's doc-gov core.
106
+
107
+ ## How PieFlow And PieIP Upgrade
108
+
109
+ Use an explicit migration task:
110
+
111
+ 1. Pick the profile:
112
+ - engineering-runtime projects: apps, services, runtimes, websites, games,
113
+ CLIs, and behavior-critical systems
114
+ - doc-only projects: IP, research, audit, media, and asset-governance
115
+ workspaces without behavior-critical runtime work
116
+ 2. Confirm the project uses `@pieai/doc-gov` as its validator source.
117
+ 3. Confirm the project can inspect `@pieai/pro-gov` assets with
118
+ `pro-gov assets list`.
119
+ 4. Compare local `docs/governance/` and `docs/policy/` starter docs against
120
+ packaged starter assets.
121
+ 5. Compare selected local agents-routing against `docs/governance/agents-routing/`.
122
+ 6. Compare local shared AI work rules against their external SSOT targets, such
123
+ as symlinked files under `docs/policy/shared-rules/`.
124
+ 7. Keep project-local docs and product artifacts local.
125
+ 8. Run project validation.
126
+
127
+ This is AI-assisted comparison now. Later, write-mode installation can become a
128
+ `pro-gov` command after the read-only checks prove safe.
@@ -0,0 +1,123 @@
1
+ ---
2
+ id: REF-PUBLIC-RELEASE-CHECKLIST
3
+ title: Public Release Checklist
4
+ type: reference
5
+ status: stable
6
+ canonical: true
7
+ owner: human
8
+ created: 2026-06-04
9
+ last_reviewed: 2026-06-13
10
+ domain: adoption
11
+ tags:
12
+ - release
13
+ - npm
14
+ - github
15
+ pinned: false
16
+ related:
17
+ - POLICY-SYNC-STRATEGY
18
+ - POLICY-VERSIONING
19
+ ---
20
+
21
+ # Public Release Checklist
22
+
23
+ Use this before making the repository public or publishing `@pieai/doc-gov` or
24
+ `@pieai/pro-gov`.
25
+
26
+ ## Mental Model
27
+
28
+ Making the GitHub repository public is like opening the workshop doors. People
29
+ can inspect the benches, the notes, and the commit history.
30
+
31
+ Publishing to npm is like putting a tool on a public shelf. People can install
32
+ it without cloning the workshop.
33
+
34
+ Both need checks, but they are not the same release.
35
+
36
+ ## Repository Public Checklist
37
+
38
+ Before changing GitHub visibility:
39
+
40
+ - current working tree is clean
41
+ - current branch is pushed
42
+ - current files have no secrets
43
+ - Git history has no real secrets
44
+ - current files have no machine-local startup paths
45
+ - root README explains the project to outsiders
46
+ - license and security contact exist
47
+ - CI is present and runs the standard doc-gov gate
48
+
49
+ Recommended commands:
50
+
51
+ ```bash
52
+ git status --short --branch
53
+ pnpm typecheck
54
+ pnpm test
55
+ pnpm build
56
+ pnpm doc-gov doctor
57
+ git diff --check
58
+ ```
59
+
60
+ ## npm Publish Checklist
61
+
62
+ Before publishing:
63
+
64
+ - `packages/doc-gov/package.json` has public package metadata
65
+ - `packages/pro-gov/package.json` has public package metadata
66
+ - each package has a README
67
+ - each package has a license
68
+ - each package has a built executable under `dist/cli.js`
69
+ - package dry-runs show only intended files
70
+ - publish `@pieai/doc-gov` before `@pieai/pro-gov` when both package versions
71
+ are new, because `pro-gov` depends on the matching validator release
72
+ - maintainer is authenticated to npm
73
+ - registry is the official npm registry, not a mirror
74
+ - scoped publish uses public access
75
+
76
+ Recommended commands:
77
+
78
+ ```bash
79
+ npm whoami --registry https://registry.npmjs.org/
80
+
81
+ pnpm --filter @pieai/doc-gov pack --dry-run
82
+ pnpm --filter @pieai/pro-gov pack --dry-run
83
+
84
+ pnpm --filter @pieai/doc-gov publish --access public --registry https://registry.npmjs.org/
85
+ npm view @pieai/doc-gov version --registry https://registry.npmjs.org/
86
+
87
+ pnpm --filter @pieai/pro-gov publish --access public --registry https://registry.npmjs.org/
88
+ npm view @pieai/pro-gov version --registry https://registry.npmjs.org/
89
+ ```
90
+
91
+ Important: do not claim an npm package is live until its `npm view <package>
92
+ version` command resolves from the public registry.
93
+
94
+ ## After Release
95
+
96
+ After GitHub and npm are live:
97
+
98
+ - verify the GitHub URL in a browser or with `gh repo view`
99
+ - verify npm versions with `npm view @pieai/doc-gov version` and
100
+ `npm view @pieai/pro-gov version`
101
+ - update downstream projects only through an explicit sync task
102
+ - update public website copy from the current README and this checklist, not
103
+ from stale chat history
104
+
105
+ ## Future: Trusted Publishing
106
+
107
+ The first release may be published from a logged-in maintainer machine. Future
108
+ releases should move to npm Trusted Publishing through GitHub Actions.
109
+
110
+ Recommended future setup:
111
+
112
+ 1. On npmjs.com, open the package settings for `@pieai/doc-gov` and
113
+ `@pieai/pro-gov`.
114
+ 2. Add a Trusted Publisher for GitHub Actions to each package:
115
+ - owner: `PieAIStudio`
116
+ - repository: `ProjectGovernanceSystem` (GitHub slug)
117
+ - workflow file: `npm-publish.yml`
118
+ 3. Keep the workflow as manual `workflow_dispatch` until the first trusted
119
+ publishing run succeeds.
120
+ 4. After that, optionally add a release-tag trigger such as `v0.3.1`.
121
+
122
+ Trusted Publishing gives npm a verifiable GitHub build origin and avoids
123
+ long-lived npm tokens.