prompt-profile 0.1.5 → 0.2.1

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 CHANGED
@@ -1,417 +1,230 @@
1
1
  # prompt-profile
2
2
 
3
- Read your past prompts from AI coding agents (Claude Code, Codex) on your computer, analyse them
4
- with the `claude` or `codex` CLI you are already logged in to, and get a personal profile report.
5
- Reading, cleaning, redaction and the report happen locally; the selected, redacted prompts are sent
6
- through that CLI to its model service and use your subscription quota (no API key).
7
-
8
- ![Synthetic sample share card](https://erictsai83.github.io/prompt-profile/sample-card.png)
9
-
10
- [Sample HTML report](https://erictsai83.github.io/prompt-profile/sample-report.html)
11
- · [Sample profile JSON](https://erictsai83.github.io/prompt-profile/sample-profile.json) (all sample data is hand-written and fictional;
12
- every example is rendered by the current code on each change to `main`).
13
-
14
- ### Example reports
15
-
16
- The same fictional profile, rendered two ways:
17
-
18
- - [Full report](https://erictsai83.github.io/prompt-profile/demo/full/report.html): what you see on your own machine, with prompt
19
- quotes, suggested rewrites, project names, exact dates and fun facts.
20
- - [Shareable report](https://erictsai83.github.io/prompt-profile/demo/without-personal/report.html): the same profile rendered with
21
- `--exclude personal`: no quotes, rewrites or fun facts, projects shown as "Project A, B…",
22
- dates by month. This is what you would post publicly.
23
-
24
- The card never contains prompt quotes. Project names may appear in normal mode;
25
- `--exclude projects` (also included in `--exclude personal`) anonymizes known project names
26
- in both the report and card, including generated identity text. The full report
27
- in every look (`--look`; render only, no new analysis):
28
-
29
- <table>
30
- <tr>
31
- <td width="50%" align="center">
32
- <a href="https://erictsai83.github.io/prompt-profile/demo/full/report.html"><img src="https://erictsai83.github.io/prompt-profile/demo/full/card.png" width="420" alt="Classic card"></a><br>
33
- <a href="https://erictsai83.github.io/prompt-profile/demo/full/report.html">Classic</a> (default)
34
- </td>
35
- <td width="50%" align="center">
36
- <a href="https://erictsai83.github.io/prompt-profile/demo/signal/report.html"><img src="https://erictsai83.github.io/prompt-profile/demo/signal/card.png" width="420" alt="Signal card"></a><br>
37
- <a href="https://erictsai83.github.io/prompt-profile/demo/signal/report.html">Signal</a>
38
- </td>
39
- </tr>
40
- <tr>
41
- <td width="50%" align="center">
42
- <a href="https://erictsai83.github.io/prompt-profile/demo/afterhours/report.html"><img src="https://erictsai83.github.io/prompt-profile/demo/afterhours/card.png" width="420" alt="Afterhours card"></a><br>
43
- <a href="https://erictsai83.github.io/prompt-profile/demo/afterhours/report.html">Afterhours</a>
44
- </td>
45
- <td width="50%" align="center">
46
- <a href="https://erictsai83.github.io/prompt-profile/demo/studio/report.html"><img src="https://erictsai83.github.io/prompt-profile/demo/studio/card.png" width="420" alt="Studio card"></a><br>
47
- <a href="https://erictsai83.github.io/prompt-profile/demo/studio/report.html">Studio</a>
48
- </td>
49
- </tr>
50
- </table>
3
+ Turn your local Claude Code / Codex prompt history into an evidence-backed report of how you
4
+ collaborate with AI. Uses your logged-in `claude` or `codex` CLI: no API key needed.
51
5
 
52
- ## Quick start
6
+ **Analysis sends selected, redacted prompts to your CLI's model service and uses your
7
+ subscription quota.** Reports and analysis caches stay on your computer.
53
8
 
54
- 1. Install [Claude Code](https://claude.com/claude-code) or [Codex](https://github.com/openai/codex)
55
- and log in once (`claude`, or `codex login`). prompt-profile uses it to analyse your prompts;
56
- **no API key needed**.
57
- 2. Run it (Node.js ≥ 24):
9
+ ![Fictional sample share card](https://erictsai83.github.io/prompt-profile/sample-card.png)
58
10
 
59
- ```bash
60
- npx prompt-profile@latest
61
- ```
11
+ [Full report](https://erictsai83.github.io/prompt-profile/sample-report.html)
12
+ · [Shareable report](https://erictsai83.github.io/prompt-profile/demo/without-personal/report.html)
13
+ · [Template gallery](https://erictsai83.github.io/prompt-profile/demo/templates/index.html)
62
14
 
63
- `@latest` makes npx fetch the newest version instead of reusing one it cached earlier.
15
+ All examples use fictional data.
64
16
 
65
- 3. Before anything is sent it shows a summary and asks `Continue?`:
17
+ ## Quick start
66
18
 
67
- ```
68
- ● Range: last 3m · 2026-07-28 → 2026-10-28
69
- In range: Claude Code 1,204 · Codex 311 prompts
70
- 1,515 prompts in 182 sessions after cleaning → 1,515 selected in 24 chunks
71
- No sampling: every chunk is analysed
72
- Read, cleaned and redacted on this computer; the report and analysis cache are written only here.
73
- ● Sent off this computer: the selected, redacted prompts go through your logged-in Claude Code CLI (claude -p) to its model service
74
- No API key: uses your subscription quota, base estimate 25 calls (24 chunks + 1 final profile)
75
- Intermediate merges and retries (up to 2 per call) can add calls.
76
- No hard limit: add --max-calls <n> to stop after n CLI calls.
77
- Free first: --dry-run writes what would be sent without calling any LLM; `prompt-profile stats` shows statistics.
78
- ```
19
+ You need Node.js ≥ 24 and either [Claude Code](https://claude.com/claude-code) or
20
+ [Codex](https://github.com/openai/codex) installed and logged in.
79
21
 
80
- (Illustrative numbers.) The calls use your Claude / ChatGPT subscription quota.
22
+ ```bash
23
+ npx prompt-profile@latest
24
+ ```
81
25
 
82
- 4. When it is done, the report opens in your browser. Everything is written to
83
- `./prompt-profile-report/`.
26
+ The CLI shows the selected history and estimated calls, then asks for confirmation before
27
+ sending anything. By default it analyses the last two months and opens the finished report
28
+ in your browser. Files are saved under `./prompt-profile-report/`.
84
29
 
85
- ### Look first, for free
30
+ To inspect your history without calling an LLM (no login required):
86
31
 
87
- - `npx prompt-profile@latest --dry-run` prints the same summary, then writes the exact chunks that
88
- would be sent to `--out` (`chunks/*.txt`, `plan.json`) and calls no LLM. The chunks are your
89
- redacted prompt text: keep them private and delete them when done.
90
- - `npx prompt-profile@latest stats` shows statistics; nothing leaves your computer.
32
+ ```bash
33
+ npx prompt-profile@latest stats # local statistics only
34
+ npx prompt-profile@latest --dry-run # export the redacted chunks that would be sent
35
+ ```
91
36
 
92
- Both work without a logged-in CLI.
37
+ Dry-run exports contain your prompt text: keep them private and delete them when done.
38
+ The call estimate is not an upper bound; use `--max-calls` to cap CLI invocations, including
39
+ merges, evidence review and retries.
93
40
 
94
41
  ## Install
95
42
 
43
+ To install or update a global command:
44
+
96
45
  ```bash
97
- npx prompt-profile@latest # run without installing (always the newest version)
98
- npm i -g prompt-profile # or install the `prompt-profile` command
46
+ npm i -g prompt-profile@latest
99
47
  prompt-profile --help
100
- npm i -g prompt-profile@latest # update the installed command
101
48
  ```
102
49
 
103
- No Node.js? Every [GitHub Release](https://github.com/EricTsai83/prompt-profile/releases) has a
104
- standalone executable for macOS (`darwin-arm64` for Apple silicon, `darwin-x64`), Linux
105
- (`linux-x64`, `linux-arm64`) and Windows (`windows-x64`), with a `SHA256SUMS` file. Download the
106
- archive for your platform from the release page, then:
50
+ Without Node.js, download a standalone executable for macOS, Linux or Windows from
51
+ [GitHub Releases](https://github.com/EricTsai83/prompt-profile/releases).
52
+ See the [standalone installation guide](https://github.com/EricTsai83/prompt-profile/blob/main/docs/user-guide.md#standalone-installation)
53
+ for extraction and macOS setup.
107
54
 
108
- ```bash
109
- tar -xzf prompt-profile-<version>-darwin-arm64.tar.gz
110
- ./prompt-profile-<version>-darwin-arm64/prompt-profile
111
- # macOS, if the archive was downloaded with a browser (the binary is not notarised):
112
- xattr -d com.apple.quarantine ./prompt-profile-<version>-darwin-arm64/prompt-profile
113
- ```
55
+ ## What you get
114
56
 
115
- On Windows, `tar -xzf` works in PowerShell too; run `prompt-profile.exe` from the extracted
116
- folder. Move the executable to a folder on your `PATH` to run it as `prompt-profile`.
57
+ - **HTML report**: an offline portrait of your collaboration preferences, supported observations
58
+ and prompt suggestions, plus activity charts, workflow techniques and source evidence.
59
+ - **PNG share cards**: a 1200 × 630 card per language, without prompt quotes.
60
+ - **`profile.json`**: the data used to render the report again without another analysis.
61
+ - **Local history**: successful analyses are kept in a report library; open the output folder's
62
+ `index.html` to browse them.
117
63
 
118
- ## Requirements
64
+ Reports support English and Traditional Chinese; quotes stay in their original language.
65
+ The default is English, or both languages on a Chinese system locale. Each extra language
66
+ normally uses one translation call, with one retry for an incomplete or failed translation.
67
+ A Chinese-only request stops if translation still fails; it does not substitute an English report. To export a PDF, use your browser's Print → Save as PDF.
119
68
 
120
- - Node.js ≥ 24, or the standalone executable (no Node.js needed)
121
- - [Claude Code](https://claude.com/claude-code) (`claude`) or [Codex](https://github.com/openai/codex)
122
- (`codex`) installed and logged in
123
- - **No API key needed**: the analysis runs your own logged-in `claude -p` or `codex exec` in the
124
- background and **uses your subscription quota**. The base call estimate is shown
125
- before confirmation. Intermediate merges and up to two retries per call can add calls;
126
- use `--max-calls` to set a hard limit on CLI invocations, including retries.
69
+ Observations cite verified prompt quotes, but quote matching and model review do not prove an
70
+ interpretation is correct. Small histories may show “Early observations” instead of a role.
71
+ The [radar](docs/ability-scores.md) assesses six AI collaboration abilities from verified quotes in these conversations. Scores describe supported practice, not psychological traits or population ranks; “not assessed” is not a low score.
127
72
 
128
- ## What you get
73
+ New analyses also retain [reusable instruction provenance](docs/instruction-provenance.md): what a skill is documented to do, who selected it for the task, and which historical requirements were supplied.
129
74
 
130
- The CLI writes HTML, `profile.json`, and `card*.png`; it does not automatically export PDF.
131
- For a static PDF, open `report.html`, select a language, then use your browser’s Print → Save
132
- as PDF. Printing includes both report views in that language. The offline HTML stays interactive;
133
- both formats use the same profile without another analysis call. Files in `output/pdf/` are
134
- fictional development review exports, not automatic CLI outputs.
135
-
136
- Written to `./prompt-profile-report/` (change it with `--out`):
137
-
138
- - `report.html`: your private, single-file report that works offline, with two pages:
139
- - **Who they are** (opens first): archetype, up to three observations with medium or high
140
- confidence each with one of your own prompts, observed collaboration preferences, the portrait story with its quotes,
141
- and fun facts
142
- - **Facts & evidence**: every measurement with its source and denominator: four measured
143
- habits with their definitions, tool and prompt-wording shares, a daily calendar and a
144
- weekday × hour heatmap (hover or tap for the count and main projects), project chapters,
145
- all traits with their quotes and how widely they are supported, the evidence for and
146
- against each preference, the five dimensions and how it was measured
147
- - **how you work with AI** (facts page): a capability map (plan, delegate, extend, verify,
148
- ship) with the skills you used and what each does, subagent types, MCP servers, models,
149
- pull requests, parallel sessions and prompt-writing habits; counted from tool metadata and
150
- the skill descriptions recorded in your transcripts, never tool inputs, outputs or skill
151
- arguments
152
- - **how you steer the AI** (facts page): in how many of the analysed conversations with
153
- follow-ups you redirected the AI's approach, and separately how often you asked it to fix a
154
- broken result, with examples; one-shot requests are not counted against you
155
- - **how to improve your prompts** (facts page): 2–4 suggestions, each with a real prompt of
156
- yours and a suggested rewrite, plus signals such as very short
157
- follow-ups, and what changed since your last report
158
- - **usage during this period** (facts page only): Claude Code and Codex side by side with
159
- the plan each runs on, tokens by kind, the share of each tool, months and models, and the
160
- **API list-price equivalent** in USD. Detailed breakdowns stay here; the card can show a
161
- compact token total and API estimate. The "Who they are" page does not show usage
162
- - a language switch when there is more than one language
163
-
164
- It shows everything by default, quotes and project folder names included. To share it, leave
165
- parts out with `--exclude` (below).
166
-
167
- - `card.png`: a 1200 × 630 share card in the default language, plus `card.<lang>.png` for each
168
- other language (**omits evidence quotes**). Includes the introduction, up to two supported
169
- behaviors, prompt/conversation counts, token usage and an API estimate in USD. Missing and
170
- partial pricing are labeled; `--exclude usage` removes usage from HTML and PNG.
171
- `--card-hide stats` hides the card’s measured summary
172
- - `profile.json`: the raw profile data (re-create the report with `prompt-profile render`)
173
-
174
- ### Leaving parts out
175
-
176
- `--exclude` (on the main command and on `render`) takes a comma list:
177
-
178
- | Part | Left out |
179
- | -------------- | ---------------------------------------------------------------------------------------------------- |
180
- | `quotes` | Evidence quotes and the before / after rewrites |
181
- | `projects` | Project names, shown as "Project A, B…", also inside the generated text and on the card |
182
- | `dates` | Exact dates: no daily calendar, the data period by month |
183
- | `coaching` | "Improve your prompts" and "since your last report" |
184
- | `funfacts` | Fun facts |
185
- | `custom-names` | Names and descriptions of your own skills, custom agent types and private MCP servers (only counted) |
186
- | `usage` | Plans, token counts and API list-price equivalents |
187
- | `personal` | All of the above |
75
+ ## Usage
188
76
 
189
77
  ```bash
190
- prompt-profile render prompt-profile-report/profile.json --exclude personal
191
- # → prompt-profile-report/variants/classic-without-personal/report.html; the full report is kept
78
+ prompt-profile --since 6m # 1m / 2m (default) / 3m / 6m / 1y / all
79
+ prompt-profile --engine codex # default: auto, Claude Code first
80
+ prompt-profile --model <name> # choose the analysis model
81
+ prompt-profile --max-calls 60 # cap CLI calls, including retries
82
+ prompt-profile --engine claude --max-cost-usd 1.50 # local stop threshold; may overshoot
83
+ prompt-profile --lang zh-TW,en # first language is the default
84
+ prompt-profile --voice first # I/我; second (you/你) is the default
85
+ prompt-profile --out <dir> # choose the output folder
86
+
87
+ prompt-profile render profile.json --look prism # change the look without LLM calls
88
+ prompt-profile cache clear # delete analysis cache entries
89
+ prompt-profile history --executions # list saved execution records (free)
192
90
  ```
193
91
 
194
- ### The final check
92
+ Seven looks are available: classic (default), signal, afterhours, studio, prism, slate and folio.
93
+ Rendering a new look keeps the original report. Use `--card-hide stats` to hide the card's
94
+ measured summary, or `--avatar` to choose its illustration.
195
95
 
196
- Before anything is written, every displayed text of the profile (generated text, quotes,
197
- rewrites, names, skill descriptions) is checked with the same rules that redact prompts before
198
- the LLM sees them. The terminal says where and which rule — never the matched text:
96
+ See the [user guide](https://github.com/EricTsai83/prompt-profile/blob/main/docs/user-guide.md)
97
+ for all documented options, language behavior, history and recovery. If a run stops, follow the
98
+ printed retry command: completed chunks and merges are cached; later steps may use quota again.
199
99
 
200
- ```
201
- Contains 34 quotes · 8 project names · exact dates · 4 improvements · 3 fun facts
202
- Check 2 masked: email (Traits › 2), home-path (Fun facts › 1)
203
- Before sharing, skim the quotes yourself: the check is rule-based.
204
- ```
100
+ Each analysis saves calls, retries, cache reuse, token coverage and cost provenance, including
101
+ failed executions. The report shows generation usage separately from historical activity.
102
+ See [execution accounting](docs/execution-accounting.md) for recovery, unknown measurements
103
+ and cost-threshold limits.
205
104
 
206
- | | Rules | `--check mask` (default) | `--check warn` | `--check strict` |
207
- | ------------- | ------------------------------------------------------------------------------------------------------- | ------------------------ | -------------- | ------------------------ |
208
- | Secrets | private keys, API tokens, JWTs, bearer tokens, connection strings, `password=`… , random-looking tokens | masked | masked | nothing written (exit 1) |
209
- | Personal data | email, home path, username, internal URL, phone, Taiwan ID, credit card | masked | kept, listed | nothing written (exit 1) |
105
+ ## How much a run uses
210
106
 
211
- `--allow email,phone` skips personal rules (e.g. a public address you want shown); secrets can
212
- never be allowed. The masked profile is what is written: `profile.json`, the report and the
213
- cards agree.
107
+ A run reads everything locally, then analyses a **sample** of the selected history: about
108
+ 20–26 chunks of redacted prompts (roughly 700k characters) once the history is larger than
109
+ that. Time, tokens and cost therefore stop growing with history size; `--full` analyses every
110
+ chunk and scales with the history instead. `--dry-run` prints your own estimate for free.
214
111
 
215
- ## Usage
112
+ ### Measured runs
216
113
 
217
- ```bash
218
- prompt-profile # analyse the last 3 months and write the report
219
- prompt-profile --since 3m # 1m / 3m / 6m / 1y / all (also <n>d, <n>w)
220
- prompt-profile --engine codex # which CLI analyses your prompts (default: auto, Claude Code first)
221
- prompt-profile --model <name> # model passed to claude / codex
222
- prompt-profile --effort medium # reasoning effort: low / medium / high / xhigh / max (default: the CLI's)
223
- prompt-profile --out <dir> # output folder
224
- prompt-profile --max-calls 40 # cap CLI invocations, including merges and retries
225
- prompt-profile --full # no sampling, analyse everything (slower, uses more quota)
226
- prompt-profile --no-cache # do not read the analysis cache
227
- prompt-profile --yes # skip the confirmation (required in non-interactive sessions)
228
- prompt-profile --dry-run # free: the summary, plus what would be sent written into --out
229
- prompt-profile --verbose # full errors and LLM call timings
230
- prompt-profile --lang zh-TW,en # report languages, the first is the default (en, zh-TW)
231
- prompt-profile --look signal # classic (default) / signal / afterhours / studio / prism / slate / folio
232
- prompt-profile --card-hide stats,graphic # leave traits / stats / graphic out of card.png
233
- prompt-profile --name Eric # title the report "Eric’s prompt profile" (not stored in profile.json)
234
-
235
- prompt-profile stats # statistics only, no LLM (free and fast)
236
- prompt-profile render profile.json # re-create the report from an existing profile.json
237
- prompt-profile cache clear # delete the analysis cache
238
-
239
- prompt-profile render profile.json --look studio --card-hide stats
240
- # a new look, written to variants/studio-no-stats/
241
- ```
114
+ One real history, default settings (last 2 months, sampled, report in Traditional Chinese
115
+ and English), measured on 2026-11-01 with both engines on the same input:
242
116
 
243
- Looks and `--card-hide` only change how the report and card are drawn: no new analysis and no
244
- LLM calls, and the original report is kept. `--card-hide` changes the share card only; the
245
- private report and `profile.json` still contain everything, including quotes. The card never
246
- contains prompt quotes in any look. Project names follow the same `--exclude projects` choice
247
- as the report.
248
-
249
- Languages: without `--lang`, a Chinese system locale gives a Traditional Chinese report with an
250
- English switch (`zh-TW,en`); any other locale gives English. The profile is written in English
251
- and then translated, one extra CLI call per extra language; quotes stay as you wrote them.
252
-
253
- Exit codes: `0` success · `1` error · `2` usage / needs `--yes` · `3` no data · `4` no usable LLM
254
- CLI · `5` rate limited · `130` interrupted (a re-run resumes from the cache).
255
-
256
- ## Small histories and stopped runs
257
-
258
- **Small histories.** A role, featured observations and prompt coaching each need verified quotes
259
- from at least two sessions (the same rule that sets trait confidence and preference axes). When
260
- nothing in a profile reaches that, the report is titled "Early observations": it states how many
261
- prompts and sessions it is based on, keeps the observations, five dimensions and measurements,
262
- and leaves out the generated role and the "Improve your prompts" section. The card does the same.
263
- The terminal says so after the run; a longer `--since` range or more history adds evidence.
264
-
265
- **If a run stops.** Progress is shown by phase (chunks, merges, the final profile, verification,
266
- translations, writing files); there is no time estimate. When a run stops early, the error says
267
- what was saved and prints the exact command to run again:
268
-
269
- | What happened | What is saved | What a re-run does |
270
- | --------------------------------------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------- |
271
- | Ctrl-C, rate limit, timeout, malformed output, too many failed chunks | Finished chunk results in the analysis cache; no report | Reuses cached chunks and merges; the final profile and translations run again |
272
- | `--max-calls` reached | Same; cached results do not use the budget again | Same; raise `--max-calls` if it stops again |
273
- | The final profile step failed | Chunk results | Repeats only the final profile and translation calls |
274
- | An intermediate merge failed (large histories) | Chunk results and finished merges | Repeats the unfinished merges, then the final profile and translations |
275
- | A translation failed | The report, without that language | The printed command adds it (final profile + translation) |
276
- | A card was not created (e.g. the Chinese font download failed) | The report and `profile.json` | `prompt-profile render <profile.json>` retries the cards, no analysis |
277
-
278
- The re-run command keeps your flags and leaves out `--no-cache`, so it reads the cache. When
279
- prompt-profile was started with npx, the printed commands start with `npx prompt-profile@<version>`
280
- (the same version, so the cache matches); otherwise with the installed `prompt-profile`.
281
- A CLI's own error message can quote what it was sent, so it is shown only with `--verbose`.
282
-
283
- ## Privacy
284
-
285
- **Files read** (read-only):
286
-
287
- | Source | Paths (override with an environment variable) |
288
- | ----------- | ------------------------------------------------------------------------------------------------------------------ |
289
- | Claude Code | `~/.claude/projects/*/*.jsonl`, `~/.claude/history.jsonl` (`CLAUDE_CONFIG_DIR`) |
290
- | Codex | `~/.codex/sessions/**/rollout-*.jsonl` (and zstd-compressed `.jsonl.zst`), `~/.codex/history.jsonl` (`CODEX_HOME`) |
291
-
292
- **Usage and plan** (the "Usage during this period" section): token counts and model names from
293
- the same logs (Claude Code subagent transcripts in `projects/*/*/subagents/` included), the plan
294
- from `claude auth status --json` (`subscriptionType` only), an undocumented rate-limit hint from
295
- `~/.claude.json` (`oauthAccount.userRateLimitTier` only), and the ChatGPT plan type from
296
- `~/.codex/auth.json`, decoded locally from the id token's payload. No token, API key, email,
297
- account or organization id is stored, cached, logged or sent; a missing or unreadable file gives
298
- "unknown", never an error. Usage, plans and amounts stay on your machine: they are not sent to
299
- the LLM. Amounts are computed from an embedded list-price table (no download) and are an **API
300
- list-price equivalent**: what the usage would cost on the public API, not what you paid. Neither
301
- provider offers a way to read a subscription's usage as a bill, so this is how every local usage
302
- tool works (Claude Code's own session cost does the same); responses in fast mode (Claude
303
- `speed: "fast"`, Codex priority) use the fast-mode list prices, and a model or tier without a
304
- listed price stays "unknown" rather than being estimated.
305
-
306
- **Prompt selection and preprocessing**: adapters select user prompts, excluding recognized system
307
- messages, tool output and sub-agent conversations, then:
308
-
309
- - pasted code / logs are collapsed into `[pasted code: N lines]`
310
- - API keys, tokens, passwords, private keys, connection strings, emails, phone numbers, national
311
- IDs, credit card numbers, internal URLs, UUIDs / hashes, home-folder paths and usernames that
312
- match the supported rules are redacted **before** anything is sent (and before long
313
- prompts are shortened); this is best-effort, not a guarantee that every secret is found
314
- - projects are reduced to their folder name, never the full path
315
- - `prompt-profile --dry-run` previews selected map chunks; generated observations, statistics
316
- used by the final step, system instructions and retry messages are not a complete network dump
317
-
318
- Selected, cleaned and redacted prompt text is sent **off your machine** through your logged-in
319
- CLI to its model service, along with project basenames. Intermediate observations, supporting
320
- quotes and prompt statistics are sent during merge/final analysis. Text that does not match a
321
- redaction rule can remain unchanged, including names and confidential prose.
322
-
323
- Reports, `profile.json`, dry-run exports and analysis caches are written locally and are not
324
- uploaded by prompt-profile. They can contain personal information. Created folders use `0700`
325
- and files use `0600`; existing folder permissions are not changed. `cache clear` removes analysis
326
- entries only, and reports deletion errors rather than claiming success. Delete reports and dry-run
327
- exports separately when no longer needed.
328
-
329
- Claude runs with safe mode, tools disabled, strict MCP configuration and disabled hooks. Codex
330
- runs with `--ignore-user-config`, disabled hooks/notifications, a read-only sandbox and an ephemeral
331
- session. Codex still uses your existing login, but user-configured providers and model defaults
332
- are ignored; specify the model with `--model`. Both use fresh temporary working folders.
333
- Administrator policy, environment settings and CLI/provider diagnostics can still apply. These
334
- controls are tested on specific versions, and do not promise zero CLI/provider logs or traffic.
335
- See [runner notes](src/llm/NOTES.md) and the [security policy](SECURITY.md).
336
-
337
- prompt-profile has no telemetry. The report makes no network requests and its fonts ship with
338
- the package. The one exception is the Chinese share card: on first use it downloads Noto Sans TC
339
- (about 11 MB, from a pinned GitHub commit), checks its SHA-256 and caches it; no prompt data is
340
- sent. The borrowed CLI manages its own network requests and provider data retention.
117
+ | Input | |
118
+ | ------------------ | --------------------------------------------------------------------- |
119
+ | History in range | 4,374 prompts in 613 conversations (Claude Code and Codex) |
120
+ | Analysed (sampled) | 1,499 prompts in 252 conversations: 21 of 68 chunks, ~665k characters |
341
121
 
342
- ## FAQ
122
+ | | Claude Code | Codex |
123
+ | ------------------------- | ---------------------------------- | ------------------------------ |
124
+ | Model | `claude-opus-5-5` (default effort) | `gpt-6.1-sol` (default effort) |
125
+ | CLI calls | 48 (no retries) | 48 (no retries) |
126
+ | Wall time | 25 min | 20.5 min |
127
+ | Tokens in / out | 1.46M / 0.38M | 1.73M / 0.29M |
128
+ | API list-price equivalent | **US$13.8** (reported by the CLI) | **≈ US$6.1** (estimated¹) |
343
129
 
344
- **How much quota does it use?** By default at most 30 chunks (about 40,000 characters each) are
345
- analysed, plus intermediate merges for large histories and one final call. Each call may retry
346
- twice. The displayed count is a base estimate, not an upper bound; `--max-calls` limits total CLI
347
- invocations rather than tokens, provider requests or money.
348
- Chunks analysed before are read from the cache on the next run.
130
+ ¹ Codex does not report which model answered, so prompt-profile leaves its cost unpriced; the
131
+ estimate applies `gpt-6.1-sol` list prices to the measured tokens and leaves out cache writes,
132
+ which the Codex log does not report.
349
133
 
350
- **Can I use an API key?** Not at the moment: by design it only borrows your logged-in CLI.
134
+ With a subscription these calls use your plan's quota; the dollar figures are what the same
135
+ tokens would cost on the API, not a bill. Another model, `--effort` level or history mix will
136
+ change them.
351
137
 
352
- **Is the report accurate?** Every trait and dimension cites quotes from your prompts, and the
353
- program checks that each quote really exists in them. Invalid and duplicate quotes are removed;
354
- multiple excerpts of one prompt do not count as independent support, and high-confidence traits
355
- require support from multiple sessions. Quote matching does not prove the interpretation is correct.
356
- Dimensions without verified quotes are marked as insufficiently supported.
138
+ The measured costs above include 21 label calls that new runs no longer make. New costs have not yet been measured.
357
139
 
358
- **Why are some prompts not counted?** Short acknowledgements ("ok", "continue"), resent duplicates,
359
- notifications sent by the tools themselves, long templates repeated across sessions, and slash
360
- commands of sessions that contain nothing else (scripts and tools) are excluded. Each run shows
361
- how many were excluded.
140
+ Historical breakdown (before ability scoring; the label stage below has now been removed):
362
141
 
363
- **My prompts are not in English.** That is fine: prompts in any language are analysed (Chinese
364
- gets extra handling for acknowledgements and corrections). The report comes in English and
365
- Traditional Chinese (`--lang`, see [Usage](#usage)); quotes stay in their original language.
142
+ | Stage | Calls | What it does | Share of cost (Claude / Codex) |
143
+ | -------------- | -------------------- | -------------------------------------------------------- | ------------------------------ |
144
+ | map | 1 per chunk | reads the redacted prompts and writes cited observations | 52% / 57% |
145
+ | merge | 0–3 | condenses observations when there are too many | 10% / 9% |
146
+ | draft + review | 2 | writes the profile, then checks it against the evidence | 13% / 10% |
147
+ | label | 1 per chunk | counts how often each trait shows (the trait radar) | 24% / 24% |
148
+ | translation | 1 per extra language | translates the generated text | 1% / 1% |
366
149
 
367
- prompt-profile is not affiliated with or endorsed by Anthropic or OpenAI.
150
+ ### Scale reference
368
151
 
369
- ## Development
152
+ Current base call estimates for the same history at different `--since` ranges (from `--dry-run`, so
153
+ merges and retries come on top):
370
154
 
371
- See [CONTRIBUTING.md](CONTRIBUTING.md), [AGENTS.md](AGENTS.md) and [plans/](plans/README.md).
372
- CI covers Linux (Node.js 22/24) and macOS (Node.js 24); Windows is unverified.
373
- CLI behavior was checked with Claude Code 2.1.309 and codex-cli 0.164.0; upgrade the CLI if an
374
- isolation flag is not recognized. `pnpm test:package` checks the installed npm tarball, including
375
- bundled prompts, fonts, WASM rendering and file permissions.
155
+ | Range | Prompts after cleaning | Conversations | Chunks analysed / total | Base calls |
156
+ | ------------------ | ---------------------- | ------------- | ----------------------- | ---------- |
157
+ | 2 days | 392 | 29 | 10 / 10 (no sampling) | 13 |
158
+ | 1 week | 1,278 | 195 | 16 / 34 | 19 |
159
+ | 2 weeks | 1,690 | 241 | 18 / 40 | 21 |
160
+ | 1 month | 3,132 | 448 | 23 / 60 | 26 |
161
+ | 2 months (default) | 4,038 | 611 | 21 / 68 | 24 |
162
+ | 6 months | 7,605 | 1,629 | 26 / 111 | 29 |
163
+ | All (7 months) | 7,884 | 1,686 | 25 / 115 | 28 |
376
164
 
377
- ## License
165
+ As a rule of thumb, a sampled run costs about one call per analysed chunk plus a handful, and
166
+ time and cost follow the number of analysed chunks: a history of a few hundred prompts takes
167
+ about half of the measured run above, and anything past ~1,300 prompts costs about the same.
168
+ `--full` on the 6-month history would analyse 111 chunks, about five times the measured run.
378
169
 
379
- MIT
170
+ ## Sharing and privacy
380
171
 
381
- ### Collaboration portraits
172
+ **Reports include quotes, project names and exact dates by default.** Cards omit quotes, but
173
+ can still include project names and usage. Create a version with personal sections left out:
382
174
 
383
- Reports have two locally switchable views: a chart-led overview of collaboration preferences,
384
- workflow techniques and activity; and a detailed third-person portrait for readers who may not
385
- know the person, with interactions, supporting quotes, skill descriptions and suggestions.
386
- Evidence is expanded by default. Language and view switches work offline without JavaScript;
387
- printing includes both views.
388
- Quotes are verified against redacted prompts. Only the user's side of an interaction is
389
- available; requests do not prove successful outcomes. Statistics and contextual observations
390
- remain available alongside the narrative in their respective views. Older profiles remain renderable.
175
+ ```bash
176
+ prompt-profile render prompt-profile-report/profile.json --exclude personal
177
+ ```
391
178
 
392
- Four original preference axes describe how the person starts (define/explore), paces work
393
- (stepwise/whole task), assigns decisions (direct/delegate), and converges (criteria/refinement).
394
- A complete combination receives a stable role name. Each preference needs verified evidence
395
- from at least two sessions; contradictory or insufficient evidence stays unresolved, and no
396
- complete role is assigned. These are contextual observations, not psychological assessments,
397
- ability scores or a validated personality instrument. The system is independent of MBTI.
179
+ For a profile in the report library, use the current profile path printed by the CLI.
180
+ The full report is kept; review the exported files before sharing them. Individual exclusions
181
+ such as `quotes`, `projects` and `usage` are also available.
182
+
183
+ - Source histories are read only. Recognized system messages and tool output are excluded;
184
+ pasted code and logs are collapsed before analysis.
185
+ - Supported secrets and personal information are redacted before sending, and report text is
186
+ checked again before writing. These rules can miss confidential prose or unrecognized secrets.
187
+ - Selected prompts, project folder names, intermediate observations and prompt statistics go to
188
+ the model service through your CLI. Token usage, plans and API price estimates stay local;
189
+ price estimates are not your subscription bill.
190
+ - Reports, dry-run exports and caches are local files that can contain personal information.
191
+ Clearing the cache does not delete reports or dry-run exports.
192
+ - prompt-profile has no telemetry. Reports work offline. The Chinese PNG card downloads a
193
+ verified font on first use; the borrowed CLI manages its own network traffic and retention.
194
+
195
+ See [privacy details and output checks](https://github.com/EricTsai83/prompt-profile/blob/main/docs/user-guide.md#privacy)
196
+ for source paths, permissions, CLI isolation and redaction controls.
398
197
 
399
- Re-analyse to generate the new portrait; rendering an older profile does not create new
400
- analysis. `pnpm dev:report` renders an entirely fictional portrait for local inspection.
198
+ ## FAQ
401
199
 
402
- ### Choose a report template
200
+ **Can I use an API key?** No; analysis uses your logged-in Claude Code or Codex CLI.
403
201
 
404
- - **Prism** puts supported signature behaviors above a clear visual overview.
405
- - **Slate** combines a compact identity workspace with precise activity charts.
406
- - **Folio** gives the portrait and evidence a quieter, connected reading rhythm.
202
+ **Why are some prompts excluded?** Short acknowledgements, resent duplicates, recognized tool
203
+ notifications, repeated templates and command-only sessions are filtered. Each run shows counts.
407
204
 
408
- Each includes a matching 1200 × 630 card. [Browse fictional examples](https://erictsai83.github.io/prompt-profile/demo/templates/index.html).
409
- Existing looks and the classic default remain available. Change presentation without reanalysis:
205
+ **Can it analyse other languages?** Yes. Report text supports English and Traditional Chinese;
206
+ source prompts can be in any language.
410
207
 
411
- ```bash
412
- prompt-profile render profile.json --look prism
413
- prompt-profile render profile.json --look slate
414
- prompt-profile render profile.json --look folio --card-hide stats
415
- ```
208
+ ## Development
209
+
210
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, checks and releases, and
211
+ [AGENTS.md](AGENTS.md) for architecture and repository rules.
212
+
213
+ ## License
214
+
215
+ MIT. Not affiliated with or endorsed by Anthropic or OpenAI.
216
+
217
+ ### Narration voice
218
+
219
+ `--voice first|second` controls generated descriptive prose in every report language
220
+ and card. It is independent of `--look`. Second person (`you` / `你`) is the default; first
221
+ person uses `I` / `我`.
222
+ Quotes retain their original wording, and suggested sample prompts keep their intended speaker.
416
223
 
417
- The card hiding options affect only the card; report exclusions remain available through `--exclude`.
224
+ The selected voice is stored as `profile.voice` and shown in the report. First-person text is
225
+ an AI-authored draft; review it before presenting its claims as your own. Rerun the analysis
226
+ with another `--voice` to generate a coherent version; source-evidence map caches can be reused.
227
+ Changing voice does not add analysis stages or subscription calls beyond the normal run.
228
+ `render` preserves stored prose and voice without calling an LLM; it does not offer a voice
229
+ override or replace pronouns. Legacy profiles without voice metadata retain their original text
230
+ and do not receive an inferred voice label. Interface instructions still address the reader.