@pieai/pro-gov 0.4.3 → 0.4.5

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.
@@ -1,161 +0,0 @@
1
- # Ponytail Integration
2
-
3
- Ponytail is an external plugin that asks an AI to prefer the smallest solution
4
- that still works. Project Governance System does not vendor, rewrite, or require
5
- the Ponytail plugin.
6
-
7
- ## The Beginner Version
8
-
9
- Think of an AI project as a building site:
10
-
11
- - PGS is the traffic desk and inspection station.
12
- - Superpowers is the construction process.
13
- - Ponytail is the cost and complexity adviser.
14
-
15
- The adviser can stop the team from buying unnecessary materials. The adviser
16
- cannot cancel the fire exit, the safety inspection, or a room the owner
17
- explicitly requested.
18
-
19
- ## Safe Default
20
-
21
- Keep the global Ponytail mode `off`.
22
-
23
- `off` does not mean Ponytail is useless. It means Ponytail is available when a
24
- task needs a simplicity review without silently influencing every project and
25
- every answer.
26
-
27
- Do not describe `lite` as "almost off." In Ponytail 4.7.0, `lite` still injects
28
- the shared minimalism rules into the active AI context. Its mode-specific line
29
- is gentler than `full`, but the same AI still sees rules about fewer files,
30
- fewer abstractions, shorter diffs, and avoiding speculative work.
31
-
32
- ## Mode Policy
33
-
34
- | Mode | Governed use |
35
- | --- | --- |
36
- | `off` | Recommended global default. Ponytail does not inject its active ruleset. |
37
- | `lite` | First mode to test in one isolated task or session. Complete the requested work, while surfacing a simpler option. |
38
- | `full` | Optional stress test after `lite`. Use only in an isolated task to see whether stronger minimalism harms scope or proof. |
39
- | `ultra` | Not part of the recommended PGS workflow. It is too aggressive for a default governed engineering lane. |
40
-
41
- Return to `off` after every comparison.
42
-
43
- ## Comparison Protocol
44
-
45
- Use the same bounded, low-risk task in separate sessions or worktrees:
46
-
47
- ```text
48
- baseline with off
49
- -> repeat with lite
50
- -> compare scope, proof, complexity, and clarity
51
- -> optionally repeat with full
52
- -> return global mode to off
53
- ```
54
-
55
- Compare:
56
-
57
- - whether every requested requirement was delivered;
58
- - whether Superpowers brainstorming, planning, TDD, debugging, and verification
59
- gates were preserved;
60
- - whether tests, security, accessibility, validation, and data-loss prevention
61
- remained intact;
62
- - files, dependencies, abstractions, and lines changed;
63
- - whether the explanation and durable evidence stayed understandable;
64
- - token and time measurements only when the AI host exposes trustworthy data.
65
-
66
- A shorter answer or smaller diff is not automatically a better result.
67
-
68
- ## Priority And Boundary
69
-
70
- Use this priority order:
71
-
72
- 1. User instructions and project safety requirements.
73
- 2. PGS routing, governance boundaries, and required evidence.
74
- 3. Superpowers workflow gates.
75
- 4. Ponytail complexity and cost advice.
76
-
77
- Ponytail may:
78
-
79
- - question speculative scope;
80
- - prefer the standard library or an already-installed dependency;
81
- - suggest fewer files, dependencies, and abstractions;
82
- - identify code or structure that can be removed safely.
83
-
84
- Ponytail may not:
85
-
86
- - remove an explicit requirement;
87
- - bypass PGS routing or document placement;
88
- - skip required brainstorming, plans, TDD, debugging, or verification;
89
- - weaken security, accessibility, trust-boundary validation, error handling, or
90
- data-loss protection;
91
- - replace proof with "the code is shorter";
92
- - silently change the user's global Ponytail configuration.
93
-
94
- ## Recommended Workflow
95
-
96
- ```mermaid
97
- flowchart TD
98
- A["Task arrives"] --> B["PGS selects the project lane"]
99
- B --> C["Superpowers runs the required workflow"]
100
- C --> D{"Would a simplicity review help?"}
101
- D -- "no" --> E["Implement and verify normally"]
102
- D -- "yes" --> F["Use Ponytail explicitly for this task"]
103
- F --> G["Keep requirements and proof intact"]
104
- G --> E
105
- ```
106
-
107
- For normal engineering, Ponytail is a scoped adviser, not a second workflow
108
- engine and not a replacement for Superpowers.
109
-
110
- ## ProjectLens Audit Use
111
-
112
- When ProjectLens and Ponytail are used together for a target-project audit,
113
- ProjectLens owns the audit package contract. Ponytail acts as an independent
114
- senior engineering reviewer whose simplicity, YAGNI, dependency, abstraction,
115
- and rewrite judgment can challenge ProjectLens recommendations.
116
-
117
- For this combined workflow, "read-only project audit" means the target
118
- repository must not be modified. It does not mean "do not write the PGS audit
119
- package." The audit package is the required owner-facing evidence record.
120
-
121
- Use this order:
122
-
123
- 1. The main agent establishes target path, goal, current phase, target commit or
124
- working state, then creates the package with
125
- `pro-gov lens audit init --target <path> --out audits/<target>/<date>`.
126
- 2. ProjectLens gathers local evidence and writes its own raw artifacts under
127
- `raw/project-lens/`.
128
- 3. Ponytail runs independently and writes its own raw artifacts under
129
- `raw/ponytail/`. For initial whole-project audits, preserve at least
130
- `ponytail-audit`, `ponytail-debt`, and `ponytail-gain` outputs when the
131
- plugin can produce them.
132
- 4. The target command log records Project Lens and Ponytail method sources.
133
- 5. The main agent writes `synthesis/decision-index.md` and
134
- `synthesis/handoff-for-implementation-ai.md`, then runs
135
- `pro-gov lens audit check --dir audits/<target>/<date>`.
136
-
137
- Use subagents for the ProjectLens/Ponytail raw passes when the AI host exposes
138
- them and the user has authorized subagent or parallel agent work. If host rules
139
- block subagents, preserve the same raw-output separation with serial passes and
140
- record the fallback in the audit package. Do not claim that subagents were used
141
- when they were not. The manifest must include `Subagent trace:` with each pass
142
- role, execution mode, final status, and raw artifact path; if durable subagent
143
- IDs are unavailable, record that limitation.
144
-
145
- Do not blur a fresh audit with a reuse verification. For a fresh ProjectLens plus
146
- Ponytail audit, run `pro-gov lens audit check --dir <audit-dir> --mode fresh`.
147
- If an existing package is reused because the target commit and package check are
148
- still valid, label the result as reuse and run `--mode reuse`.
149
-
150
- Do not blend Ponytail findings into ProjectLens files. Do not suppress Ponytail
151
- to make ProjectLens look correct. Preserve material disagreements in the raw
152
- artifacts and let the synthesis state which judgment won and why. The shared
153
- boundary is evidence, user intent, project safety, explicit product-line
154
- direction, and PGS's technology-governance protocol. If a stack direction
155
- exists, Ponytail may challenge migration scope, timing, and complexity, while
156
- ProjectLens records the direction as the product group's stated intent and PGS
157
- classifies the execution posture.
158
-
159
- Use `ponytail-review` later for implementation diffs or PR-style changes. For
160
- initial read-only project audits, prefer the whole-repo Ponytail modes above so
161
- the audit starts from system shape instead of line-level patch review.
@@ -1,107 +0,0 @@
1
- # Superpowers Integration
2
-
3
- Superpowers is an external plugin/system. This repository does not vendor or rewrite it.
4
-
5
- ## The Beginner Version
6
-
7
- Think of an AI project as a building site:
8
-
9
- - PGS is the traffic desk and inspection station.
10
- - Superpowers is the construction process.
11
- - `pro-gov learn recall` is the pre-work lookup for reusable lessons.
12
- - Compound Engineering's `ce-compound` is the knowledge-capture tail.
13
- - Ponytail is an optional cost and complexity adviser.
14
-
15
- PGS chooses the lane. Superpowers makes sure the work follows the right
16
- engineering process. Learning Recall checks prior lessons before work starts.
17
- Compound Engineering records reusable lessons after verified work. Ponytail may
18
- suggest a leaner implementation, but it cannot cancel the process or the final
19
- inspection.
20
-
21
- ## Boundary
22
-
23
- Superpowers owns engineering workflows such as:
24
-
25
- - brainstorming
26
- - writing plans
27
- - TDD
28
- - debugging
29
- - verification before completion
30
- - worktree usage
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
-
39
- Project Governance System owns:
40
-
41
- - documentation lifecycle
42
- - agents routing
43
- - current work index conventions
44
- - pre-work learning recall through `pro-gov learn recall`
45
- - the governed location and boundary for externally sourced AI evidence rules
46
-
47
- Ponytail, when explicitly enabled for a task, may advise on:
48
-
49
- - speculative scope;
50
- - unnecessary dependencies;
51
- - avoidable files and abstractions;
52
- - simpler implementation choices.
53
-
54
- Compound Engineering, by default, owns:
55
-
56
- - post-work knowledge capture through `ce-compound`;
57
- - fallback capture through `pro-gov learn capture` only when CE is unavailable;
58
- - `docs/solutions/**` learning records and their CE frontmatter;
59
- - CE-owned external artifacts when the user explicitly invokes CE workflows.
60
-
61
- ## Rule
62
-
63
- Use Superpowers inside the selected project lane. Do not let Superpowers create a separate durable document tree unless the project explicitly adopts one.
64
-
65
- Durable outputs should map back to the project's doc-gov layers:
66
-
67
- - specs -> `docs/specs/**`
68
- - plans -> `docs/plans/**`
69
- - durable references -> `docs/reference/**`
70
-
71
- ## Execution Order
72
-
73
- Agents routing classifies first. For non-trivial work, Learning Recall checks
74
- prior `docs/solutions/**` and `CONCEPTS.md` records before files change.
75
- Superpowers executes inside the selected lane. Optional Ponytail advice may run
76
- after those responsibilities are known. It may make the implementation leaner,
77
- but it must not remove explicit requirements or reduce how correctness is
78
- proven. The Compound Gate runs near the end, before final reporting, to decide
79
- whether verified work produced reusable learning.
80
-
81
- ```mermaid
82
- flowchart TD
83
- A["Task arrives"] --> B["Read project router and current work"]
84
- B --> C["Classify profile and lane"]
85
- C --> R["Run Learning Recall for non-trivial work"]
86
- R --> D{"Does this lane need a Superpowers workflow?"}
87
- D -- "yes" --> E["Use the matching Superpowers skill"]
88
- D -- "no" --> F["Use the local non-Superpowers lane rules"]
89
- E --> G{"Would an explicit simplicity review help?"}
90
- F --> G
91
- G -- "yes" --> H["Use Ponytail without dropping workflow gates"]
92
- G -- "no" --> I["Pass the Compound Gate"]
93
- H --> I
94
- I --> J["Write durable outputs into doc-gov layers"]
95
- ```
96
-
97
- If Superpowers suggests a default location such as `docs/superpowers/**`, project instructions may override that location. The durable project record should still land in the governed doc-gov layer unless the project has explicitly adopted a separate Superpowers document tree.
98
-
99
- Host-specific files such as `CLAUDE.md` may include Superpowers skill routing
100
- text. That text is an adapter. It must not replace the project `AGENTS.md`
101
- router or run before the Project Governance System routing block.
102
-
103
- For Ponytail mode policy and the isolated comparison protocol, read
104
- `integrations/ponytail.md`.
105
-
106
- For Compound Engineering's knowledge-capture boundary, read
107
- `integrations/compound-engineering.md`.
@@ -1,26 +0,0 @@
1
- {
2
- "pgs-compound-gate": {
3
- "Stop": [
4
- {
5
- "hooks": [
6
- {
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 --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
- "timeout": 30
10
- }
11
- ]
12
- }
13
- ],
14
- "SubagentStop": [
15
- {
16
- "hooks": [
17
- {
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 --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
- "timeout": 30
21
- }
22
- ]
23
- }
24
- ]
25
- }
26
- }
@@ -1,26 +0,0 @@
1
- {
2
- "hooks": {
3
- "Stop": [
4
- {
5
- "hooks": [
6
- {
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 --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
- "timeout": 30
10
- }
11
- ]
12
- }
13
- ],
14
- "SubagentStop": [
15
- {
16
- "hooks": [
17
- {
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 --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
- "timeout": 30
21
- }
22
- ]
23
- }
24
- ]
25
- }
26
- }
@@ -1,28 +0,0 @@
1
- {
2
- "hooks": {
3
- "Stop": [
4
- {
5
- "hooks": [
6
- {
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 --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
- "timeout": 30,
10
- "statusMessage": "Checking PGS Compound Gate"
11
- }
12
- ]
13
- }
14
- ],
15
- "SubagentStop": [
16
- {
17
- "hooks": [
18
- {
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 --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
- "timeout": 30,
22
- "statusMessage": "Checking PGS subagent Compound Gate"
23
- }
24
- ]
25
- }
26
- ]
27
- }
28
- }