@appeeky/spec 0.6.1 → 0.8.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/README.md +56 -5
- package/agents/appeeky-aso.md +1 -1
- package/agents/cofounder.md +3 -3
- package/dist/alerts.d.ts +109 -0
- package/dist/alerts.js +469 -0
- package/dist/cli.js +94 -4
- package/dist/experiments.d.ts +4 -4
- package/dist/files.js +9 -0
- package/dist/reviews.d.ts +2 -2
- package/dist/schema.d.ts +216 -0
- package/dist/schema.js +35 -0
- package/dist/setup.js +42 -1
- package/dist/social.d.ts +4 -4
- package/dist/visibility-core.js +26 -26
- package/dist/visibility-local.d.ts +20 -0
- package/dist/visibility-local.js +25 -3
- package/dist/visibility.d.ts +43 -1
- package/dist/visibility.js +59 -3
- package/package.json +1 -1
- package/skills/appeeky-spec/SKILL.md +2 -1
- package/skills/appeeky-spec-automation/SKILL.md +17 -5
- package/skills/appeeky-spec-cofounder/SKILL.md +7 -5
- package/skills/appeeky-spec-server/SKILL.md +1 -0
- package/skills/appeeky-spec-server/files/env.example +3 -1
- package/skills/appeeky-spec-visibility/SKILL.md +12 -4
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ npx @appeeky/spec verify # day 7 and day 14: did it work?
|
|
|
42
42
|
| **Pushed to both stores** | App Store Connect and Google Play, with your own keys or through your Appeeky connection. Every push writes a release file; `revert` puts the old values back. |
|
|
43
43
|
| **Measured** | Day 7 and day 14: search ranks, conversion, downloads, revenue and ads, against storefronts the release did not change. The verdict goes into `appeeky/playbook.md`. |
|
|
44
44
|
| **What users and rivals say** | Reviews with a summary and drafted replies, competitors' listings and moves, and the category chart rank, one row a day. |
|
|
45
|
+
| **Alerts** | When a target rank, the category chart, ratings, Search Console clicks or AI visibility drops, a release loses, a competitor moves on your targets or a check is late: one GitHub issue, or a Slack message, once per alert. See [Alerts](#alerts). |
|
|
45
46
|
| **AI visibility** | Whether ChatGPT, Claude, Gemini and Perplexity name your app, who they name instead and the pages they cite. |
|
|
46
47
|
| **Ads and data** | Apple Search Ads, Meta and TikTok spend and installs, App Store Connect, Google Play and RevenueCat numbers as CSV your agent can read. |
|
|
47
48
|
| **Specialists and a co-founder** | Six read-only specialist subagents (ASO, reviews, ads, releases, UGC, social) and a co-founder review that starts them, writes a brief to `appeeky/briefs/` and opens a pull request with one listing change. Run it as `/appeeky-cofounder`, or once a week on your Claude plan. |
|
|
@@ -64,7 +65,7 @@ Nothing reaches the stores until a person merges. The merge is the approval.
|
|
|
64
65
|
|
|
65
66
|
| Where | How |
|
|
66
67
|
| --- | --- |
|
|
67
|
-
| **GitHub Actions** | `init --ci` writes three workflows: a check on every pull request, a push on merge, and a daily run that measures and
|
|
68
|
+
| **GitHub Actions** | `init --ci` writes three workflows: a check on every pull request, a push on merge, and a daily run that measures, commits and keeps an issue open while something needs attention. See [In pull requests](#in-pull-requests). |
|
|
68
69
|
| **Your own server** | `docker compose up -d` on any VM: Hetzner, DigitalOcean, AWS, Google Cloud, Railway, Fly.io, Render or a machine in your office. See [Running without GitHub Actions](#running-without-github-actions). |
|
|
69
70
|
| **Your computer** | Every command runs locally with `npx`. [`examples/weekly/`](https://github.com/appeeky/spec/tree/main/examples/weekly) has a cron script for the weekly co-founder review. |
|
|
70
71
|
| **Other CI** | GitLab, Bitbucket or CircleCI: the same three triggers and commands. |
|
|
@@ -86,6 +87,7 @@ appeeky/
|
|
|
86
87
|
seo/ # Google Search Console for the website: clicks per day, queries, pages, summary.md
|
|
87
88
|
search-ads/ # Apple Search Ads on your own key: spend and installs per day, keywords, search terms
|
|
88
89
|
category.csv # rank in the category chart, one row a day
|
|
90
|
+
alerts.json # the alerts already reported, so each is reported once
|
|
89
91
|
playbook.md # what worked and what did not for this app
|
|
90
92
|
.appeeky/data/ # analytics, ads and revenue as CSV (gitignored; data.commit moves it to appeeky/data/)
|
|
91
93
|
```
|
|
@@ -133,6 +135,7 @@ A field you leave out of a listing file is not managed by the spec: it is never
|
|
|
133
135
|
| `seo check\|llms\|pull\|ranks\|keywords\|domain` | The app's website in Google and in AI answers. `check` lists what is missing for search, for the app and for AI crawlers; `llms` writes llms.txt from the listing; `pull` writes Search Console clicks, queries and pages to `appeeky/seo/` (`GSC_CREDENTIALS`). On your own DataForSEO account: `ranks` (Google positions of the site and the store page, and AI Overview citations), `keywords` (volume, difficulty, ideas) and `domain` (what the site ranks for, competing sites). |
|
|
134
136
|
| `category pull` | Record today's rank in the category chart (top 100) in `appeeky/category.csv`. App Store needs no key; Google Play needs `APPEEKY_API_KEY` and `category.googlePlay`. |
|
|
135
137
|
| `data pull` | App Store Connect, Google Play, Apple Search Ads, RevenueCat, Meta and TikTok numbers per day, and attribution by source, keyword and smart link, as CSV files with an index (`--days`, default 90). |
|
|
138
|
+
| `alerts` | What needs attention, from the files the daily run already wrote: target rank drops, lost releases, category chart drops, a wave of 1–2★ reviews, competitors moving on your targets, AI visibility drops, fewer Search Console clicks and late checks. Each with its severity, numbers, window, source file and next step. `--json`, `--markdown` (`-o <file>`), `--new`, `--record` (remembers them in `appeeky/alerts.json`), `--webhook`, `--issue`. |
|
|
136
139
|
| `status` | Every change being measured, in one list: releases and experiments, the metric that decides each, the next check and the result so far. Flags checks that are late, releases measured over the same days, and results built on too few installs. Rewrites `appeeky/loops.md`. |
|
|
137
140
|
| `log` | Releases pushed from this spec. `--markdown` for changelogs and PR descriptions. |
|
|
138
141
|
| `revert <release>` | Put the values from before a release back into the spec. Then `push`. |
|
|
@@ -410,7 +413,7 @@ aiVisibility:
|
|
|
410
413
|
|
|
411
414
|
- `visibility init` writes the intents Appeeky already tracks into the spec. With none yet, Appeeky writes them from your listing; run `init` again a few minutes later.
|
|
412
415
|
- `visibility sync` sends the spec's intents and prompts to Appeeky. Ones only in Appeeky are listed, and archived only with `--prune`. `--dry-run` shows the plan.
|
|
413
|
-
- `visibility pull` writes `appeeky/visibility/us.yaml`. It shows each intent as `winning`, `weak` or `missing`, the share of answers that name you per assistant, who they name instead, the pages they cite (`yours: true` for your own site), and the fixes Appeeky suggests. What moved since the last pull goes to `appeeky/visibility/changes.md`.
|
|
416
|
+
- `visibility pull` writes `appeeky/visibility/us.yaml`. It shows each intent as `winning`, `weak` or `missing`, the share of answers that name you per assistant, who they name instead, the pages they cite (`yours: true` for your own site, `gap: true` for a site cited for other apps and never for yours), and the fixes Appeeky suggests. `overall` has your share of voice and how often you come first across every answer, `apps` the apps named most, and `searches` what the assistants searched the web for. What moved since the last pull goes to `appeeky/visibility/changes.md`.
|
|
414
417
|
- `visibility scan` asks the assistants now instead of waiting for the schedule. It uses AI Visibility credits.
|
|
415
418
|
|
|
416
419
|
`verify` reads the daily series as `ai_visibility`, the share of answers that name the app, before and after a push. A description that says what the app is for in the words people use can move it, and so can the pages the assistants cite.
|
|
@@ -426,7 +429,7 @@ npx @appeeky/spec visibility scan --local --dry-run
|
|
|
426
429
|
npx @appeeky/spec visibility scan --local
|
|
427
430
|
```
|
|
428
431
|
|
|
429
|
-
Each prompt goes to each assistant with web search on, the way the apps answer people, and a second cheap call lists the apps each answer names. The result is the same `appeeky/visibility/<country>.yaml`, plus `history.csv` (one row per scan, intent and assistant, read by `verify`) and `answers/<country>.jsonl` with every answer. Add `aliases:` under `aiVisibility` for other names the assistants use for the app.
|
|
432
|
+
Each prompt goes to each assistant with web search on, the way the apps answer people, and a second cheap call lists the apps each answer names. The result is the same `appeeky/visibility/<country>.yaml`, plus `history.csv` (one row per scan, intent and assistant, read by `verify`) and `answers/<country>.jsonl` with every answer and the searches behind it. Add `aliases:` under `aiVisibility` for other names the assistants use for the app.
|
|
430
433
|
|
|
431
434
|
On a schedule: set `VISIBILITY_EVERY` (days, e.g. `7`) as a repository variable or in the docker `.env`, with the keys as secrets, and the daily routine scans when it is due.
|
|
432
435
|
|
|
@@ -501,6 +504,54 @@ category:
|
|
|
501
504
|
|
|
502
505
|
Charts list the top 100; below that is an empty rank. `verify` reads the file as `category_rank` (lower is better). When no target moved and there is no analytics data, the category rank decides the release. Run it daily (see above) so there is a history before each push.
|
|
503
506
|
|
|
507
|
+
## Alerts
|
|
508
|
+
|
|
509
|
+
The daily run writes the numbers; `alerts` tells you when one of them needs a person. It reads only the files already in the repo (no store or API call) and lists each alert with its severity (`warn` or `critical`), the numbers, the days they compare, the file they come from and the next step:
|
|
510
|
+
|
|
511
|
+
| Kind | From | Speaks up when |
|
|
512
|
+
| --- | --- | --- |
|
|
513
|
+
| `rank-drop` | `appeeky/releases/*.yaml` (the ranks recorded before each push and on its day-7 and day-14 checks) | a target fell 10+ places between its last two recorded checks; critical at 20+, or a top-10 target out of the top 20 |
|
|
514
|
+
| `release-lost` | `appeeky/releases/*.yaml` | a release's latest check (day 7 or 14) came out `lost`, for 14 days after it |
|
|
515
|
+
| `category-drop` | `appeeky/category.csv` | the latest day is 10+ places below the average of the 7 days before; critical at 20+, or out of the chart |
|
|
516
|
+
| `low-ratings` | `appeeky/reviews/<store>/` | at least 3 reviews of 1–2★ in the last 7 days and twice as many as the 7 days before; critical at twice both |
|
|
517
|
+
| `competitor-change` | `appeeky/competitors/changes.md` | in the last 3 days a competitor climbed into the top 10 for one of your targets (critical in the top 3) or put a target in its title |
|
|
518
|
+
| `visibility-drop` | `appeeky/visibility/changes.md` | in the last 3 days the assistants named the app less for an intent (critical when no longer at all) or stopped citing its site |
|
|
519
|
+
| `search-drop` | `appeeky/seo/daily.csv` | Search Console clicks per day over the last 7 days fell 30% against the 7 days before (with 20+ clicks before); critical at 60% |
|
|
520
|
+
| `late-check` | `appeeky/loops.md` (releases and experiments) | a check is 2+ days past its date with no result; critical at 7 |
|
|
521
|
+
|
|
522
|
+
```bash
|
|
523
|
+
npx @appeeky/spec alerts # a table
|
|
524
|
+
npx @appeeky/spec alerts --json # { alerts: [{ key, kind, severity, title, numbers, window, source, next, new }], open, new }
|
|
525
|
+
npx @appeeky/spec alerts --markdown -o a.md # Markdown for an issue body; empty when nothing is open
|
|
526
|
+
npx @appeeky/spec alerts --record # remember the open ones in appeeky/alerts.json
|
|
527
|
+
npx @appeeky/spec alerts --new # only the ones not recorded yet
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
`--record` is how each alert is reported once: the daily run records what it reported and commits `appeeky/alerts.json`, so the same drop is new on the first day only. It is new again when a warning turns critical, and once it clears it is forgotten, so it is reported if it comes back. A quiet day leaves the file as it was.
|
|
531
|
+
|
|
532
|
+
Where they go:
|
|
533
|
+
|
|
534
|
+
- **GitHub.** The daily workflow from `init --ci` keeps one open issue labelled `appeeky-spec-alert` with every open alert, adds a comment with the new ones (so watchers get notified) and closes it when nothing is left. It needs `issues: write`, which the generated workflow has.
|
|
535
|
+
- **Slack or any Slack-compatible webhook.** `alerts --webhook <url>` (or `ALERT_WEBHOOK_URL`) posts the new alerts as `{"text": ...}`. The Docker `daily` routine does it when `ALERT_WEBHOOK_URL` is set, and keeps the same issue with `alerts --issue` when `GITHUB_TOKEN` can write issues. A post that fails is not recorded, so it is sent on the next run.
|
|
536
|
+
- **The weekly co-founder review** reads the open alerts before anything else.
|
|
537
|
+
|
|
538
|
+
Thresholds and kinds to turn off go in `appeeky.spec.yaml`; anything left out keeps its default:
|
|
539
|
+
|
|
540
|
+
```yaml
|
|
541
|
+
alerts:
|
|
542
|
+
off: [competitor-change] # kinds to leave out
|
|
543
|
+
rank-drop: { places: 10 }
|
|
544
|
+
release-lost: { days: 14 } # how long a lost release stays open
|
|
545
|
+
category-drop: { places: 10, days: 7 }
|
|
546
|
+
low-ratings: { days: 7, min: 3, ratio: 2 }
|
|
547
|
+
competitor-change: { days: 3 }
|
|
548
|
+
visibility-drop: { days: 3 }
|
|
549
|
+
search-drop: { days: 7, drop: 0.3, min: 20 }
|
|
550
|
+
late-check: { days: 2 }
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
Target ranks are recorded at each push and on its day-7 and day-14 checks, so `rank-drop` speaks up around releases; between releases the category chart, reviews, competitors and Search Console carry the daily signal.
|
|
554
|
+
|
|
504
555
|
## Attribution
|
|
505
556
|
|
|
506
557
|
With [Appeeky Analytics](https://appeeky.com/attribution) in the app, the spec knows where each install came from (organic store search, an Apple Search Ads keyword, a smart link, the Google Play referrer) and what it paid. Run the server yourself on Cloudflare, or use Appeeky's:
|
|
@@ -589,7 +640,7 @@ docker compose up -d # runs the routines on a schedule, and again after a
|
|
|
589
640
|
docker compose logs -f
|
|
590
641
|
```
|
|
591
642
|
|
|
592
|
-
It runs `daily` at 06:00 UTC and checks for merged listing changes every 15 minutes. `DAILY_AT`, `PUSH_EVERY` and `WEEKLY_AT` change the schedule. Set `HEALTHCHECK_URL` (for example from healthchecks.io) to get an email when a daily run fails or does not happen. For more than one app, copy the service and give each its own env file.
|
|
643
|
+
It runs `daily` at 06:00 UTC and checks for merged listing changes every 15 minutes. `DAILY_AT`, `PUSH_EVERY` and `WEEKLY_AT` change the schedule. Set `HEALTHCHECK_URL` (for example from healthchecks.io) to get an email when a daily run fails or does not happen. Set `ALERT_WEBHOOK_URL` (a Slack incoming webhook, or any that takes Slack's `{"text"}`) to hear about [alerts](#alerts); with Issues: Read and write on `GITHUB_TOKEN` the daily run also keeps the alert issue (`ALERT_ISSUE=0` to skip it). For more than one app, copy the service and give each its own env file.
|
|
593
644
|
|
|
594
645
|
**With a scheduler you already have** (cron, Cloud Run Jobs, Railway cron), run one routine per job:
|
|
595
646
|
|
|
@@ -599,7 +650,7 @@ docker run --rm --env-file app.env ghcr.io/appeeky/appeeky-spec daily
|
|
|
599
650
|
|
|
600
651
|
| Routine | Run it | Does |
|
|
601
652
|
| --- | --- | --- |
|
|
602
|
-
| `daily` | once a day | `category pull`, `visibility pull`, `verify --playbook`, `reviews pull`, `competitors pull`, then commits |
|
|
653
|
+
| `daily` | once a day | `category pull`, `visibility pull`, `verify --playbook`, `reviews pull`, `competitors pull`, then `alerts` (posted to `ALERT_WEBHOOK_URL`, kept in the alert issue) and commits |
|
|
603
654
|
| `push` | every 10–15 minutes | pushes listing changes merged to `main` and commits the release. It remembers the last commit it handled as the `appeeky-spec/pushed` tag. The first run only sets the tag, so it never pushes what was on `main` before. A run that fails leaves the tag, so the next run tries again. |
|
|
604
655
|
| `weekly` | once a week | the co-founder review: the specialists read the repo, an agent writes a brief and opens a pull request with one listing change. Use the `latest-agent` image (adds Claude Code and `gh`), set `CLAUDE_CODE_OAUTH_TOKEN` (run `claude setup-token` on your computer: it uses your Claude Pro or Max plan) or `ANTHROPIC_API_KEY`, and commit the files `agents install` writes (or your own `.github/appeeky-propose.md`). |
|
|
605
656
|
|
package/agents/appeeky-aso.md
CHANGED
|
@@ -26,7 +26,7 @@ Run the CLI the way the co-founder tells you (`appeeky-spec <command> --json` or
|
|
|
26
26
|
- Spare keyword space, including secondary locales a storefront reads (`crossLocalization` in coverage)
|
|
27
27
|
- Words repeated across name, subtitle and keyword field, and wasted characters
|
|
28
28
|
- Competitors that climbed on your targets or changed their listing recently
|
|
29
|
-
- Questions where AI assistants name competitors instead of this app, and the words they use
|
|
29
|
+
- Questions where AI assistants name competitors instead of this app, and the words they use: `namedInstead`, the `gap` sites under `sources` and the `searches` in the visibility files
|
|
30
30
|
- Google queries that bring people to the website and are not targets yet
|
|
31
31
|
- The category rank trend over the last weeks
|
|
32
32
|
|
package/agents/cofounder.md
CHANGED
|
@@ -6,7 +6,7 @@ You are this app's growth co-founder. The repo holds the app's store listing and
|
|
|
6
6
|
|
|
7
7
|
Run the review below, write the brief, and propose at most one listing change.
|
|
8
8
|
|
|
9
|
-
1. **Where things stand.** Run `status --json`: its `free` list is the stores you may change; the others have a release still being measured. Read `appeeky/loops.md`, `appeeky/playbook.md` and the latest brief in `appeeky/briefs/`, if there is one.
|
|
9
|
+
1. **Where things stand.** Run `alerts --json` first: the open alerts (rank, category, rating, Search Console and AI visibility drops, lost releases, competitor moves, late checks) come before anything else, and each critical one goes into the brief with what to do about it. Then `status --json`: its `free` list is the stores you may change; the others have a release still being measured. Read `appeeky/loops.md`, `appeeky/playbook.md` and the latest brief in `appeeky/briefs/`, if there is one.
|
|
10
10
|
|
|
11
11
|
2. **Ask the specialists.** Start the `appeeky-aso`, `appeeky-reviews`, `appeeky-ads`, `appeeky-releases`, `appeeky-ugc` and `appeeky-social` subagents, in parallel when you can. Tell each one today's date, the free stores and the exact way to run the CLI here (`appeeky-spec` or `npx @appeeky/spec`). They only read, and each answers with findings and up to two candidates. If you cannot start subagents, read their instructions (in `.claude/agents/` or `.opencode/agent/`) and do each checklist yourself, one after another. Skip a specialist whose data is missing, and say so in the brief.
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ Run the review below, write the brief, and propose at most one listing change.
|
|
|
20
20
|
4. **Make it.** Edit the listing files under `appeeky/store/`. Keep the brand; never use another app's name. Run `check` and `diff`, and fix every error. A change marked blocked needs a new App Store version: say so.
|
|
21
21
|
|
|
22
22
|
5. **Write the brief** to `appeeky/briefs/<YYYY-MM-DD>.md`:
|
|
23
|
-
- **Where we stand:** what is being measured and when it is checked
|
|
23
|
+
- **Where we stand:** the open alerts and what each needs, what is being measured and when it is checked
|
|
24
24
|
- **What the specialists found:** a few lines each, with the numbers
|
|
25
25
|
- **The change:** what, why, the metric and when it is checked; or why there is none this time
|
|
26
26
|
- **For a person:** review replies to send, comment replies to approve (the social specialist's exact `social reply` commands, which the owner runs), ads changes, product requests, the next UGC experiment with its creator brief, and posts to publish. Spec does not do these.
|
|
@@ -33,4 +33,4 @@ Run the review below, write the brief, and propose at most one listing change.
|
|
|
33
33
|
|
|
34
34
|
7. **Write `.appeeky/proposal.md`:** the first line is a short pull request title. Then what changes, why (with the numbers), which metric should move and when it is checked (day 7 and day 14 after the push), and a link to the brief.
|
|
35
35
|
|
|
36
|
-
Do not run `push`, `reviews push`, `social push`, `social reply`, `social hide`, `social like`, `social delete-comment`, `ugc generate` (without `--dry-run`), `revert` or `pull`. A person reviews the pull request; the push runs when it is merged.
|
|
36
|
+
Do not run `alerts --webhook`, `alerts --issue`, `push`, `reviews push`, `social push`, `social reply`, `social hide`, `social like`, `social delete-comment`, `ugc generate` (without `--dry-run`), `revert` or `pull`. A person reviews the pull request; the push runs when it is merged.
|
package/dist/alerts.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { type CategoryRank } from "./category.js";
|
|
2
|
+
import { type ReleaseRecord } from "./history.js";
|
|
3
|
+
import { type Loop } from "./loops.js";
|
|
4
|
+
import { type Review } from "./reviews.js";
|
|
5
|
+
import type { AlertKind, Project, SpecFile } from "./schema.js";
|
|
6
|
+
export type AlertSeverity = "warn" | "critical";
|
|
7
|
+
export interface Alert {
|
|
8
|
+
/** Stable id: the same problem keeps the same key from one day to the next. */
|
|
9
|
+
key: string;
|
|
10
|
+
kind: AlertKind;
|
|
11
|
+
severity: AlertSeverity;
|
|
12
|
+
/** What happened, in a line. */
|
|
13
|
+
title: string;
|
|
14
|
+
/** The numbers behind it, in words. */
|
|
15
|
+
numbers: string;
|
|
16
|
+
/** The days the numbers compare. */
|
|
17
|
+
window: string;
|
|
18
|
+
/** The file the numbers come from, relative to the repo. */
|
|
19
|
+
source: string;
|
|
20
|
+
/** What to do next: a command or a skill. */
|
|
21
|
+
next: string;
|
|
22
|
+
/** Not in appeeky/alerts.json yet, or worse than when it was recorded. */
|
|
23
|
+
new?: boolean;
|
|
24
|
+
}
|
|
25
|
+
type Config = SpecFile["alerts"];
|
|
26
|
+
/** Ranks newer than this are still news; older ones wait for the next check. */
|
|
27
|
+
export declare const RANK_FRESH_DAYS = 10;
|
|
28
|
+
/**
|
|
29
|
+
* Target ranks over time. Spec records them in the release files: the ranks right before
|
|
30
|
+
* each push (the baseline) and on its day-7 and day-14 checks. The last two observations of
|
|
31
|
+
* each target, on different days, show whether it fell.
|
|
32
|
+
*/
|
|
33
|
+
export declare function rankDrops(project: Project, releases: ReleaseRecord[], cfg: Config["rank-drop"], now: Date): Alert[];
|
|
34
|
+
/** A release whose latest check (day 7 or day 14) came out lost. */
|
|
35
|
+
export declare function lostReleases(releases: ReleaseRecord[], cfg: Config["release-lost"], now: Date): Alert[];
|
|
36
|
+
/** The category rank on its latest recorded day against the average of the days before. */
|
|
37
|
+
export declare function categoryDrops(history: CategoryRank[], cfg: Config["category-drop"], now: Date): Alert[];
|
|
38
|
+
/** More 1–2 star reviews in the last days than in the days before. */
|
|
39
|
+
export declare function lowRatingWaves(reviews: Review[], cfg: Config["low-ratings"], now: Date): Alert[];
|
|
40
|
+
/** Competitor changes on your targets: a climb into the top 10, or a target put in its title. */
|
|
41
|
+
export declare function competitorMoves(changes: Array<{
|
|
42
|
+
date: string;
|
|
43
|
+
name: string;
|
|
44
|
+
change: string;
|
|
45
|
+
}>, spec: SpecFile, cfg: Config["competitor-change"], now: Date): Alert[];
|
|
46
|
+
/** Lines of appeeky/visibility/changes.md where the assistants stopped naming or citing the app. */
|
|
47
|
+
export declare function readVisibilityChanges(root: string): Promise<Array<{
|
|
48
|
+
date: string;
|
|
49
|
+
country: string;
|
|
50
|
+
change: string;
|
|
51
|
+
}>>;
|
|
52
|
+
export declare function visibilityDrops(changes: Array<{
|
|
53
|
+
date: string;
|
|
54
|
+
country: string;
|
|
55
|
+
change: string;
|
|
56
|
+
}>, cfg: Config["visibility-drop"], now: Date): Alert[];
|
|
57
|
+
export declare function readSearchDaily(root: string): Promise<Array<{
|
|
58
|
+
date: string;
|
|
59
|
+
clicks: number;
|
|
60
|
+
}>>;
|
|
61
|
+
export declare function searchDrops(rows: Array<{
|
|
62
|
+
date: string;
|
|
63
|
+
clicks: number;
|
|
64
|
+
}>, cfg: Config["search-drop"], now: Date): Alert[];
|
|
65
|
+
export declare function lateChecks(loops: Loop[], cfg: Config["late-check"], now: Date): Alert[];
|
|
66
|
+
/** Every alert the repo's files show today, critical first. Kinds under `alerts.off` are left out. */
|
|
67
|
+
export declare function collectAlerts(project: Project, now?: Date): Promise<Alert[]>;
|
|
68
|
+
export interface AlertState {
|
|
69
|
+
open: Record<string, {
|
|
70
|
+
kind: AlertKind;
|
|
71
|
+
severity: AlertSeverity;
|
|
72
|
+
since: string;
|
|
73
|
+
}>;
|
|
74
|
+
}
|
|
75
|
+
export declare const alertStateFile: (root: string) => string;
|
|
76
|
+
export declare function readAlertState(root: string): Promise<AlertState>;
|
|
77
|
+
/** Mark each alert new when it was not recorded yet, or was recorded as a warning and is now critical. */
|
|
78
|
+
export declare function markNew(alerts: Alert[], state: AlertState): Alert[];
|
|
79
|
+
/** The state after this run: the open alerts, each with the day it was first seen. Cleared ones are dropped. */
|
|
80
|
+
export declare function nextAlertState(alerts: Alert[], state: AlertState, now?: Date): AlertState;
|
|
81
|
+
/** Write appeeky/alerts.json; only when something changed, so a quiet day makes no commit. */
|
|
82
|
+
export declare function writeAlertState(root: string, state: AlertState): Promise<boolean>;
|
|
83
|
+
export declare const ALERT_LABEL = "appeeky-spec-alert";
|
|
84
|
+
export declare const ISSUE_TITLE = "Appeeky Spec alerts";
|
|
85
|
+
/** Markdown for the issue body (or a comment with the new ones). Empty when there is nothing. */
|
|
86
|
+
export declare function alertsMarkdown(alerts: Alert[], appName: string, now?: Date, heading?: string): string;
|
|
87
|
+
/** Plain text with Slack-style bold, for a webhook. */
|
|
88
|
+
export declare function alertsText(alerts: Alert[], appName: string, link?: string): string;
|
|
89
|
+
/** Post `{ text }` to a Slack-compatible incoming webhook. */
|
|
90
|
+
export declare function postWebhook(url: string, text: string, fetcher?: typeof fetch): Promise<void>;
|
|
91
|
+
/** owner/repo from GITHUB_REPOSITORY, or from the origin remote when it is on github.com. */
|
|
92
|
+
export declare function githubRepo(root: string, env?: NodeJS.ProcessEnv): string | null;
|
|
93
|
+
export declare function parseGithubRepo(url: string): string | null;
|
|
94
|
+
export interface IssueSync {
|
|
95
|
+
action: "created" | "updated" | "closed" | "none";
|
|
96
|
+
number?: number;
|
|
97
|
+
url?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One open issue labelled appeeky-spec-alert: created when alerts appear, its body replaced
|
|
101
|
+
* on each run (with a comment listing the new ones, so watchers are notified), closed when
|
|
102
|
+
* nothing is left.
|
|
103
|
+
*/
|
|
104
|
+
export declare function syncIssue(opts: {
|
|
105
|
+
repo: string;
|
|
106
|
+
token: string;
|
|
107
|
+
api?: string;
|
|
108
|
+
}, body: string, newBody: string, fetcher?: typeof fetch): Promise<IssueSync>;
|
|
109
|
+
export {};
|