@diegopetrucci/pi-extensions 0.1.28 → 0.1.31
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 +3 -1
- package/extensions/agent-workflow-audit/README.md +69 -0
- package/extensions/agent-workflow-audit/index.ts +1211 -0
- package/extensions/agent-workflow-audit/package.json +28 -0
- package/extensions/gnosis/README.md +59 -0
- package/extensions/gnosis/index.ts +159 -0
- package/extensions/gnosis/package.json +29 -0
- package/extensions/oracle/README.md +19 -2
- package/extensions/oracle/index.ts +224 -15
- package/extensions/oracle/package.json +1 -1
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
A collection of [pi](https://github.com/earendil-works/pi-mono) agent extensions I made:
|
|
4
4
|
|
|
5
|
+
- [`agent-workflow-audit`](./extensions/agent-workflow-audit): Adds `/agent-workflow-audit`, which runs an isolated repo workflow audit subagent and returns only the final distilled report to the main session.
|
|
5
6
|
- [`confirm-destructive`](./extensions/confirm-destructive): Confirms before destructive session actions like clear, switch, and fork.
|
|
6
7
|
- [`context-cap`](./extensions/context-cap): Caps effective model context windows at 200k tokens by default so pi avoids the `dumb zone`; toggle temporarily with `/context-cap`.
|
|
7
8
|
- [`context-inspector`](./extensions/context-inspector): Adds `/context`, a local self-contained HTML dashboard that breaks down where the current session context is going, with category overview, top offenders, and drilldown search.
|
|
8
9
|
- [`dirty-repo-guard`](./extensions/dirty-repo-guard): Prompts before new sessions, session switches, or forks when the current git repo has uncommitted changes.
|
|
10
|
+
- [`gnosis`](./extensions/gnosis): Exposes the `gn` repo-local knowledge base CLI as an agent tool for searching and recording durable project decisions, constraints, and intent.
|
|
9
11
|
- [`inline-bash`](./extensions/inline-bash): Expands `!{command}` snippets in user prompts by running them through bash before the prompt reaches the agent.
|
|
10
12
|
- [`librarian`](./extensions/librarian): Adds a GitHub research scout with a local repo checkout cache enabled by default under the OS user cache directory, toggleable with `/librarian-cache`, with cached repos expiring after 30 days of non-use.
|
|
11
13
|
- [`minimal-footer`](./extensions/minimal-footer): Replaces pi's built-in footer with a minimal configurable two-line layout: branch/repo on the first line, context/model on the second, optional `DUMB ZONE`, plus OpenAI Codex 5-hour and 7-day usage when available.
|
|
12
14
|
- [`notify`](./extensions/notify): Sends configurable terminal, desktop, bell, and sound notifications when pi finishes and is ready for input.
|
|
13
15
|
- [`openai-fast`](./extensions/openai-fast): Adds `/fast` to enable OpenAI Codex Fast mode for ChatGPT-auth GPT-5.4 and GPT-5.5 by injecting the priority service tier.
|
|
14
|
-
- [`oracle`](./extensions/oracle): Adds an Amp-style read-only oracle tool that auto-selects the strongest reasoning model on the current provider/subscription,
|
|
16
|
+
- [`oracle`](./extensions/oracle): Adds an Amp-style read-only oracle tool that auto-selects the strongest reasoning model on the current provider/subscription, supports persisted `/oracle` model/thinking defaults, requests xhigh reasoning by default and clamps to model capabilities, and shows live status while running.
|
|
15
17
|
- [`permission-gate`](./extensions/permission-gate): Prompts for confirmation before dangerous bash commands like `rm -rf`, `sudo`, and `chmod 777`.
|
|
16
18
|
- [`quiet-tools`](./extensions/quiet-tools): Renders collapsed built-in tool rows as a one-line invocation plus an expand hint without changing model-visible tool results; toggle temporarily with `/quiet-tools`.
|
|
17
19
|
- [`todo`](./extensions/todo): Adds a branch-aware `todo` tool for the agent and a `/todos` viewer for users.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# agent-workflow-audit
|
|
2
|
+
|
|
3
|
+
Runs an isolated repo workflow audit from `/agent-workflow-audit`.
|
|
4
|
+
|
|
5
|
+
The extension ports the [`agent-workflow-audit`](https://github.com/diegopetrucci/agent-workflow-audit) skill into a pi slash command. The audit subagent reads the current repository's agent-facing instructions, manifests, and obvious workflow files, tries or plans the documented setup/build/lint/test/run flow, and reports where instructions or scripts waste agent time.
|
|
6
|
+
|
|
7
|
+
## Why an extension instead of only a skill?
|
|
8
|
+
|
|
9
|
+
A normal skill teaches the main agent how to run the audit, so all discovery, command output, failures, and retries enter the main session context. This extension runs that noisy work in an isolated in-memory child session and sends only the final distilled report back to the main session.
|
|
10
|
+
|
|
11
|
+
The final custom message is visible to the main agent and user. Raw child tool transcripts are not added to the main session context.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
### Standalone npm package
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pi install npm:@diegopetrucci/pi-agent-workflow-audit
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Collection package
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pi install npm:@diegopetrucci/pi-extensions
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### GitHub package
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pi install git:github.com/diegopetrucci/pi-extensions
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Then reload pi:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/reload
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
/agent-workflow-audit
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The command asks for confirmation before execution mode because documented project commands may create dependencies, build artifacts, caches, or other local side effects.
|
|
46
|
+
|
|
47
|
+
Options:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
/agent-workflow-audit --plan-only
|
|
51
|
+
/agent-workflow-audit --yes
|
|
52
|
+
/agent-workflow-audit focus on release/check/publish docs
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `--plan-only` reads docs and manifests, then reports the workflow it would try without running project commands.
|
|
56
|
+
- `--yes` skips the interactive confirmation.
|
|
57
|
+
- extra words become focus notes for the audit subagent.
|
|
58
|
+
|
|
59
|
+
## Behavior
|
|
60
|
+
|
|
61
|
+
- Runs a child `createAgentSession` with an in-memory session manager.
|
|
62
|
+
- Disables inherited extensions, skills, prompt templates, themes, and context files in the child.
|
|
63
|
+
- Gives the child `read`, `grep`, `find`, `ls`, and guarded `bash` tools.
|
|
64
|
+
- Returns a single final `agent-workflow-audit` custom message to the parent session.
|
|
65
|
+
- Includes a short run-boundary footer noting that intermediate command output, errors, retries, and search path stayed in the child session.
|
|
66
|
+
|
|
67
|
+
## Safety notes
|
|
68
|
+
|
|
69
|
+
The audit intentionally exercises documented project commands. The runtime guard is conservative: it blocks obvious destructive, publishing, deploy, mutating Git/GitHub, credential-dumping, network shell-installer, path-changing, and source-fixing commands. It may over-block valid workflow commands and report them as manual/friction instead. Project scripts can still create local artifacts, so run it from a checkout where local build/test side effects are acceptable.
|