@pieai/pro-gov 0.3.17 → 0.4.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.
- package/README.md +7 -2
- package/assets/docs/reference/adoption/adoption-playbook.md +8 -5
- package/assets/integrations/directed-development.md +10 -0
- package/assets/integrations/mattpocock-skills.md +143 -0
- package/assets/integrations/superpowers.md +7 -0
- package/assets/profiles/engineering-runtime/manifest.yml +1 -0
- package/assets/profiles/engineering-runtime/profile.md +6 -3
- package/assets/starter/.agents/hooks.json +2 -2
- package/assets/starter/.claude/settings.json +2 -2
- package/assets/starter/.codex/hooks.json +2 -2
- package/assets/starter/AGENTS.template.md +1 -1
- package/cli-guide.md +7 -0
- package/dist/cli.js +28 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -154,8 +154,13 @@ work, run `pro-gov learn recall --query "<task summary>"` and read relevant
|
|
|
154
154
|
`docs/solutions/**` or `CONCEPTS.md` hits before changing files.
|
|
155
155
|
|
|
156
156
|
Engineering-runtime starters include cross-host Stop hooks for Codex,
|
|
157
|
-
Claude Code, and Antigravity. Those hooks call `pro-gov host-hook
|
|
158
|
-
|
|
157
|
+
Claude Code, and Antigravity. Those hooks call `pro-gov host-hook`. The starter
|
|
158
|
+
default is `--compound-gate-mode off`: wiring is present, but the hook does not
|
|
159
|
+
interrupt the main session. Use `--compound-gate-mode lite` for a short
|
|
160
|
+
exit-door reminder, or `--compound-gate-mode strict` for the older blocking
|
|
161
|
+
gate.
|
|
162
|
+
|
|
163
|
+
When enabled, the hook expects the final report to include either:
|
|
159
164
|
|
|
160
165
|
```text
|
|
161
166
|
Compound Gate: ran ce-compound -> <path>
|
|
@@ -225,9 +225,11 @@ so prior lessons can shape the work without making Compound Engineering the
|
|
|
225
225
|
default execution workflow.
|
|
226
226
|
|
|
227
227
|
The host-hook gate is deliberately small. It does not make Compound Engineering
|
|
228
|
-
the main workflow.
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
the main workflow. Starter hooks default to `--compound-gate-mode off`, so they
|
|
229
|
+
prove the wiring without interrupting the main session. Switch a target to
|
|
230
|
+
`--compound-gate-mode lite` for a short reminder, or `--compound-gate-mode
|
|
231
|
+
strict` when a project intentionally wants the old blocking exit gate. In
|
|
232
|
+
`lite` or `strict`, the hook checks whether a completion report says one of:
|
|
231
233
|
|
|
232
234
|
```text
|
|
233
235
|
Compound Gate: ran ce-compound -> <path>
|
|
@@ -310,8 +312,9 @@ engineering runtime profile.
|
|
|
310
312
|
|
|
311
313
|
`pro-gov doctor --strict-hooks` is a wiring check, not a live host simulation.
|
|
312
314
|
It proves the project has hook files that call `pro-gov host-hook`; PGS package
|
|
313
|
-
tests prove the expected Stop/SubagentStop behavior for
|
|
314
|
-
schemas. After installing or changing
|
|
315
|
+
tests prove the expected Stop/SubagentStop behavior for `off`, `lite`, and
|
|
316
|
+
`strict` modes across the supported host schemas. After installing or changing
|
|
317
|
+
hooks, validate from a fresh AI session.
|
|
315
318
|
For Antigravity, a real invocation writes diagnostics under
|
|
316
319
|
`.git/pro-gov-hook-debug/` because the starter hook command sets
|
|
317
320
|
`PGS_HOST_HOOK_DEBUG=1`. Absence of a diagnostic file after a fresh
|
|
@@ -4,6 +4,11 @@ Directed Development is an optional workflow for mixed, cross-domain, interdepen
|
|
|
4
4
|
|
|
5
5
|
It is not the default for every task.
|
|
6
6
|
|
|
7
|
+
It is not a Superpowers startup adapter and not a second engineering plugin. It
|
|
8
|
+
is a small PGS routing rule for cases where product work must be split into
|
|
9
|
+
ordered dependency-aware Blocks before the selected lane uses its normal
|
|
10
|
+
workflow. Superpowers still owns the engineering process inside that lane.
|
|
11
|
+
|
|
7
12
|
## Boundary
|
|
8
13
|
|
|
9
14
|
Directed Development may define:
|
|
@@ -16,6 +21,7 @@ Directed Development may define:
|
|
|
16
21
|
Directed Development must not define:
|
|
17
22
|
|
|
18
23
|
- artifact locations
|
|
24
|
+
- Superpowers skill invocation rules
|
|
19
25
|
- project document paths
|
|
20
26
|
- project lane names
|
|
21
27
|
- runtime truth
|
|
@@ -25,6 +31,10 @@ Those remain owned by the project and doc-gov.
|
|
|
25
31
|
Agents routing decides whether this workflow applies. Directed Development does
|
|
26
32
|
not replace the project router.
|
|
27
33
|
|
|
34
|
+
BDD-style scenarios are allowed only as acceptance language for a DD Block. They
|
|
35
|
+
do not turn Directed Development into a default BDD ceremony and do not replace
|
|
36
|
+
Superpowers TDD, debugging, or verification workflows.
|
|
37
|
+
|
|
28
38
|
## Trigger
|
|
29
39
|
|
|
30
40
|
Use Directed Development only when all are true:
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# mattpocock/skills Integration
|
|
2
|
+
|
|
3
|
+
mattpocock/skills is an external npx skill pack. This repository may install
|
|
4
|
+
the pack unchanged, but it does not vendor, rewrite, or fork the skill bodies.
|
|
5
|
+
|
|
6
|
+
## The Beginner Version
|
|
7
|
+
|
|
8
|
+
Think of the project as a workshop:
|
|
9
|
+
|
|
10
|
+
- PGS is the traffic desk and filing cabinet.
|
|
11
|
+
- Superpowers is the default construction process for engineering work.
|
|
12
|
+
- mattpocock/skills is a set of sharp workshop tools for grilling ideas,
|
|
13
|
+
modeling domain language, turning decisions into PRDs/issues, and running
|
|
14
|
+
specific implementation flows.
|
|
15
|
+
- Compound Engineering is the verified-learning notebook written after the work.
|
|
16
|
+
|
|
17
|
+
Installing a box of tools does not mean every tool runs by itself. PGS decides
|
|
18
|
+
the lane first. Superpowers remains the default engineering workflow. Matt
|
|
19
|
+
skills may add useful artifacts and focused flows when their trigger fits.
|
|
20
|
+
|
|
21
|
+
## Default Rule
|
|
22
|
+
|
|
23
|
+
For PGS-governed engineering/runtime projects, mattpocock/skills is optional
|
|
24
|
+
capability inside the selected lane. It is not the default workflow owner.
|
|
25
|
+
|
|
26
|
+
Use this order:
|
|
27
|
+
|
|
28
|
+
1. PGS routes the task and selects the project lane.
|
|
29
|
+
2. For non-trivial engineering work, run Learning Recall.
|
|
30
|
+
3. Superpowers owns the normal engineering workflow when that lane needs one.
|
|
31
|
+
4. Matt skills may run when the user explicitly invokes a Matt flow or when an
|
|
32
|
+
active Matt flow calls one of its helper skills.
|
|
33
|
+
5. The Compound Gate still runs before final reporting.
|
|
34
|
+
|
|
35
|
+
Do not make routine work choose between Superpowers and Matt. The useful split
|
|
36
|
+
is simpler:
|
|
37
|
+
|
|
38
|
+
- Superpowers owns default engineering discipline.
|
|
39
|
+
- Matt owns demand shaping, domain modeling, PRD/issues generation, triage, and
|
|
40
|
+
explicitly requested Matt implementation flows.
|
|
41
|
+
- CE owns post-work reusable learning.
|
|
42
|
+
|
|
43
|
+
## Trigger Boundary
|
|
44
|
+
|
|
45
|
+
User-invoked Matt skills, such as `/grill-with-docs`, `/to-prd`,
|
|
46
|
+
`/to-issues`, `/implement`, `/triage`, and `/ask-matt`, require an explicit
|
|
47
|
+
user request or an already active Matt flow that named them.
|
|
48
|
+
|
|
49
|
+
Model-invoked Matt helper skills, such as `domain-modeling`, `tdd`,
|
|
50
|
+
`code-review`, `research`, and `prototype`, may run only when they support the
|
|
51
|
+
current selected lane and do not replace the current workflow owner.
|
|
52
|
+
|
|
53
|
+
If a Matt helper and a Superpowers skill both fit, keep the current workflow
|
|
54
|
+
owner unless the user explicitly switches. For example:
|
|
55
|
+
|
|
56
|
+
- normal feature implementation -> Superpowers remains the default;
|
|
57
|
+
- user says `/implement issue 123` -> Matt `/implement` owns that flow;
|
|
58
|
+
- user says "grill this idea and make docs" -> Matt `/grill-with-docs` owns
|
|
59
|
+
that shaping flow;
|
|
60
|
+
- user says "use CE full workflow" -> CE owns the explicitly requested flow.
|
|
61
|
+
|
|
62
|
+
## PGS Central Setup
|
|
63
|
+
|
|
64
|
+
The PGS central repository uses these Matt setup choices:
|
|
65
|
+
|
|
66
|
+
| Setup item | PGS central value |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Issue tracker | GitHub Issues for `PieAIStudio/ProjectGovernanceSystem` |
|
|
69
|
+
| External PRs as request surface | No by default |
|
|
70
|
+
| Triage labels | Default Matt labels: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix` |
|
|
71
|
+
| Domain docs layout | Single-context: root `CONTEXT.md` and `docs/adr/**` when Matt creates them |
|
|
72
|
+
|
|
73
|
+
The setup files live under `docs/agents/**`. They are Matt-owned external
|
|
74
|
+
configuration files, not PGS canonical product truth.
|
|
75
|
+
|
|
76
|
+
## Matt-Owned Artifacts
|
|
77
|
+
|
|
78
|
+
The following outputs are Matt-owned external artifacts:
|
|
79
|
+
|
|
80
|
+
| Path or surface | Owner | Rule |
|
|
81
|
+
| --- | --- | --- |
|
|
82
|
+
| `CONTEXT.md` | Matt | Domain glossary/context. Helpful input, not a replacement for `docs/canon/**`. |
|
|
83
|
+
| `CONTEXT-MAP.md` | Matt | Multi-context map when a project opts into that layout. |
|
|
84
|
+
| `docs/agents/**` | Matt | Per-repo Matt setup: issue tracker, triage labels, domain docs. |
|
|
85
|
+
| `docs/adr/**` | Matt | Matt-generated ADRs. Promote manually to `docs/decisions/**` if they become PGS-governed decisions. |
|
|
86
|
+
| `.scratch/**` | Matt | Local issue tracker or temporary work surface. Keep project-specific. |
|
|
87
|
+
| GitHub/GitLab issues | Matt/project | PRDs, issue breakdowns, triage state. They are work-tracking artifacts, not doc-gov records by themselves. |
|
|
88
|
+
|
|
89
|
+
Doc Gov must ignore `docs/agents/**` and `docs/adr/**` as external artifacts.
|
|
90
|
+
When a Matt artifact becomes durable PGS truth, promote it into the normal
|
|
91
|
+
governed layer:
|
|
92
|
+
|
|
93
|
+
- decisions -> `docs/decisions/**`
|
|
94
|
+
- specs -> `docs/specs/**`
|
|
95
|
+
- plans -> `docs/plans/**`
|
|
96
|
+
- canon -> `docs/canon/**`
|
|
97
|
+
- references -> `docs/reference/**`
|
|
98
|
+
|
|
99
|
+
Do not try to make one file satisfy both Matt's native artifact contract and a
|
|
100
|
+
PGS governed document contract.
|
|
101
|
+
|
|
102
|
+
## Downstream Install Rule
|
|
103
|
+
|
|
104
|
+
Install or update Matt skills in downstream repositories through the PGS asset
|
|
105
|
+
workflow. Do not run `npx skills add mattpocock/skills` inside every downstream
|
|
106
|
+
project as an unmanaged one-off.
|
|
107
|
+
|
|
108
|
+
The central intake flow is:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pro-gov assets npx add mattpocock/skills --plan --root agent-assets/skills/npx-skills
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Review the plan, then install into the PGS central npx skill root. Downstream
|
|
115
|
+
projects receive managed symlinks through the private PGS asset bundle
|
|
116
|
+
`mattpocock-skills` and project-local Matt setup files according to their
|
|
117
|
+
selected profile and host support.
|
|
118
|
+
|
|
119
|
+
## Verification
|
|
120
|
+
|
|
121
|
+
Central verification:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
node packages/doc-gov/dist/cli.js router-check
|
|
125
|
+
node packages/doc-gov/dist/cli.js check
|
|
126
|
+
node packages/doc-gov/dist/cli.js scan --check
|
|
127
|
+
git diff --check
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Matt install verification:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
test -f agent-assets/skills/npx-skills/skills-lock.json
|
|
134
|
+
find agent-assets/skills/npx-skills/.agents/skills -maxdepth 2 -name SKILL.md
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Downstream verification must prove:
|
|
138
|
+
|
|
139
|
+
- the target's project router points to its selected profile;
|
|
140
|
+
- Matt skills are linked from the managed PGS asset source;
|
|
141
|
+
- `docs/agents/**` exists when Matt engineering skills are enabled;
|
|
142
|
+
- Doc Gov ignores Matt-owned external artifacts;
|
|
143
|
+
- Superpowers, Matt, and CE each keep their documented ownership.
|
|
@@ -29,6 +29,13 @@ Superpowers owns engineering workflows such as:
|
|
|
29
29
|
- verification before completion
|
|
30
30
|
- worktree usage
|
|
31
31
|
|
|
32
|
+
Superpowers 6.x for Codex is skill-routed, not hook-driven. The plugin manifest
|
|
33
|
+
does not need a SessionStart hook for PGS to make use of it. The startup
|
|
34
|
+
behavior comes from the `using-superpowers` skill description, which tells the
|
|
35
|
+
host to check relevant skills at the start of a conversation and before acting.
|
|
36
|
+
Do not add a PGS hook just to force Superpowers startup unless a future
|
|
37
|
+
Superpowers release explicitly requires one.
|
|
38
|
+
|
|
32
39
|
Project Governance System owns:
|
|
33
40
|
|
|
34
41
|
- documentation lifecycle
|
|
@@ -11,6 +11,7 @@ required:
|
|
|
11
11
|
optional:
|
|
12
12
|
compound_engineering: integrations/compound-engineering.md
|
|
13
13
|
directed_development: integrations/directed-development.md
|
|
14
|
+
mattpocock_skills: integrations/mattpocock-skills.md
|
|
14
15
|
superpowers: integrations/superpowers.md
|
|
15
16
|
project_local_required:
|
|
16
17
|
- docs/policy/best-practice-for-this-project.md
|
|
@@ -12,6 +12,7 @@ Use for code-heavy projects: apps, games, runtimes, services, browser products,
|
|
|
12
12
|
- `integrations/superpowers.md`
|
|
13
13
|
- `integrations/compound-engineering.md`
|
|
14
14
|
- `integrations/directed-development.md`
|
|
15
|
+
- `integrations/mattpocock-skills.md`
|
|
15
16
|
- starter `docs/governance/` and `docs/policy/` templates
|
|
16
17
|
|
|
17
18
|
## Requires Project-Local Rules
|
|
@@ -31,6 +32,7 @@ Each project must define:
|
|
|
31
32
|
- game/app-specific lane wording
|
|
32
33
|
- Superpowers plugin body
|
|
33
34
|
- Compound Engineering plugin body
|
|
35
|
+
- mattpocock/skills body
|
|
34
36
|
|
|
35
37
|
## Automation Boundary
|
|
36
38
|
|
|
@@ -42,9 +44,10 @@ content under the target project's ownership.
|
|
|
42
44
|
|
|
43
45
|
Engineering-runtime starters also include Codex, Claude Code, and Antigravity
|
|
44
46
|
Stop hooks that call `pro-gov host-hook`. Use `pro-gov doctor --strict-hooks`
|
|
45
|
-
after sync to confirm the
|
|
46
|
-
|
|
47
|
-
`
|
|
47
|
+
after sync to confirm the host configs are wired. The starter default is
|
|
48
|
+
`--compound-gate-mode off`, so the hook does not interrupt the main session
|
|
49
|
+
unless the project explicitly switches to `lite` or `strict`. Even when enabled,
|
|
50
|
+
the hook does not replace verification, tests, or `ce-compound` itself.
|
|
48
51
|
|
|
49
52
|
For non-trivial engineering work, run `pro-gov learn recall --query "<task
|
|
50
53
|
summary>"` before changing files so existing `docs/solutions/**` and
|
|
@@ -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 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 corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; PGS_HOST_HOOK_DEBUG=1 pgs_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",
|
|
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 --compound-gate-mode off; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; PGS_HOST_HOOK_DEBUG=1 pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host antigravity --event Stop --compound-gate-mode off; else PGS_HOST_HOOK_DEBUG=1 npx --no-install @pieai/pro-gov host-hook --host antigravity --event Stop --compound-gate-mode off; 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 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 corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; PGS_HOST_HOOK_DEBUG=1 pgs_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",
|
|
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 --compound-gate-mode off; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; PGS_HOST_HOOK_DEBUG=1 pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host antigravity --event SubagentStop --compound-gate-mode off; else PGS_HOST_HOOK_DEBUG=1 npx --no-install @pieai/pro-gov host-hook --host antigravity --event SubagentStop --compound-gate-mode off; fi",
|
|
20
20
|
"timeout": 30
|
|
21
21
|
}
|
|
22
22
|
]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"hooks": [
|
|
6
6
|
{
|
|
7
7
|
"type": "command",
|
|
8
|
-
"command": "cd \"${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host claude-code --event Stop; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host claude-code --event Stop; else npx --no-install @pieai/pro-gov host-hook --host claude-code --event Stop; fi",
|
|
8
|
+
"command": "cd \"${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host claude-code --event Stop --compound-gate-mode off; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host claude-code --event Stop --compound-gate-mode off; else npx --no-install @pieai/pro-gov host-hook --host claude-code --event Stop --compound-gate-mode off; 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 \"${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host claude-code --event SubagentStop; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host claude-code --event SubagentStop; else npx --no-install @pieai/pro-gov host-hook --host claude-code --event SubagentStop; fi",
|
|
19
|
+
"command": "cd \"${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel)}\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host claude-code --event SubagentStop --compound-gate-mode off; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host claude-code --event SubagentStop --compound-gate-mode off; else npx --no-install @pieai/pro-gov host-hook --host claude-code --event SubagentStop --compound-gate-mode off; fi",
|
|
20
20
|
"timeout": 30
|
|
21
21
|
}
|
|
22
22
|
]
|
|
@@ -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 codex --event Stop; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host codex --event Stop; else npx --no-install @pieai/pro-gov host-hook --host codex --event Stop; fi",
|
|
8
|
+
"command": "cd \"$(git rev-parse --show-toplevel)\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host codex --event Stop --compound-gate-mode off; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host codex --event Stop --compound-gate-mode off; else npx --no-install @pieai/pro-gov host-hook --host codex --event Stop --compound-gate-mode off; fi",
|
|
9
9
|
"timeout": 30,
|
|
10
10
|
"statusMessage": "Checking PGS Compound Gate"
|
|
11
11
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
20
|
-
"command": "cd \"$(git rev-parse --show-toplevel)\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host codex --event SubagentStop; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host codex --event SubagentStop; else npx --no-install @pieai/pro-gov host-hook --host codex --event SubagentStop; fi",
|
|
20
|
+
"command": "cd \"$(git rev-parse --show-toplevel)\" && if [ -x ./node_modules/.bin/pro-gov ]; then ./node_modules/.bin/pro-gov host-hook --host codex --event SubagentStop --compound-gate-mode off; elif [ -f packages/pro-gov/src/cli.ts ] && { command -v corepack >/dev/null 2>&1 || command -v pnpm >/dev/null 2>&1; }; then pgs_pnpm() { if command -v corepack >/dev/null 2>&1; then corepack pnpm \"$@\"; else pnpm \"$@\"; fi; }; pgs_pnpm --silent --filter @pieai/pro-gov dev host-hook --host codex --event SubagentStop --compound-gate-mode off; else npx --no-install @pieai/pro-gov host-hook --host codex --event SubagentStop --compound-gate-mode off; fi",
|
|
21
21
|
"timeout": 30,
|
|
22
22
|
"statusMessage": "Checking PGS subagent Compound Gate"
|
|
23
23
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
- Engineering projects may use Superpowers, Directed Development, GStack, or other external workflows only inside the selected lane; do not copy upstream integration guides into the target project by default.
|
|
44
44
|
- For engineering projects, Superpowers is the default engineering workflow. Compound Engineering is used by default only as the post-work Compound Gate through `ce-compound`; full CE workflows require an explicit user request.
|
|
45
45
|
- For engineering projects, PGS Learning Recall is the pre-work companion to that post-work gate: recall existing lessons first, then do the work, then decide whether a new lesson should be compounded.
|
|
46
|
-
- Engineering projects should have PGS Stop hooks wired for Codex, Claude Code, and Antigravity. Before final reporting after completed engineering work, report `Compound Gate: ran ce-compound -> <path>`, `Compound Gate: ran fallback capture -> <path>`, or `Compound Gate: skipped -> <reason>`.
|
|
46
|
+
- Engineering projects should have PGS Stop hooks wired for Codex, Claude Code, and Antigravity. Starter hooks default to `--compound-gate-mode off`; opt into `lite` or `strict` only when this project wants runtime exit-gate reminders. Before final reporting after completed engineering work, report `Compound Gate: ran ce-compound -> <path>`, `Compound Gate: ran fallback capture -> <path>`, or `Compound Gate: skipped -> <reason>`.
|
|
47
47
|
- Use fallback capture only when the current host cannot load Compound Engineering; run `pro-gov learn capture --title "<learning title>" --summary "<reusable lesson>"` so Learning Recall can find the lesson later.
|
|
48
48
|
- Doc-only projects should say that Superpowers TDD and Directed Development are not enabled by default.
|
|
49
49
|
- External workflow systems such as Superpowers or GStack run inside the lane selected by this router. They must not replace this project router.
|
package/cli-guide.md
CHANGED
|
@@ -26,6 +26,7 @@ pro-gov lens inspect --target .
|
|
|
26
26
|
pro-gov lens report --target . --out .pro-gov/lens-report.md
|
|
27
27
|
pro-gov lens audit init --target /path/to/project --out audits/project/2026-07-01
|
|
28
28
|
pro-gov lens audit check --dir audits/project/2026-07-01
|
|
29
|
+
pro-gov host-hook --host codex --event Stop --compound-gate-mode off|lite|strict
|
|
29
30
|
pro-gov init --profile engineering-runtime --dry-run
|
|
30
31
|
pro-gov init --profile engineering-runtime --apply
|
|
31
32
|
pro-gov init --profile doc-only --dry-run
|
|
@@ -69,6 +70,12 @@ Then report:
|
|
|
69
70
|
Compound Gate: ran fallback capture -> docs/solutions/<category>/<file>.md
|
|
70
71
|
```
|
|
71
72
|
|
|
73
|
+
`host-hook` is the cross-host Compound Gate adapter for Codex, Claude Code, and
|
|
74
|
+
Antigravity. `--compound-gate-mode off` is the default and does not interrupt
|
|
75
|
+
the main session. `lite` emits a short continuation prompt when completed
|
|
76
|
+
engineering work lacks a Compound Gate marker. `strict` emits the fuller legacy
|
|
77
|
+
prompt. The same value can be supplied through `PGS_COMPOUND_GATE_MODE`.
|
|
78
|
+
|
|
72
79
|
Full upstream-checkout commands:
|
|
73
80
|
|
|
74
81
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -1763,8 +1763,19 @@ var compoundGateInstruction = [
|
|
|
1763
1763
|
"If there is no reusable learning, report:",
|
|
1764
1764
|
"Compound Gate: skipped -> <reason>"
|
|
1765
1765
|
].join("\n");
|
|
1766
|
+
var liteCompoundGateInstruction = [
|
|
1767
|
+
"Pass the PGS Compound Gate before final reporting.",
|
|
1768
|
+
"Report one line:",
|
|
1769
|
+
"Compound Gate: ran ce-compound -> <path>",
|
|
1770
|
+
"Compound Gate: ran fallback capture -> <path>",
|
|
1771
|
+
"Compound Gate: skipped -> <reason>"
|
|
1772
|
+
].join("\n");
|
|
1766
1773
|
var maxTranscriptBytes = 2 * 1024 * 1024;
|
|
1767
1774
|
function evaluateHostHook(request) {
|
|
1775
|
+
const mode = request.compoundGateMode ?? "off";
|
|
1776
|
+
if (mode === "off") {
|
|
1777
|
+
return { action: "allow" };
|
|
1778
|
+
}
|
|
1768
1779
|
if (request.event !== "Stop" && request.event !== "SubagentStop") {
|
|
1769
1780
|
return { action: "allow" };
|
|
1770
1781
|
}
|
|
@@ -1781,7 +1792,10 @@ function evaluateHostHook(request) {
|
|
|
1781
1792
|
if (!looksLikeCompletedEngineeringWork(input.lastAssistantMessage)) {
|
|
1782
1793
|
return { action: "allow" };
|
|
1783
1794
|
}
|
|
1784
|
-
return { action: "continue", reason:
|
|
1795
|
+
return { action: "continue", reason: compoundGateInstructionForMode(mode) };
|
|
1796
|
+
}
|
|
1797
|
+
function compoundGateInstructionForMode(mode) {
|
|
1798
|
+
return mode === "lite" ? liteCompoundGateInstruction : compoundGateInstruction;
|
|
1785
1799
|
}
|
|
1786
1800
|
function formatHostHookOutput(host, event, decision) {
|
|
1787
1801
|
if (decision.action === "allow") {
|
|
@@ -1953,6 +1967,9 @@ function isHostHookHost(value) {
|
|
|
1953
1967
|
function isHostHookEvent(value) {
|
|
1954
1968
|
return value === "PostToolUse" || value === "PreToolUse" || value === "Stop" || value === "SubagentStop" || value === "UserPromptSubmit";
|
|
1955
1969
|
}
|
|
1970
|
+
function isCompoundGateMode(value) {
|
|
1971
|
+
return value === "off" || value === "lite" || value === "strict";
|
|
1972
|
+
}
|
|
1956
1973
|
|
|
1957
1974
|
// src/commands/host-hook.ts
|
|
1958
1975
|
var defaultStdinTimeoutMs = 750;
|
|
@@ -1960,6 +1977,7 @@ var maxDebugRawInputBytes = 256 * 1024;
|
|
|
1960
1977
|
async function runHostHook(args) {
|
|
1961
1978
|
const host = readOption(args, "--host");
|
|
1962
1979
|
const event = readOption(args, "--event");
|
|
1980
|
+
const compoundGateMode = readCompoundGateMode(args);
|
|
1963
1981
|
if (!isHostHookHost(host)) {
|
|
1964
1982
|
console.error("Expected --host <codex|claude-code|antigravity>");
|
|
1965
1983
|
return 1;
|
|
@@ -1970,9 +1988,10 @@ async function runHostHook(args) {
|
|
|
1970
1988
|
}
|
|
1971
1989
|
const rawInput = await readStdinText(defaultStdinTimeoutMs);
|
|
1972
1990
|
const input = parseStdinJson(rawInput);
|
|
1973
|
-
const decision = evaluateHostHook({ host, event, input });
|
|
1991
|
+
const decision = evaluateHostHook({ compoundGateMode, host, event, input });
|
|
1974
1992
|
const output = formatHostHookOutput(host, event, decision);
|
|
1975
1993
|
writeDebugLogIfRequested(args, {
|
|
1994
|
+
compoundGateMode,
|
|
1976
1995
|
decision,
|
|
1977
1996
|
event,
|
|
1978
1997
|
host,
|
|
@@ -1984,6 +2003,11 @@ async function runHostHook(args) {
|
|
|
1984
2003
|
`);
|
|
1985
2004
|
return 0;
|
|
1986
2005
|
}
|
|
2006
|
+
function readCompoundGateMode(args) {
|
|
2007
|
+
const value = readOption(args, "--compound-gate-mode") ?? process.env.PGS_COMPOUND_GATE_MODE ?? "off";
|
|
2008
|
+
if (isCompoundGateMode(value)) return value;
|
|
2009
|
+
return "off";
|
|
2010
|
+
}
|
|
1987
2011
|
function readOption(args, name) {
|
|
1988
2012
|
const index = args.indexOf(name);
|
|
1989
2013
|
if (index < 0) return void 0;
|
|
@@ -2041,6 +2065,7 @@ function writeDebugLogIfRequested(args, record) {
|
|
|
2041
2065
|
{
|
|
2042
2066
|
schemaVersion: 1,
|
|
2043
2067
|
cwd: process.cwd(),
|
|
2068
|
+
compoundGateMode: record.compoundGateMode,
|
|
2044
2069
|
event: record.event,
|
|
2045
2070
|
host: record.host,
|
|
2046
2071
|
nodeVersion: process.version,
|
|
@@ -4172,7 +4197,7 @@ var COMMANDS = [
|
|
|
4172
4197
|
"lens report --target <path> --out <path>",
|
|
4173
4198
|
"lens audit init --target <path> --out <path>",
|
|
4174
4199
|
"lens audit check --dir <path> [--json]",
|
|
4175
|
-
"host-hook --host <codex|claude-code|antigravity> --event <Stop|SubagentStop|...>",
|
|
4200
|
+
"host-hook --host <codex|claude-code|antigravity> --event <Stop|SubagentStop|...> [--compound-gate-mode off|lite|strict]",
|
|
4176
4201
|
"init --profile <engineering-runtime|doc-only> <--dry-run|--apply>",
|
|
4177
4202
|
"sync --check [--profile <engineering-runtime|doc-only>]",
|
|
4178
4203
|
"doctor"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pieai/pro-gov",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Project-level distribution kit for Project Governance System.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@pieai/doc-gov": "^0.
|
|
38
|
+
"@pieai/doc-gov": "^0.4.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "24.13.2",
|