ask-pro 0.1.0 → 0.1.41

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 (2) hide show
  1. package/README.md +51 -176
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,231 +1,106 @@
1
1
  # ask-pro
2
2
 
3
- `ask-pro` is a Codex plugin, agent skill, and CLI that lets coding agents ask
4
- ChatGPT Pro for a focused second opinion through a human-logged-in browser
5
- session.
6
-
7
- Use it for architecture calls, production-risk reviews, migrations, debugging
8
- strategy, and implementation planning. The calling agent still owns the work:
9
- `ask-pro` collects the consult, stores the answer, and never applies generated
10
- code automatically.
3
+ `ask-pro` gives coding agents a focused ChatGPT Pro second opinion through a
4
+ human-logged-in browser. The calling agent supplies the context and owns the
5
+ result; ask-pro never applies generated code.
11
6
 
12
7
  ## Install
13
8
 
14
- Choose one of these installation paths. Both need Node.js 24+, Chrome, and a
15
- ChatGPT account with Pro access. Browser login is manual.
9
+ Both options need Node.js 24+, Chrome, and a ChatGPT account with Pro access.
10
+ Browser login is manual.
16
11
 
17
12
  ### Codex plugin marketplace
18
13
 
19
- Add this repository as a Codex plugin marketplace:
20
-
21
14
  ```powershell
22
15
  codex plugin marketplace add JJLiebig/ask-pro
23
- ```
24
-
25
- This route needs Git and npm; the cached runner obtains pnpm 11.19 itself.
26
-
27
- Install the plugin or open `/plugins`, install `ask-pro`:
28
-
29
- ```powershell
30
16
  codex plugin add ask-pro@ask-pro
31
17
  ```
32
18
 
33
- Upgrade the plugin manually:
19
+ This route needs Git and npm. The plugin's cached runner downloads pnpm, builds
20
+ outside the plugin cache, and keeps the installed snapshot unchanged. If
21
+ `ask-pro` is not on `PATH`, the skill uses that runner.
34
22
 
35
- ```powershell
36
- codex plugin marketplace upgrade ask-pro
37
- ```
38
-
39
- If the marketplace does not appear after adding or upgrading it, restart Codex.
40
- The repository marketplace exposes the root plugin through a Git-backed plugin
41
- entry, so no manual copy into `~/.codex/plugins/cache` is needed.
42
-
43
- For local development from a checkout:
44
-
45
- ```powershell
46
- pnpm install
47
- pnpm run build
48
- pnpm run plugin:refresh
49
- ```
50
-
51
- `pnpm run plugin:refresh` updates the local Codex plugin cache from the source
52
- checkout. By default it refreshes the installed Git marketplace cache under
53
- `~/.codex/plugins/cache/ask-pro/ask-pro/<version>`, so no separate local
54
- marketplace install is needed for development. Do not edit
55
- `~/.codex/plugins/cache/...` by hand.
56
-
57
- Git marketplace installs cache the source checkout. If `ask-pro` is not on
58
- `PATH`, agents should use the cached runner under
59
- `~/.codex/plugins/cache/<marketplace>/ask-pro/<version>/scripts/run-cached-cli.mjs`.
60
- The runner copies the installed snapshot to a content-addressed runtime under
61
- `$CODEX_HOME/plugin-runtimes/ask-pro/`, then installs, builds, and runs there.
62
- The installed plugin cache remains immutable.
23
+ Update with `codex plugin marketplace upgrade ask-pro`, then restart Codex to
24
+ load the updated skill.
63
25
 
64
26
  ### Skills CLI (Codex and other supported agents)
65
27
 
66
- Install the existing `ask-pro` skill with the [skills CLI](https://github.com/vercel-labs/skills):
28
+ Install the skill and its standalone CLI separately:
67
29
 
68
30
  ```powershell
69
31
  npx skills add JJLiebig/ask-pro
32
+ npm install --global ask-pro
70
33
  ```
71
34
 
72
- This installs the skill in the current project; add `-g` to install it for your
73
- user account. Choose your agent when prompted, or pass `-a codex` (or another
74
- agent supported by the skills CLI). The skill needs a separate `ask-pro` CLI on
75
- `PATH`. Until the first npm release, install it from a Git checkout outside any
76
- agent skills directory. This checkout route also needs Git, npm, and pnpm 11.19+:
77
-
78
- ```powershell
79
- git clone https://github.com/JJLiebig/ask-pro.git ask-pro-cli
80
- cd ask-pro-cli
81
- pnpm install --frozen-lockfile
82
- pnpm run build
83
- npm install --global --ignore-scripts .
84
- ask-pro --version
85
- ```
35
+ The [skills CLI](https://github.com/vercel-labs/skills) installs the skill in
36
+ the current project by default. Add `-g` for a user-wide skill or `-a codex`
37
+ to select Codex; it supports other agents too. The npm CLI runs without Codex's
38
+ plugin cache.
86
39
 
87
- Keep this checkout: the global command links to it. To update, run
88
- `npx skills update`, then update and rebuild the CLI from that checkout:
40
+ Update both parts:
89
41
 
90
42
  ```powershell
91
- git pull --ff-only
92
- pnpm install --frozen-lockfile
93
- pnpm run build
43
+ npx skills update
44
+ npm update --global ask-pro
94
45
  ```
95
46
 
96
- The skills CLI installs only the skill instructions; it does not install the
97
- browser-backed CLI. The standalone CLI works without Codex's plugin cache.
98
- Once the npm package is published, use `npm install --global ask-pro` for the
99
- CLI and `npm update --global ask-pro` to update it.
100
- The browser runtime is developed and exercised on Windows; other operating
101
- systems need their own validation.
47
+ The browser runtime is developed and tested on Windows. Other operating systems
48
+ need validation.
102
49
 
103
- ### Publishing the npm CLI
50
+ ## Browser and session state
104
51
 
105
- The first release needs an authenticated maintainer to publish from a built
106
- checkout. Then configure its npm Trusted Publisher for GitHub Actions:
52
+ ask-pro never asks for, types, reads, or logs passwords, MFA codes, recovery
53
+ codes, session cookies, or raw auth tokens. A new browser profile may need one
54
+ manual ChatGPT login. On Windows, ordinary managed Chrome runs start minimized
55
+ and are hidden; login and recovery restore the window for human action.
107
56
 
108
- ```powershell
109
- npm whoami
110
- pnpm run build
111
- npm publish --ignore-scripts --access public
112
- npm trust github ask-pro --file ci.yml --repo JJLiebig/ask-pro --allow-publish -y
113
- ```
114
-
115
- The trust command authorizes direct `npm publish` from `ci.yml` without a stored
116
- npm token. It requires the first package version to exist on npm already.
117
- After that, the existing CI publishes a unique patch version after every
118
- passing main-branch run. Rerunning an already published CI run skips its version.
119
-
120
- ## Requirements and browser state
121
-
122
- Authentication is manual. `ask-pro` never asks for, types, reads, or logs
123
- passwords, MFA codes, recovery codes, session cookies, or raw auth tokens.
124
-
125
- The default persistent browser profile is:
57
+ The persistent profile lives at `$CODEX_HOME/state/ask-pro/browser-profile`, or
58
+ `~/.codex/state/ask-pro/browser-profile` when `CODEX_HOME` is unset. Existing
59
+ legacy profiles are migrated on first use; see [Windows notes](docs/windows-work.md)
60
+ for copy and recovery details.
126
61
 
127
- ```text
128
- $CODEX_HOME/state/ask-pro/browser-profile
129
- ```
130
-
131
- Without `CODEX_HOME`, this is `~/.codex/state/ask-pro/browser-profile`.
132
- On first use, ask-pro migrates an inactive legacy
133
- `~/.agents/skills/ask-pro/.../browser-profile` to the matching state path. If a
134
- Windows watcher prevents moving or removing it, the verified copy may remain
135
- at the legacy path while the state path becomes authoritative. ask-pro never
136
- merges profiles or later deletes a retained legacy copy.
137
-
138
- Each new profile may need a human login once. On Windows, ordinary managed runs
139
- start minimized; login, resume/recovery, stale-auth, and debug paths stay visible
140
- or are restored for human action.
62
+ Project sessions live under `.ask-pro/sessions/<id>/`. Add `.ask-pro/` to your
63
+ project's `.gitignore`. At each invocation, ask-pro deletes entire session
64
+ directories at least seven days old, regardless of state.
141
65
 
142
- ## Quick Use
66
+ ## Use
143
67
 
144
- Ask for an inline markdown consult:
68
+ Ask for a recoverable repo consult:
145
69
 
146
70
  ```powershell
147
71
  ask-pro --no-temporary --prompt-file question.md --files src --files tests
148
72
  ```
149
73
 
150
- The browser flow selects `Latest`, then `Pro` intelligence automatically.
74
+ ask-pro selects `Latest` with `Pro` intelligence. It has no repo or conversation
75
+ context unless you provide it, so keep the prompt and file bundle focused.
151
76
 
152
- Request generated files only when you really need an implementation package:
77
+ Request generated files only when needed; treat them as data and never execute
78
+ them automatically:
153
79
 
154
80
  ```powershell
155
81
  ask-pro --artifacts --prompt-file implementation-plan.md --files src
156
- ```
157
-
158
- Harvest the answer:
159
-
160
- ```powershell
161
82
  ask-pro --harvest <session-id>
162
83
  ```
163
84
 
164
- ## Agent Guidance
165
-
166
- - Prefer `--prompt-file` for multiline prompts.
167
- - With the Codex plugin, use its cached runner if `ask-pro` is not on `PATH`.
168
- With a skills CLI install, install the standalone CLI above.
169
- - Treat ChatGPT Pro as a cold oracle: it does not know the repo, user, prior
170
- decisions, or Codex thread context unless you include that in the prompt or
171
- attached files.
172
- - Include all material context once: product goal, current state, hard
173
- constraints, evidence, success criteria, and the exact output you need. Omit
174
- unrelated history and repeated instructions.
175
- - Prefer `--no-temporary` for repo advisories, review rounds, large bundles, or
176
- anything where recovery matters.
177
- - Keep bundles focused: relevant source, focused tests, docs that define the
178
- contract, recent changes, and validation status.
179
- - Add `.ask-pro/` to consuming repos' `.gitignore`.
180
- - Treat `INCOMPLETE_ANSWER` / `preamble_without_artifacts` as not done; resume
181
- or rerun with a tighter prompt and bundle.
182
- - Treat generated files and scripts as data only; never execute them
183
- automatically.
184
-
185
- Useful advisory prompt starter:
186
-
187
- ```text
188
- Return final Markdown only, with no preamble or implementation package.
189
- ```
190
-
191
- The CLI wrapper supplies the bundle and uncertainty instructions. Add
192
- task-specific output requirements only when needed, such as severity-ranked
193
- findings for a risk review or recommendation tradeoffs for a design consult.
194
-
195
- ## CLI
196
-
197
- ```text
198
- ask-pro [options] [question...]
199
- ```
200
-
201
- Common options:
202
-
203
- - `--files <pattern>`: add a file, directory, or glob to `CONTEXT.zip`.
204
- - `--prompt-file <path>`: read the question from a UTF-8 file; use `-` for
205
- stdin.
206
- - `--artifacts` / `--response-zip`: ask for `ask-pro-response.zip`.
207
- - `--resume [session-id]`: resume a prepared, waiting, or auth-gated session.
208
- - `--status [session-id]`: print compact session state.
209
- - `--harvest [session-id]`: print `ANSWER.md` for answer-bearing sessions.
210
- - `--temporary`: require ChatGPT Temporary Chat.
211
- - `--no-temporary`: use normal ChatGPT for better recovery.
212
- - `--verbose`: print browser automation diagnostics.
213
-
214
- Session data lives under `.ask-pro/sessions/<session-id>/`. At the start of each
215
- invocation, ask-pro permanently deletes entire session directories at least
216
- seven days old, regardless of status.
85
+ Use `ask-pro --help` for the full CLI. For multiline prompts, use
86
+ `--prompt-file`. Prefer `--no-temporary` when recovery matters; `--temporary`
87
+ requires Temporary Chat. The [skill](skills/ask-pro/SKILL.md) has agent guidance.
217
88
 
218
89
  ## Development
219
90
 
220
- Fast checks:
221
-
222
91
  ```powershell
92
+ pnpm install --frozen-lockfile
223
93
  pnpm run build
224
94
  pnpm run lint
225
- pnpm run test:ask-pro
95
+ pnpm test
226
96
  pnpm run format:check
227
97
  pnpm pack --dry-run
228
98
  ```
229
99
 
230
- Manual browser smokes are opt-in because they open a real ChatGPT session. See
231
- `docs/manual-tests.md`.
100
+ After changing plugin files, run `pnpm run plugin:refresh` and restart Codex.
101
+ Do not edit the installed plugin cache. Live browser tests are opt-in; see
102
+ [manual tests](docs/manual-tests.md).
103
+
104
+ After the build matrix passes on `main`, [CI](.github/workflows/ci.yml) publishes
105
+ a new npm version through the configured trusted publisher, without a stored
106
+ npm token.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ask-pro",
3
- "version": "0.1.0",
3
+ "version": "0.1.41",
4
4
  "description": "Browser-backed ChatGPT Pro escalation for hard engineering questions.",
5
5
  "keywords": [
6
6
  "agents",