prompt-profile 0.1.2 → 0.1.4

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 (3) hide show
  1. package/README.md +22 -5
  2. package/dist/bin.js +78 -91
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -21,11 +21,28 @@ The author's own report, from about 1,700 real prompts over six months, publishe
21
21
  The share card is the same for both: it never contains quotes or project names. The full report
22
22
  in every look (`--look`; render only, no new analysis):
23
23
 
24
- | [Classic](https://erictsai83.github.io/prompt-profile/demo/full/report.html) (default) | [Signal](https://erictsai83.github.io/prompt-profile/demo/signal/report.html) |
25
- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
26
- | ![Classic card](docs/demo/card.png) | ![Signal card](docs/demo/signal/card.png) |
27
- | [Afterhours](https://erictsai83.github.io/prompt-profile/demo/afterhours/report.html) | [Studio](https://erictsai83.github.io/prompt-profile/demo/studio/report.html) |
28
- | ![Afterhours card](docs/demo/afterhours/card.png) | ![Studio card](docs/demo/studio/card.png) |
24
+ <table>
25
+ <tr>
26
+ <td width="50%" align="center">
27
+ <a href="https://erictsai83.github.io/prompt-profile/demo/full/report.html"><img src="docs/demo/card.png" width="420" alt="Classic card"></a><br>
28
+ <a href="https://erictsai83.github.io/prompt-profile/demo/full/report.html">Classic</a> (default)
29
+ </td>
30
+ <td width="50%" align="center">
31
+ <a href="https://erictsai83.github.io/prompt-profile/demo/signal/report.html"><img src="docs/demo/signal/card.png" width="420" alt="Signal card"></a><br>
32
+ <a href="https://erictsai83.github.io/prompt-profile/demo/signal/report.html">Signal</a>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <td width="50%" align="center">
37
+ <a href="https://erictsai83.github.io/prompt-profile/demo/afterhours/report.html"><img src="docs/demo/afterhours/card.png" width="420" alt="Afterhours card"></a><br>
38
+ <a href="https://erictsai83.github.io/prompt-profile/demo/afterhours/report.html">Afterhours</a>
39
+ </td>
40
+ <td width="50%" align="center">
41
+ <a href="https://erictsai83.github.io/prompt-profile/demo/studio/report.html"><img src="docs/demo/studio/card.png" width="420" alt="Studio card"></a><br>
42
+ <a href="https://erictsai83.github.io/prompt-profile/demo/studio/report.html">Studio</a>
43
+ </td>
44
+ </tr>
45
+ </table>
29
46
 
30
47
  ## Quick start
31
48
 
package/dist/bin.js CHANGED
@@ -1302,7 +1302,7 @@ const fileCacheLayer = (dir) => Layer.effect(AnalysisCache, Effect.gen(function*
1302
1302
  * Package version. Injected by tsdown at build time; during development and tests
1303
1303
  * (tsx / vitest) it falls back to reading package.json.
1304
1304
  */
1305
- const VERSION = "0.1.2";
1305
+ const VERSION = "0.1.4";
1306
1306
  // src/cli/errors.ts
1307
1307
  /** No prompts found at all, or none in the selected range. */
1308
1308
  var NoData = class extends Data.TaggedError("NoData") {};
@@ -2690,7 +2690,7 @@ const LOOKS = [
2690
2690
  ];
2691
2691
  /** The look's data, or null for `classic`. */
2692
2692
  const lookOf = (id) => LOOKS.find((l) => l.id === id) ?? null;
2693
- /** Colors of the classic report (no look); the classic card uses the light ones. */
2693
+ /** Colors of the classic report (no look); the classic card uses the dark ones. */
2694
2694
  const CLASSIC_TOKENS = {
2695
2695
  light: {
2696
2696
  bg: "#f6f6f3",
@@ -3246,17 +3246,17 @@ const cardMetrics = (profile, lang, n) => {
3246
3246
  /** Clock size on the classic card; the report's 260 × 260 drawing is scaled to it. */
3247
3247
  const CARD_CLOCK = 300;
3248
3248
  /**
3249
- * The classic card: the classic report's hero on its page, in the same colors, with the same
3250
- * hour clock. The hour labels are text nodes over the drawing (SVG images get no fonts).
3249
+ * The classic card: the classic report's hero edge to edge, like the looks, in its dark colors,
3250
+ * with the same hour clock. The hour labels are text nodes over the drawing (SVG images get no fonts).
3251
3251
  */
3252
3252
  const classicTree = (profile, hide, lang) => {
3253
3253
  const t = MESSAGES[lang];
3254
3254
  const c = contentIn(profile, lang);
3255
- const k = CLASSIC_TOKENS.light;
3255
+ const k = CLASSIC_TOKENS.dark;
3256
3256
  const name = clip(c.archetype.name, 56);
3257
3257
  const showGraphic = !hide.includes("graphic");
3258
3258
  const clock = clockSvg(profile.stats.hourHistogram, k.accent);
3259
- const left = 808;
3259
+ const left = 840;
3260
3260
  const top = 165;
3261
3261
  const scale = CARD_CLOCK / clock.width;
3262
3262
  const ticks = [
@@ -3283,104 +3283,91 @@ const classicTree = (profile, hide, lang) => {
3283
3283
  boxSizing: "border-box",
3284
3284
  display: "flex",
3285
3285
  position: "relative",
3286
- backgroundColor: k.bg,
3286
+ backgroundColor: k.card,
3287
3287
  color: k.fg,
3288
3288
  fontFamily: "Inter"
3289
+ }, [...showGraphic ? [{
3290
+ type: "img",
3291
+ props: {
3292
+ src: svgDataUrl(clock.svg),
3293
+ width: CARD_CLOCK,
3294
+ height: CARD_CLOCK,
3295
+ style: {
3296
+ position: "absolute",
3297
+ left,
3298
+ top
3299
+ }
3300
+ }
3301
+ }, ...ticks] : [], h("div", {
3302
+ display: "flex",
3303
+ flexDirection: "column",
3304
+ justifyContent: "space-between",
3305
+ position: "absolute",
3306
+ left: 0,
3307
+ top: 0,
3308
+ width: CARD_WIDTH,
3309
+ height: 630,
3310
+ padding: "52px 60px",
3311
+ boxSizing: "border-box"
3289
3312
  }, [
3290
3313
  h("div", {
3291
- position: "absolute",
3292
- left: 36,
3293
- top: 36,
3294
- width: 1128,
3295
- height: 558,
3296
- backgroundColor: k.card,
3297
- border: `1.5px solid ${k.border}`,
3298
- borderRadius: 32
3299
- }),
3300
- ...showGraphic ? [{
3301
- type: "img",
3302
- props: {
3303
- src: svgDataUrl(clock.svg),
3304
- width: CARD_CLOCK,
3305
- height: CARD_CLOCK,
3306
- style: {
3307
- position: "absolute",
3308
- left,
3309
- top
3310
- }
3311
- }
3312
- }, ...ticks] : [],
3314
+ fontSize: 20,
3315
+ fontWeight: 700
3316
+ }, t.project),
3313
3317
  h("div", {
3314
3318
  display: "flex",
3315
3319
  flexDirection: "column",
3316
- justifyContent: "space-between",
3317
- position: "absolute",
3318
- left: 36,
3319
- top: 36,
3320
- width: 1128,
3321
- height: 558,
3322
- padding: "40px 56px",
3323
- boxSizing: "border-box"
3320
+ maxWidth: showGraphic ? 700 : 1e3
3324
3321
  }, [
3325
3322
  h("div", {
3326
- fontSize: 20,
3327
- fontWeight: 700
3328
- }, t.project),
3329
- h("div", {
3330
- display: "flex",
3331
- flexDirection: "column",
3332
- maxWidth: showGraphic ? 700 : 1e3
3333
- }, [
3334
- h("div", {
3335
- fontFamily: DISPLAY_FONT,
3336
- fontWeight: 800,
3337
- fontSize: titleSize(name),
3338
- lineHeight: .98,
3339
- letterSpacing: -2
3340
- }, name),
3341
- h("div", {
3342
- fontSize: 24,
3343
- lineHeight: 1.4,
3344
- marginTop: 18,
3345
- color: k.muted
3346
- }, clip(c.headline, 120)),
3347
- hide.includes("traits") ? null : h("div", {
3348
- display: "flex",
3349
- gap: 10,
3350
- flexWrap: "wrap",
3351
- marginTop: 20
3352
- }, profile.traits.slice(0, 3).map((_tr, i) => h("div", {
3353
- display: "flex",
3354
- fontSize: 18,
3355
- padding: "6px 16px",
3356
- borderRadius: 999,
3357
- color: k.accent,
3358
- backgroundColor: k.accentSoft
3359
- }, clip(c.trait(i).name, 32))))
3360
- ]),
3361
- h("div", {
3362
- display: "flex",
3363
- justifyContent: "space-between",
3364
- alignItems: "flex-end"
3365
- }, [h("div", {
3366
- display: "flex",
3367
- gap: 44
3368
- }, (hide.includes("stats") ? [] : cardMetrics(profile, lang, 3)).map(([label, value]) => h("div", {
3369
- display: "flex",
3370
- flexDirection: "column"
3371
- }, [h("div", {
3372
3323
  fontFamily: DISPLAY_FONT,
3373
3324
  fontWeight: 800,
3374
- fontSize: 36
3375
- }, value), h("div", {
3376
- fontSize: 16,
3325
+ fontSize: titleSize(name),
3326
+ lineHeight: .98,
3327
+ letterSpacing: -2
3328
+ }, name),
3329
+ h("div", {
3330
+ fontSize: 24,
3331
+ lineHeight: 1.4,
3332
+ marginTop: 18,
3377
3333
  color: k.muted
3378
- }, label)]))), h("div", {
3334
+ }, clip(c.headline, 120)),
3335
+ hide.includes("traits") ? null : h("div", {
3336
+ display: "flex",
3337
+ gap: 10,
3338
+ flexWrap: "wrap",
3339
+ marginTop: 20
3340
+ }, profile.traits.slice(0, 3).map((_tr, i) => h("div", {
3341
+ display: "flex",
3379
3342
  fontSize: 18,
3380
- color: k.muted
3381
- }, "npx prompt-profile")])
3382
- ])
3383
- ]);
3343
+ padding: "6px 16px",
3344
+ borderRadius: 999,
3345
+ color: k.accent,
3346
+ backgroundColor: k.accentSoft
3347
+ }, clip(c.trait(i).name, 32))))
3348
+ ]),
3349
+ h("div", {
3350
+ display: "flex",
3351
+ justifyContent: "space-between",
3352
+ alignItems: "flex-end"
3353
+ }, [h("div", {
3354
+ display: "flex",
3355
+ gap: 44
3356
+ }, (hide.includes("stats") ? [] : cardMetrics(profile, lang, 3)).map(([label, value]) => h("div", {
3357
+ display: "flex",
3358
+ flexDirection: "column"
3359
+ }, [h("div", {
3360
+ fontFamily: DISPLAY_FONT,
3361
+ fontWeight: 800,
3362
+ fontSize: 36
3363
+ }, value), h("div", {
3364
+ fontSize: 16,
3365
+ color: k.muted
3366
+ }, label)]))), h("div", {
3367
+ fontSize: 18,
3368
+ color: k.muted
3369
+ }, "npx prompt-profile")])
3370
+ ])]);
3384
3371
  };
3385
3372
  /** Archetype size steps: long names get smaller type instead of overflowing. */
3386
3373
  const titleSize = (name) => name.length > 44 ? 58 : name.length > 26 ? 72 : 96;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prompt-profile",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Analyze your past prompts from AI coding agents (Claude Code, Codex) locally and generate a personal profile.",
5
5
  "keywords": [
6
6
  "ai",