@appeeky/spec 0.6.1 → 0.7.0

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/dist/schema.d.ts CHANGED
@@ -8,6 +8,9 @@ export type TransportMode = z.infer<typeof transportMode>;
8
8
  /** Store charts a category rank is read from. */
9
9
  export declare const CHARTS: readonly ["top-free", "top-paid", "top-grossing"];
10
10
  export type Chart = (typeof CHARTS)[number];
11
+ /** What `alerts` looks for in the files the daily run writes. */
12
+ export declare const ALERT_KINDS: readonly ["rank-drop", "release-lost", "category-drop", "low-ratings", "competitor-change", "visibility-drop", "search-drop", "late-check"];
13
+ export type AlertKind = (typeof ALERT_KINDS)[number];
11
14
  /** `appeeky.spec.yaml`: who the app is, where it ships, and what it should be found for. */
12
15
  export declare const specFileSchema: z.ZodObject<{
13
16
  version: z.ZodLiteral<1>;
@@ -356,6 +359,155 @@ export declare const specFileSchema: z.ZodObject<{
356
359
  countries?: string[] | undefined;
357
360
  chart?: "top-free" | "top-paid" | "top-grossing" | undefined;
358
361
  }>>;
362
+ /**
363
+ * When `alerts` speaks up. It reads only the files the daily run already wrote; each
364
+ * kind has its thresholds here, and `off` turns kinds off. Every field has a default.
365
+ */
366
+ alerts: z.ZodDefault<z.ZodObject<{
367
+ /** Kinds to leave out, e.g. [competitor-change]. */
368
+ off: z.ZodDefault<z.ZodArray<z.ZodEnum<["rank-drop", "release-lost", "category-drop", "low-ratings", "competitor-change", "visibility-drop", "search-drop", "late-check"]>, "many">>;
369
+ /** A target fell this many places between its last two recorded checks (critical: twice that, or a top-10 target out of the top 20). */
370
+ "rank-drop": z.ZodDefault<z.ZodObject<{
371
+ places: z.ZodDefault<z.ZodNumber>;
372
+ }, "strict", z.ZodTypeAny, {
373
+ places: number;
374
+ }, {
375
+ places?: number | undefined;
376
+ }>>;
377
+ /** A release's day-7 or day-14 verdict was lost: open for this many days after the check. */
378
+ "release-lost": z.ZodDefault<z.ZodObject<{
379
+ days: z.ZodDefault<z.ZodNumber>;
380
+ }, "strict", z.ZodTypeAny, {
381
+ days: number;
382
+ }, {
383
+ days?: number | undefined;
384
+ }>>;
385
+ /** The category rank on the latest day against the average of the `days` before (critical: twice the places, or out of the chart). */
386
+ "category-drop": z.ZodDefault<z.ZodObject<{
387
+ places: z.ZodDefault<z.ZodNumber>;
388
+ days: z.ZodDefault<z.ZodNumber>;
389
+ }, "strict", z.ZodTypeAny, {
390
+ places: number;
391
+ days: number;
392
+ }, {
393
+ places?: number | undefined;
394
+ days?: number | undefined;
395
+ }>>;
396
+ /** 1–2 star reviews in the last `days` against the `days` before: at least `min` of them and `ratio` times as many (critical: twice both). */
397
+ "low-ratings": z.ZodDefault<z.ZodObject<{
398
+ days: z.ZodDefault<z.ZodNumber>;
399
+ min: z.ZodDefault<z.ZodNumber>;
400
+ ratio: z.ZodDefault<z.ZodNumber>;
401
+ }, "strict", z.ZodTypeAny, {
402
+ min: number;
403
+ days: number;
404
+ ratio: number;
405
+ }, {
406
+ min?: number | undefined;
407
+ days?: number | undefined;
408
+ ratio?: number | undefined;
409
+ }>>;
410
+ /** A competitor climbed into the top 10 for a target, or put a target in its title, in the last `days`. */
411
+ "competitor-change": z.ZodDefault<z.ZodObject<{
412
+ days: z.ZodDefault<z.ZodNumber>;
413
+ }, "strict", z.ZodTypeAny, {
414
+ days: number;
415
+ }, {
416
+ days?: number | undefined;
417
+ }>>;
418
+ /** The assistants stopped naming the app for an intent, or stopped citing its site, in the last `days`. */
419
+ "visibility-drop": z.ZodDefault<z.ZodObject<{
420
+ days: z.ZodDefault<z.ZodNumber>;
421
+ }, "strict", z.ZodTypeAny, {
422
+ days: number;
423
+ }, {
424
+ days?: number | undefined;
425
+ }>>;
426
+ /** Search Console clicks over the last `days` fell by `drop` (0.3 = 30%) against the `days` before, with at least `min` clicks before (critical: twice the drop). */
427
+ "search-drop": z.ZodDefault<z.ZodObject<{
428
+ days: z.ZodDefault<z.ZodNumber>;
429
+ drop: z.ZodDefault<z.ZodNumber>;
430
+ min: z.ZodDefault<z.ZodNumber>;
431
+ }, "strict", z.ZodTypeAny, {
432
+ min: number;
433
+ days: number;
434
+ drop: number;
435
+ }, {
436
+ min?: number | undefined;
437
+ days?: number | undefined;
438
+ drop?: number | undefined;
439
+ }>>;
440
+ /** A release or experiment check this many days late or more (critical: 7 days). */
441
+ "late-check": z.ZodDefault<z.ZodObject<{
442
+ days: z.ZodDefault<z.ZodNumber>;
443
+ }, "strict", z.ZodTypeAny, {
444
+ days: number;
445
+ }, {
446
+ days?: number | undefined;
447
+ }>>;
448
+ }, "strict", z.ZodTypeAny, {
449
+ "rank-drop": {
450
+ places: number;
451
+ };
452
+ "release-lost": {
453
+ days: number;
454
+ };
455
+ "category-drop": {
456
+ places: number;
457
+ days: number;
458
+ };
459
+ "low-ratings": {
460
+ min: number;
461
+ days: number;
462
+ ratio: number;
463
+ };
464
+ "competitor-change": {
465
+ days: number;
466
+ };
467
+ "visibility-drop": {
468
+ days: number;
469
+ };
470
+ "search-drop": {
471
+ min: number;
472
+ days: number;
473
+ drop: number;
474
+ };
475
+ "late-check": {
476
+ days: number;
477
+ };
478
+ off: ("rank-drop" | "release-lost" | "category-drop" | "low-ratings" | "competitor-change" | "visibility-drop" | "search-drop" | "late-check")[];
479
+ }, {
480
+ "rank-drop"?: {
481
+ places?: number | undefined;
482
+ } | undefined;
483
+ "release-lost"?: {
484
+ days?: number | undefined;
485
+ } | undefined;
486
+ "category-drop"?: {
487
+ places?: number | undefined;
488
+ days?: number | undefined;
489
+ } | undefined;
490
+ "low-ratings"?: {
491
+ min?: number | undefined;
492
+ days?: number | undefined;
493
+ ratio?: number | undefined;
494
+ } | undefined;
495
+ "competitor-change"?: {
496
+ days?: number | undefined;
497
+ } | undefined;
498
+ "visibility-drop"?: {
499
+ days?: number | undefined;
500
+ } | undefined;
501
+ "search-drop"?: {
502
+ min?: number | undefined;
503
+ days?: number | undefined;
504
+ drop?: number | undefined;
505
+ } | undefined;
506
+ "late-check"?: {
507
+ days?: number | undefined;
508
+ } | undefined;
509
+ off?: ("rank-drop" | "release-lost" | "category-drop" | "low-ratings" | "competitor-change" | "visibility-drop" | "search-drop" | "late-check")[] | undefined;
510
+ }>>;
359
511
  /** Who the app is for. Experiments, screenshots and UGC refer to these by id. */
360
512
  personas: z.ZodDefault<z.ZodArray<z.ZodObject<{
361
513
  id: z.ZodString;
@@ -418,6 +570,38 @@ export declare const specFileSchema: z.ZodObject<{
418
570
  data: {
419
571
  commit: boolean;
420
572
  };
573
+ alerts: {
574
+ "rank-drop": {
575
+ places: number;
576
+ };
577
+ "release-lost": {
578
+ days: number;
579
+ };
580
+ "category-drop": {
581
+ places: number;
582
+ days: number;
583
+ };
584
+ "low-ratings": {
585
+ min: number;
586
+ days: number;
587
+ ratio: number;
588
+ };
589
+ "competitor-change": {
590
+ days: number;
591
+ };
592
+ "visibility-drop": {
593
+ days: number;
594
+ };
595
+ "search-drop": {
596
+ min: number;
597
+ days: number;
598
+ drop: number;
599
+ };
600
+ "late-check": {
601
+ days: number;
602
+ };
603
+ off: ("rank-drop" | "release-lost" | "category-drop" | "low-ratings" | "competitor-change" | "visibility-drop" | "search-drop" | "late-check")[];
604
+ };
421
605
  personas: {
422
606
  name: string;
423
607
  id: string;
@@ -532,6 +716,38 @@ export declare const specFileSchema: z.ZodObject<{
532
716
  countries?: string[] | undefined;
533
717
  chart?: "top-free" | "top-paid" | "top-grossing" | undefined;
534
718
  } | undefined;
719
+ alerts?: {
720
+ "rank-drop"?: {
721
+ places?: number | undefined;
722
+ } | undefined;
723
+ "release-lost"?: {
724
+ days?: number | undefined;
725
+ } | undefined;
726
+ "category-drop"?: {
727
+ places?: number | undefined;
728
+ days?: number | undefined;
729
+ } | undefined;
730
+ "low-ratings"?: {
731
+ min?: number | undefined;
732
+ days?: number | undefined;
733
+ ratio?: number | undefined;
734
+ } | undefined;
735
+ "competitor-change"?: {
736
+ days?: number | undefined;
737
+ } | undefined;
738
+ "visibility-drop"?: {
739
+ days?: number | undefined;
740
+ } | undefined;
741
+ "search-drop"?: {
742
+ min?: number | undefined;
743
+ days?: number | undefined;
744
+ drop?: number | undefined;
745
+ } | undefined;
746
+ "late-check"?: {
747
+ days?: number | undefined;
748
+ } | undefined;
749
+ off?: ("rank-drop" | "release-lost" | "category-drop" | "low-ratings" | "competitor-change" | "visibility-drop" | "search-drop" | "late-check")[] | undefined;
750
+ } | undefined;
535
751
  personas?: {
536
752
  name: string;
537
753
  id: string;
package/dist/schema.js CHANGED
@@ -66,6 +66,8 @@ const aiIntent = z
66
66
  .strict();
67
67
  /** Store charts a category rank is read from. */
68
68
  export const CHARTS = ["top-free", "top-paid", "top-grossing"];
69
+ /** What `alerts` looks for in the files the daily run writes. */
70
+ export const ALERT_KINDS = ["rank-drop", "release-lost", "category-drop", "low-ratings", "competitor-change", "visibility-drop", "search-drop", "late-check"];
69
71
  /** `appeeky.spec.yaml`: who the app is, where it ships, and what it should be found for. */
70
72
  export const specFileSchema = z
71
73
  .object({
@@ -192,6 +194,39 @@ export const specFileSchema = z
192
194
  })
193
195
  .strict()
194
196
  .optional(),
197
+ /**
198
+ * When `alerts` speaks up. It reads only the files the daily run already wrote; each
199
+ * kind has its thresholds here, and `off` turns kinds off. Every field has a default.
200
+ */
201
+ alerts: z
202
+ .object({
203
+ /** Kinds to leave out, e.g. [competitor-change]. */
204
+ off: z.array(z.enum(ALERT_KINDS)).default([]),
205
+ /** A target fell this many places between its last two recorded checks (critical: twice that, or a top-10 target out of the top 20). */
206
+ "rank-drop": z.object({ places: z.number().int().min(1).default(10) }).strict().default({}),
207
+ /** A release's day-7 or day-14 verdict was lost: open for this many days after the check. */
208
+ "release-lost": z.object({ days: z.number().int().min(1).default(14) }).strict().default({}),
209
+ /** The category rank on the latest day against the average of the `days` before (critical: twice the places, or out of the chart). */
210
+ "category-drop": z.object({ places: z.number().int().min(1).default(10), days: z.number().int().min(1).default(7) }).strict().default({}),
211
+ /** 1–2 star reviews in the last `days` against the `days` before: at least `min` of them and `ratio` times as many (critical: twice both). */
212
+ "low-ratings": z
213
+ .object({ days: z.number().int().min(1).default(7), min: z.number().int().min(1).default(3), ratio: z.number().min(1).default(2) })
214
+ .strict()
215
+ .default({}),
216
+ /** A competitor climbed into the top 10 for a target, or put a target in its title, in the last `days`. */
217
+ "competitor-change": z.object({ days: z.number().int().min(1).default(3) }).strict().default({}),
218
+ /** The assistants stopped naming the app for an intent, or stopped citing its site, in the last `days`. */
219
+ "visibility-drop": z.object({ days: z.number().int().min(1).default(3) }).strict().default({}),
220
+ /** Search Console clicks over the last `days` fell by `drop` (0.3 = 30%) against the `days` before, with at least `min` clicks before (critical: twice the drop). */
221
+ "search-drop": z
222
+ .object({ days: z.number().int().min(1).default(7), drop: z.number().gt(0).max(1).default(0.3), min: z.number().int().min(0).default(20) })
223
+ .strict()
224
+ .default({}),
225
+ /** A release or experiment check this many days late or more (critical: 7 days). */
226
+ "late-check": z.object({ days: z.number().int().min(1).default(2) }).strict().default({}),
227
+ })
228
+ .strict()
229
+ .default({}),
195
230
  /** Who the app is for. Experiments, screenshots and UGC refer to these by id. */
196
231
  personas: z
197
232
  .array(z
package/dist/setup.js CHANGED
@@ -130,12 +130,14 @@ jobs:
130
130
  git config user.email "spec@users.noreply.github.com"
131
131
  git add appeeky && git commit -m "Record release, replies, posts and clips" && git push || true
132
132
  `,
133
- "listing-daily.yml": `# Appeeky Spec: record the category rank, AI visibility and Google search, measure releases on day 7 and 14, refresh reviews and competitors.
133
+ "listing-daily.yml": `# Appeeky Spec: record the category rank, AI visibility and Google search, measure releases on day 7 and 14, refresh reviews and competitors,
134
+ # and keep one issue open with what needs attention.
134
135
  on:
135
136
  schedule: [{ cron: "0 6 * * *" }] # 06:00 UTC
136
137
  workflow_dispatch:
137
138
  permissions:
138
139
  contents: write
140
+ issues: write # one issue with what needs attention (alerts)
139
141
  jobs:
140
142
  refresh:
141
143
  runs-on: ubuntu-latest
@@ -171,10 +173,34 @@ jobs:
171
173
  ANTHROPIC_API_KEY: \${{ secrets.ANTHROPIC_API_KEY }}
172
174
  GEMINI_API_KEY: \${{ secrets.GEMINI_API_KEY }}
173
175
  PERPLEXITY_API_KEY: \${{ secrets.PERPLEXITY_API_KEY }}
176
+ # What needs attention, from the files above: the new ones first, then all of them
177
+ # (--record remembers them in appeeky/alerts.json, so each is reported once).
178
+ - if: always()
179
+ run: |
180
+ npx @appeeky/spec alerts --new -o .appeeky/alerts-new.md
181
+ npx @appeeky/spec alerts --record -o .appeeky/alerts.md
174
182
  - run: |
175
183
  git config user.name "appeeky-spec"
176
184
  git config user.email "spec@users.noreply.github.com"
177
185
  git add appeeky && git commit -m "Daily: category, AI visibility, search, Search Ads, verify, reviews, competitors, social, UGC" && git push || true
186
+ # One open issue labelled appeeky-spec-alert: opened or updated while something needs
187
+ # attention (a comment lists the new alerts), closed when nothing is left.
188
+ - if: always() && hashFiles('.appeeky/alerts.md') != ''
189
+ run: |
190
+ issue="$(gh issue list --label appeeky-spec-alert --state open --limit 1 --json number --jq '.[0].number // empty')"
191
+ if [ -s .appeeky/alerts.md ]; then
192
+ if [ -n "$issue" ]; then
193
+ gh issue edit "$issue" --body-file .appeeky/alerts.md
194
+ if [ -s .appeeky/alerts-new.md ]; then gh issue comment "$issue" --body-file .appeeky/alerts-new.md; fi
195
+ else
196
+ gh label create appeeky-spec-alert --color d93f0b --description "Appeeky Spec: something needs attention" 2>/dev/null || true
197
+ gh issue create --title "Appeeky Spec alerts" --label appeeky-spec-alert --body-file .appeeky/alerts.md
198
+ fi
199
+ elif [ -n "$issue" ]; then
200
+ gh issue close "$issue" --comment "Nothing needs attention any more. Closed by appeeky-spec alerts; it opens again when something does."
201
+ fi
202
+ env:
203
+ GH_TOKEN: \${{ github.token }}
178
204
  `,
179
205
  };
180
206
  const ok = (area, detail) => ({ area, status: "ok", detail });
@@ -259,6 +285,21 @@ export function diagnose(root, project, env = process.env, nodeVersion = process
259
285
  out.push(fail("GitHub Actions", `${old.join(", ")} use${old.length === 1 ? "s" : ""} appeeky/appeeky-spec@v0, which no longer runs`, "Replace `uses: appeeky/appeeky-spec@v0` with `uses: appeeky/spec@v0`."));
260
286
  else
261
287
  out.push(found.length ? ok("GitHub Actions", found.join(", ")) : warn("GitHub Actions", "No workflow runs the spec", "Optional: `npx @appeeky/spec init --ci` writes the pull request check, push on merge and daily verify."));
288
+ // Alerts: someone hears about a drop without reading the files.
289
+ const daily = files.filter(({ text }) => /@appeeky\/spec verify/.test(text)).map(({ f }) => f);
290
+ const alerting = files.filter(({ text }) => /@appeeky\/spec alerts/.test(text));
291
+ const webhook = env.ALERT_WEBHOOK_URL ? " and ALERT_WEBHOOK_URL is set" : "";
292
+ const off = project.spec.alerts.off.length ? ` (off: ${project.spec.alerts.off.join(", ")})` : "";
293
+ if (alerting.some(({ text }) => !/issues:\s*write/.test(text)))
294
+ out.push(warn("alerts", `${alerting.filter(({ text }) => !/issues:\s*write/.test(text)).map(({ f }) => f).join(", ")} runs alerts without issues: write`, "Add `issues: write` under `permissions:`, so it can open the alert issue."));
295
+ else if (alerting.length)
296
+ out.push(ok("alerts", `${alerting.map(({ f }) => f).join(", ")} keeps an issue open while something needs attention${webhook}${off}`));
297
+ else if (daily.length)
298
+ out.push(warn("alerts", `${daily.join(", ")} runs daily but no workflow runs alerts: nobody hears about a drop`, "Delete .github/workflows/listing-daily.yml and run `npx @appeeky/spec init --ci` again (it adds the alert issue), or set ALERT_WEBHOOK_URL on a Docker routine."));
299
+ else if (env.ALERT_WEBHOOK_URL)
300
+ out.push(ok("alerts", `ALERT_WEBHOOK_URL is set: the daily routine posts new alerts${off}`));
301
+ else
302
+ out.push(warn("alerts", "Nothing reports a drop: rank, rating or category changes wait for someone to read the files", "Optional: `npx @appeeky/spec init --ci` (an issue on GitHub) or ALERT_WEBHOOK_URL on the Docker routine; `alerts` shows them now."));
262
303
  const skills = [".claude/skills/appeeky-spec", ".agents/skills/appeeky-spec", ".cursor/skills/appeeky-spec"].some((p) => existsSync(join(root, p)));
263
304
  out.push(skills ? ok("agent skills", "installed") : warn("agent skills", "Not installed in this repo", "Optional: `npx skills add appeeky/skills`."));
264
305
  const specialists = installedTargets(root);
package/dist/social.d.ts CHANGED
@@ -388,8 +388,8 @@ export declare const draftSchema: z.ZodObject<{
388
388
  sentAt: z.ZodOptional<z.ZodString>;
389
389
  }, "strict", z.ZodTypeAny, {
390
390
  status: "draft" | "sent";
391
- accounts: string[];
392
391
  text: string;
392
+ accounts: string[];
393
393
  tiktok?: {
394
394
  title?: string | undefined;
395
395
  comments?: boolean | undefined;
@@ -401,6 +401,7 @@ export declare const draftSchema: z.ZodObject<{
401
401
  cover_time_ms?: number | undefined;
402
402
  cover_image_url?: string | undefined;
403
403
  } | undefined;
404
+ sentAt?: string | undefined;
404
405
  when?: string | undefined;
405
406
  media?: string[] | undefined;
406
407
  youtube?: {
@@ -417,10 +418,9 @@ export declare const draftSchema: z.ZodObject<{
417
418
  } | undefined;
418
419
  why?: string | undefined;
419
420
  postId?: string | undefined;
420
- sentAt?: string | undefined;
421
421
  }, {
422
- accounts: string[];
423
422
  text: string;
423
+ accounts: string[];
424
424
  status?: "draft" | "sent" | undefined;
425
425
  tiktok?: {
426
426
  title?: string | undefined;
@@ -433,6 +433,7 @@ export declare const draftSchema: z.ZodObject<{
433
433
  cover_time_ms?: number | undefined;
434
434
  cover_image_url?: string | undefined;
435
435
  } | undefined;
436
+ sentAt?: string | undefined;
436
437
  when?: string | undefined;
437
438
  media?: string[] | undefined;
438
439
  youtube?: {
@@ -449,7 +450,6 @@ export declare const draftSchema: z.ZodObject<{
449
450
  } | undefined;
450
451
  why?: string | undefined;
451
452
  postId?: string | undefined;
452
- sentAt?: string | undefined;
453
453
  }>;
454
454
  export type Draft = z.infer<typeof draftSchema>;
455
455
  /** Character limits per platform, for `check`-style warnings before sending. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appeeky/spec",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Your app's store listing as a spec: lint it, check keyword coverage, diff it against the live store and push it to App Store Connect and Google Play.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "type": "module",
@@ -23,6 +23,7 @@ The app's store listings live in files, and every push is recorded and measured.
23
23
  | `appeeky/visibility/<country>.yaml` | whether ChatGPT, Claude, Gemini and Perplexity name the app per intent, who they name instead, the pages they cite, suggested fixes; `changes.md` beside it (`history.csv` and `answers/` with `--local` scans) |
24
24
  | `appeeky/seo/` | Google Search Console for the app's website: `daily.csv`, `queries.csv`, `pages.csv`, `summary.md` (`seo pull`) |
25
25
  | `appeeky/category.csv` | rank in the category chart (top 100), one row a day |
26
+ | `appeeky/alerts.json` | written by `alerts --record`: the alerts already reported (run `alerts --json` for what needs attention now) |
26
27
  | `.appeeky/data/*.csv` (or `appeeky/data/`) | analytics, Search Ads, RevenueCat, Meta and TikTok per day; `README.md` says what each file holds |
27
28
 
28
29
  Run commands as `npx @appeeky/spec <command> --json` (or `appeeky-spec` when installed). Add `-C <dir>` when the spec is not in the current folder.
@@ -98,7 +99,7 @@ For "what should we do this week" or a scheduled run, follow appeeky-spec-cofoun
98
99
  | Pricing and other experiments | appeeky-spec-experiments |
99
100
  | AI assistants and the category chart | appeeky-spec-visibility |
100
101
  | The app's website in Google | appeeky-spec-seo |
101
- | GitHub Actions, other CI, cron | appeeky-spec-automation |
102
+ | GitHub Actions, other CI, cron, alerts (the issue, the webhook) | appeeky-spec-automation |
102
103
  | A VM or container host | appeeky-spec-server |
103
104
 
104
105
  Docs: https://docs.appeeky.com/docs/spec
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: appeeky-spec-automation
3
- description: Run Appeeky Spec unattended and fix it when a run fails. Covers `init --ci` and its three GitHub workflows (pull request check, push on merge, daily refresh), the repository secrets they need, the pull request report, cron or other CI, and scheduling the weekly co-founder review. Use when asked to set up CI or GitHub Actions for the listing, "push on merge", a daily job, run Spec with cron, GitLab or other CI, schedule the weekly review, which secrets to add, or why a listing workflow, push or daily run failed. For the review itself use appeeky-spec-cofounder; for a VM, Docker or Railway, Fly and Render use appeeky-spec-server; for first-time spec setup use appeeky-spec.
3
+ description: Run Appeeky Spec unattended and fix it when a run fails. Covers `init --ci` and its three GitHub workflows (pull request check, push on merge, daily refresh), the repository secrets they need, the pull request report, the daily alerts (one GitHub issue, a Slack webhook), cron or other CI, and scheduling the weekly co-founder review. Use when asked to set up CI or GitHub Actions for the listing, "push on merge", a daily job, alerts or a notification when ranks, ratings or the category drop, run Spec with cron, GitLab or other CI, schedule the weekly review, which secrets to add, or why a listing workflow, push or daily run failed. For the review itself use appeeky-spec-cofounder; for a VM, Docker or Railway, Fly and Render use appeeky-spec-server; for first-time spec setup use appeeky-spec.
4
4
  metadata:
5
5
  version: 1.0.0
6
6
  ---
@@ -28,7 +28,7 @@ Run commands as `npx @appeeky/spec <command>`. Start every setup or diagnosis wi
28
28
  | --- | --- | --- |
29
29
  | `listing-check.yml` | `pull_request` | the `appeeky/spec@v0` action: `report --base origin/<base>`, comments it, fails on check errors |
30
30
  | `listing-push.yml` | push to `main` touching `appeeky/store/**`, `appeeky.spec.yaml`, `appeeky/reviews/replies/**`, `appeeky/social/drafts/**`, `appeeky/ugc/briefs/**` | `push --yes --note "<merge commit message>"`, `reviews push --yes`, `social push --yes`, `ugc generate --yes` (`--local` with `FAL_KEY`), then commits the release and sent markers |
31
- | `listing-daily.yml` | `0 6 * * *` UTC and manual | `category pull`, `visibility pull`, `verify --playbook`, `reviews pull`, `competitors pull`, `social pull`, `ugc pull`; with keys also `seo pull`, `search-ads pull`, `seo ranks --every`, `visibility scan --local --every`; then commits |
31
+ | `listing-daily.yml` | `0 6 * * *` UTC and manual | `category pull`, `visibility pull`, `verify --playbook`, `reviews pull`, `competitors pull`, `social pull`, `ugc pull`; with keys also `seo pull`, `search-ads pull`, `seo ranks --every`, `visibility scan --local --every`; then `alerts --record`, commits, and keeps the alert issue (`issues: write`) |
32
32
 
33
33
  2. Secrets: tell the user which to add under Settings → Secrets and variables → Actions. Never ask them to paste one into chat, and never write one into a file.
34
34
 
@@ -50,7 +50,19 @@ The push workflow reads `APPEEKY_API_KEY`, or your own store keys from secrets o
50
50
 
51
51
  `listing-check.yml` (or any workflow using `appeeky/spec@v0` after `actions/checkout@v4` with `fetch-depth: 0`) posts one comment, edited on each run: listing changes, check results, coverage before → after, and the replies, posts and clips the merge sends out. Action inputs: `working-directory` (folder with the spec), `base`, `comment` (`"false"` to skip), `version`, `github-token`. The same Markdown locally: `report --base main` (`-o <file>` to save it). It needs `pull-requests: write`.
52
52
 
53
- ## 3. The weekly co-founder review
53
+ ## 3. Alerts
54
+
55
+ `alerts` turns the files the daily run wrote into what needs a person: `rank-drop` (from the ranks in `appeeky/releases/`), `release-lost`, `category-drop`, `low-ratings`, `competitor-change` (on targets only), `visibility-drop`, `search-drop` (`appeeky/seo/daily.csv`) and `late-check`. Each has `severity` (`warn`/`critical`), `numbers`, `window`, `source` and `next`. It makes no network call except the delivery flags.
56
+
57
+ - Read them: `alerts --json` (`--new` for the ones not reported yet). `--markdown -o <file>` writes an issue body; the file is empty when nothing is open.
58
+ - Dedupe: `--record` writes `appeeky/alerts.json`; the daily run commits it, so an alert is new once, again when it turns critical, and again only after it cleared and came back. Never hand-edit it; delete it to report everything again.
59
+ - Thresholds: `alerts:` in `appeeky.spec.yaml` (`rank-drop.places`, `category-drop.places`/`days`, `low-ratings.days`/`min`/`ratio`, `search-drop.days`/`drop`/`min`, `competitor-change.days`, `visibility-drop.days`, `release-lost.days`, `late-check.days`), `off: [<kind>]` to turn kinds off. Too noisy: raise a threshold or turn the kind off in a pull request, not by deleting the state file.
60
+ - GitHub: `listing-daily.yml` runs `alerts --new -o .appeeky/alerts-new.md` and `alerts --record -o .appeeky/alerts.md`, then with `gh` keeps one open issue labelled `appeeky-spec-alert` (body: every open alert; a comment with the new ones; closed when the file is empty). A `listing-daily.yml` from an older version has neither the steps nor `issues: write`: delete it and run `init --ci` again (doctor's `alerts` line says so).
61
+ - Docker `daily`: `alerts --record`, plus `--webhook` when `ALERT_WEBHOOK_URL` is set (Slack-compatible `{"text"}`, new alerts only) and `--issue` when `GITHUB_TOKEN` is set (same issue through the GitHub API; needs Issues: Read and write; `ALERT_ISSUE=0` skips it). A failed post is not recorded and is retried the next day. `! GitHub answered 403 … Issues: Read and write` in the log: add that permission to the token or set `ALERT_ISSUE=0`.
62
+ - Other CI or cron: `alerts --record --webhook` (and `--issue` with `GITHUB_TOKEN`) after the daily commands, then commit `appeeky/alerts.json`.
63
+ - The weekly agent may run `alerts --json` but never `--webhook` or `--issue`; the routines deny them.
64
+
65
+ ## 4. The weekly co-founder review
54
66
 
55
67
  1. `npx @appeeky/spec agents install` (`--for opencode` or `all`) writes `.claude/agents/appeeky-*.md` and `.claude/commands/appeeky-cofounder.md`; commit them. Or copy `github.com/appeeky/spec/examples/weekly/propose.md` to `.github/appeeky-propose.md` to keep an own version; the routines prefer it.
56
68
  2. Pick the runner:
@@ -60,11 +72,11 @@ The push workflow reads `APPEEKY_API_KEY`, or your own store keys from secrets o
60
72
  3. Agent credentials, one of: `CLAUDE_CODE_OAUTH_TOKEN` (the user runs `claude setup-token` once; billed to their Claude Pro or Max plan) or `ANTHROPIC_API_KEY` (per use). Optional: `PROPOSAL_TOKEN` (a fine-grained or GitHub App token with contents and pull requests write), because a PR opened with the default `GITHUB_TOKEN` does not trigger `listing-check.yml`; `ATTRIBUTION_TOKEN` for a self-hosted attribution server.
61
73
  4. Each routine refreshes `data`, `reviews`, `competitors`, `social`, `ugc`, reads `status --json` for the free stores, runs the review with an allow-list (`appeeky-spec *`, `git log`, `git tag`, file tools) and a deny-list (`push`, `revert`, `reviews push`, `social push|reply|hide|like|delete-comment`, `ugc generate --yes`, paid `--yes` scans), then opens `listing/weekly-<date>` with `.appeeky/proposal.md` as the body. Never loosen those lists.
62
74
 
63
- ## 4. On a server
75
+ ## 5. On a server
64
76
 
65
77
  The same routines run from the Docker image on a VM or container host (daily, push, weekly, schedule; `.env`, `PUSH_DRY_RUN`, `HEALTHCHECK_URL`). Setting it up, operating it and its failures: see appeeky-spec-server. The failure messages below are the same there.
66
78
 
67
- ## 5. Diagnose a failed run
79
+ ## 6. Diagnose a failed run
68
80
 
69
81
  1. Read the log: `gh run view <id> --log-failed`, `docker compose logs`, or `.appeeky/weekly.log`. Run `doctor --json` with the same env.
70
82
  2. Match the message:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: appeeky-spec-cofounder
3
- description: Run the weekly growth review (the co-founder review) in an Appeeky Spec repo as one agent, without subagents, in Codex, Cursor, Gemini CLI, opencode or Claude Code. It checks which stores are free to change, refreshes reviews, competitors, data, social and UGC, works through the ASO, reviews, ads, releases, UGC and social checklists, picks at most one listing change, writes the brief to appeeky/briefs/, drafts posts and a UGC brief, and prepares the pull request. Use when asked "what should we do this week?", for the weekly growth or ASO review, the co-founder review, /appeeky-cofounder, a growth brief, or "propose this week's listing change". To schedule it, see appeeky-spec-automation; to judge one past release, see appeeky-spec-review; for a single listing edit, use appeeky-spec.
3
+ description: Run the weekly growth review (the co-founder review) in an Appeeky Spec repo as one agent, without subagents, in Codex, Cursor, Gemini CLI, opencode or Claude Code. It reads the open alerts first, checks which stores are free to change, refreshes reviews, competitors, data, social and UGC, works through the ASO, reviews, ads, releases, UGC and social checklists, picks at most one listing change, writes the brief to appeeky/briefs/, drafts posts and a UGC brief, and prepares the pull request. Use when asked "what should we do this week?", for the weekly growth or ASO review, the co-founder review, /appeeky-cofounder, a growth brief, or "propose this week's listing change". To schedule it, see appeeky-spec-automation; to judge one past release, see appeeky-spec-review; for a single listing edit, use appeeky-spec.
4
4
  metadata:
5
5
  version: 1.0.0
6
6
  ---
@@ -15,9 +15,10 @@ If the run starts with "Today is <date>. Stores free to change: …", a schedule
15
15
 
16
16
  ## 1. Where things stand
17
17
 
18
- 1. `status --json` → `{ loops, free }`. Only stores in `free` may get a listing change; the others have a release still being measured. It also rewrites `appeeky/loops.md`.
19
- 2. Read `appeeky/loops.md` (warnings name competitor moves inside a release's window), `appeeky/playbook.md` (what won and lost) and the newest file in `appeeky/briefs/`, if any.
20
- 3. `log --json` for recent releases and their notes.
18
+ 1. `alerts --json` → `{ alerts }`: what needs attention now (rank, category, rating, Search Console and AI visibility drops, lost releases, competitor moves on targets, late checks), each with numbers, source file and next step. Read them first; every critical one goes into the brief under Where we stand, with its next step. Never run it with `--webhook`, `--issue` or `--record`; the daily run delivers them.
19
+ 2. `status --json` → `{ loops, free }`. Only stores in `free` may get a listing change; the others have a release still being measured. It also rewrites `appeeky/loops.md`.
20
+ 3. Read `appeeky/loops.md` (warnings name competitor moves inside a release's window), `appeeky/playbook.md` (what won and lost) and the newest file in `appeeky/briefs/`, if any.
21
+ 4. `log --json` for recent releases and their notes.
21
22
 
22
23
  ## 2. Refresh what you read
23
24
 
@@ -65,6 +66,7 @@ Pick exactly one listing change for a store in `free`, the one with the stronges
65
66
  ```markdown
66
67
  # Growth brief 2026-11-16
67
68
  ## Where we stand
69
+ <open alerts (critical first) and what each needs; what is being measured and when it is checked>
68
70
  ## What the specialists found
69
71
  ### ASO / Reviews / Ads / Releases / UGC / Social (a few lines each, with numbers and files)
70
72
  ## The change
@@ -108,7 +110,7 @@ After the merge, the push workflow (or the docker push routine) runs `push`, `re
108
110
 
109
111
  ## Never run
110
112
 
111
- `push`, `revert`, `pull`, `reviews push`, `social push`, `social reply`, `social hide`, `social like`, `social delete-comment`, `ugc generate` without `--dry-run`, `visibility scan --local --yes`, `seo ranks|keywords|domain … --yes`, `experiment add` or `experiment close`. Never put keys or tokens in any file.
113
+ `push`, `revert`, `pull`, `reviews push`, `social push`, `social reply`, `social hide`, `social like`, `social delete-comment`, `ugc generate` without `--dry-run`, `visibility scan --local --yes`, `seo ranks|keywords|domain … --yes`, `alerts --webhook|--issue|--record`, `experiment add` or `experiment close`. Never put keys or tokens in any file.
112
114
 
113
115
  ## Mistakes to avoid
114
116
 
@@ -72,6 +72,7 @@ grep -oE '^[A-Z_]+=.' .env | cut -d= -f1 # names that have a value
72
72
  | `DAILY_AT` (`0 6 * * *`), `PUSH_EVERY` (`*/15 * * * *`, `off` to push by hand), `WEEKLY_AT` (off, e.g. `0 7 * * 1`) | cron times, UTC |
73
73
  | `PUSH_DRY_RUN=1` | `push` only shows what it would change, sends nothing |
74
74
  | `HEALTHCHECK_URL` | e.g. a healthchecks.io ping URL; `daily` pings it on success, `<url>/fail` on failure |
75
+ | `ALERT_WEBHOOK_URL` | a Slack (or Slack-compatible) incoming webhook; `daily` posts new alerts to it once each. With `GITHUB_TOKEN` it also keeps one issue labelled `appeeky-spec-alert` (needs Issues: Read and write; `ALERT_ISSUE=0` turns that off) |
75
76
  | `CLAUDE_CODE_OAUTH_TOKEN` or `ANTHROPIC_API_KEY` | `weekly` only: the person runs `claude setup-token` on their computer (Claude Pro/Max plan), or an API key billed per use |
76
77
  | `APPEEKY_SPEC_IMAGE` | read by compose: `ghcr.io/appeeky/appeeky-spec:latest-agent` for `weekly`, or a pinned tag |
77
78
  | `FAL_KEY` | render UGC clips on their own fal account instead of Appeeky credits |
@@ -1,6 +1,6 @@
1
1
  # The app's spec repo, and a fine-grained token for it: Repository access "Only select
2
2
  # repositories" → this repo, permission Contents: Read and write (Pull requests: Read
3
- # and write too for the weekly agent).
3
+ # and write too for the weekly agent; Issues: Read and write for the alert issue).
4
4
  REPO_URL=https://github.com/you/your-app.git
5
5
  GITHUB_TOKEN=
6
6
  # Store access, analytics and AI Visibility: appeeky.com/dashboard/settings
@@ -16,6 +16,8 @@ APPEEKY_API_KEY=
16
16
  # CLAUDE_CODE_OAUTH_TOKEN= # run `claude setup-token` on your computer: uses your Claude Pro or Max plan
17
17
  # ANTHROPIC_API_KEY= # or pay per use
18
18
  # HEALTHCHECK_URL=https://hc-ping.com/your-uuid # pinged after every daily run, /fail when it fails
19
+ # ALERT_WEBHOOK_URL= # Slack (or any Slack-compatible) incoming webhook: the daily run posts new alerts here
20
+ # ALERT_ISSUE=0 # do not keep the alert issue on GitHub (it needs Issues: Read and write on the token)
19
21
  # PUSH_DRY_RUN=1 # show what a push would change, change nothing (the first run still marks where to start)
20
22
  # FAL_KEY= # render UGC clips here on your own fal account (ugc generate --local) instead of Appeeky credits
21
23
  # Your own keys for the daily routine: