carlos / platform Public

Analytics on-ramp: copy deck and Luna brief (pending review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 68f416da0994d8679f8fc361540749df8a0b4c6a parent be6888e
2 files changed, +140 −0
  • docs/superpowers/plans/2026-10-26-analytics-onramp-copy.md +76 −0
  • docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP.md +64 −0
diff --git a/docs/superpowers/plans/2026-10-26-analytics-onramp-copy.md b/docs/superpowers/plans/2026-10-26-analytics-onramp-copy.md
new file mode 100644
index 000000000..cd0e66b78
--- /dev/null
+++ b/docs/superpowers/plans/2026-10-26-analytics-onramp-copy.md
@@ -0,0 +1,76 @@
+# Analytics on-ramp: copy deck
+
+Every new or changed user-facing string of the analytics on-ramp plan
+(`2026-10-26-analytics-onramp.md`). The gate is
+`internal/console/approved_analytics_onramp_copy_test.go`
+(`TestAnalyticsOnrampCopyDeckIsApprovedAndApplied`).
+
+Status: pending the Luna pass.
+
+The rules (the same as the console navigation deck,
+`2026-10-25-console-ux-nav-copy.md`):
+
+- One table, columns `| id | where | old | new | checked by | status |`. A row
+ is one line.
+- `where` is a path relative to `internal/console/`, then a short location
+ note in parentheses. The gate searches the file named by the first token.
+- `new` is the approved text, used verbatim by the task that writes it. It is
+ `(removed)` for a string that goes.
+- `checked by` is `gate` (a plain string the gate finds literally in the
+ file, once the owning task lists its id in `onrampCopyBuilt`) or the name of
+ the owning task's test, which the gate only checks exists.
+- `status` is `pending`, then `approved` or `removed`. No pending row may
+ reach code or a template.
+- No em dashes in `new`. A full stop and a new sentence instead.
+- Human text only. Error fragments, diagnostics, JSON keys and URLs are not
+ rows.
+- Placeholders: `<app>` an app's name, `<state>` the word on or off,
+ `<count>` the word edge or off. `<a>` marks where a link starts and ends.
+- Strings that stay as they are are not rows: the Analytics tab's tables,
+ chart and range toolbar, and the settings forms' own labels.
+
+What the strings are for:
+
+- The Analytics tab, when analytics is off for the app, stops pointing at
+ Settings. It says what is counted and, for an owner, offers one button that
+ turns analytics on for this app and comes back to the tab. A member sees a
+ line saying an owner can turn it on. The empty tables and chart are hidden
+ while it is off.
+- The Create an app form gets a checkbox, ticked when the account's default
+ is on. Choosing differently from the account gives the new app its own
+ setting. An owner also gets a button that makes the current choice the
+ account default, which covers every app in the account without its own
+ setting. A member sees the checkbox but cannot change it.
+- New accounts start with analytics on. Existing accounts are unchanged.
+- `carlos apps create` gains `--analytics` and `--no-analytics`.
+
+| id | where | old | new | checked by | status |
+|---|---|---|---|---|---|
+| AN-C01 | templates/app_analytics.html (analytics off, first sentence, bold) | Analytics is off for this app (from the account). | Analytics is off for this app. | gate | pending |
+| AN-C02 | templates/app_analytics.html (analytics off, what is counted) | When on, the edge counts HTML page views and daily visitors as it serves them: no JavaScript, no cookie, no stored IP. A visitor is a salted hash that changes every day. | When it is on, the edge counts HTML page views and daily visitors. No JavaScript, no cookie, no stored IP. | gate | pending |
+| AN-C03 | templates/app_analytics.html (analytics off, owner's button) | (new) | Turn on analytics | gate | pending |
+| AN-C04 | templates/app_analytics.html (analytics off, what a member sees instead of the button) | (new) | An owner of this account can turn it on. | gate | pending |
+| AN-C05 | templates/app_analytics.html (analytics off, the pointer to Settings; was NAV-C44) | Turn it on for this app in `<a>`Settings, under Errors and analytics`</a>`, or for the whole account in the account's `<a>`Settings`</a>`. | (removed) | TestAnalyticsTabOffStateOwner | pending |
+| AN-C06 | analyticsview.go (flash on the Analytics tab after Turn on analytics) | (new) | Analytics is on for this app. Page views show here as they are counted. | gate | pending |
+| AN-C10 | templates/app_new.html (checkbox label) | (new) | Count page views and visitors with analytics | gate | pending |
+| AN-C11 | templates/app_new.html (under the checkbox) | (new) | No JavaScript, no cookie, no stored IP. | gate | pending |
+| AN-C12 | templates/app_new.html (under the checkbox, the account's default is on) | (new) | This account's default is on. | gate | pending |
+| AN-C13 | templates/app_new.html (under the checkbox, the account's default is off) | (new) | This account's default is off. | gate | pending |
+| AN-C14 | templates/app_new.html (owner's button under the checkbox) | (new) | Make this the account default | gate | pending |
+| AN-C15 | templates/app_new.html (owner's note beside the button) | (new) | The account default also covers every existing app without its own setting. | gate | pending |
+| AN-C16 | templates/app_new.html (member's note; the checkbox is shown but cannot be changed) | (new) | Only an owner can change this. | gate | pending |
+| AN-C17 | server.go (flash: a member's form chose differently from the account default) | (new) | Only an owner can change analytics for a new app. Nothing was created. | gate | pending |
+| AN-C18 | server.go (flash: the app was created but its analytics setting failed to save) | (new) | Created app `<app>`, but its analytics setting could not be saved. Set it in Settings, under Errors and analytics. | TestNewAppAnalyticsWriteFailureSaysSo | pending |
+| AN-C19 | analyticsview.go (flash on the create form after Make this the account default, on) | (new) | Analytics is now on for every app in this account without its own setting. | gate | pending |
+| AN-C20 | analyticsview.go (flash on the create form after Make this the account default, off) | (new) | Analytics is now off for every app in this account without its own setting. | gate | pending |
+| AN-C21 | templates/account_settings.html (Analytics, last sentence of the help) | Whether that needs consent where your visitors are is your call, which is why it is off until you turn it on. | Whether that needs consent where your visitors are is your call. New accounts start with it on. | gate | pending |
+| AN-C22 | templates/app_settings.html (Errors and analytics, last sentence of the Analytics help) | Whether that needs consent where your visitors are is your call, which is why it is off until you turn it on. | Whether that needs consent where your visitors are is your call. New accounts start with it on. | gate | pending |
+| AN-C30 | ../../apps.go (`carlos apps create` flag help, `--analytics`) | (new) | turn analytics on for the new app (default: follow the account) | gate | pending |
+| AN-C31 | ../../apps.go (`carlos apps create` flag help, `--no-analytics`) | (new) | turn analytics off for the new app (default: follow the account) | gate | pending |
+| AN-C32 | ../../apps.go (`carlos apps create` output, the app has its own setting) | (new) | analytics: `<state>`, set for this app | TestAppsCreateAnalyticsLine | pending |
+| AN-C33 | ../../apps.go (`carlos apps create` output, the app follows the account) | (new) | analytics: `<state>`, following the account | TestAppsCreateAnalyticsLine | pending |
+| AN-C34 | ../../apps.go (`carlos apps create` error, the console did not confirm the choice) | (new) | the app `<app>` was created, but the console did not confirm its analytics setting. Set it with: carlos analytics --app `<app>` --set-count `<count>` | TestAppsCreateAnalyticsMismatch | pending |
+| AN-C35 | ../../apps.go (`carlos apps create` error, both flags given) | (new) | choose --analytics or --no-analytics, not both | gate | pending |
+| AN-C36 | apicli.go (`carlos apps create` refusal printed to a member) | (new) | only an owner can choose analytics for a new app. Leave out --analytics and --no-analytics to follow the account | gate | pending |
+| AN-C40 | ../../docs/site/cli.md (carlos analytics, first paragraph) | Off until you turn it on, for one app or for the whole account. | New accounts start with it on. Turn it on or off for one app or for the whole account. | gate | pending |
+| AN-C41 | ../../docs/site/cli.md (carlos apps, after the `--region` example) | (new) | `--analytics` or `--no-analytics` turns analytics on or off for the new app. Without either, the app follows the account's setting. Only an owner can choose differently from the account. | gate | pending |
diff --git a/docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP.md b/docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP.md
new file mode 100644
index 000000000..ed517c86d
--- /dev/null
+++ b/docs/superpowers/plans/LUNA-COPY-BRIEF-ANALYTICS-ONRAMP.md
@@ -0,0 +1,64 @@
+# Copy review brief: analytics on-ramp deck (delegated by Paul, 2026-10-26)
+
+Paul delegated copy review for plan copy to you. You are the copy editor; your
+edits will be applied as approved copy. This is round 1 of at most three; a
+round with no fact problem ends the review.
+
+Read `docs/superpowers/plans/2026-10-26-analytics-onramp-copy.md` (28 rows,
+ids AN-C01 to AN-C41, with gaps). The `new` column is yours to change. The
+ids, `where` and `checked by` columns are fixed. The deck's own "What the
+strings are for" section says what each group of strings does. The plan is
+`docs/superpowers/plans/2026-10-26-analytics-onramp.md`.
+
+## What the change is
+
+CARLOS is a hosting platform. Its console is the web app people use to manage
+their apps; `carlos` is its command line. Analytics counts page views at the
+edge (the server in front of the app), with no JavaScript, no cookie and no
+stored IP. Until now it was off unless an owner turned it on in Settings.
+
+- The app's Analytics tab, when analytics is off, gets a one-click
+ "Turn on analytics" button for owners. Members (non-owners) see a line
+ saying an owner can turn it on.
+- The Create an app form gets an analytics checkbox, ticked from the
+ account's default. Owners can also make their choice the account default.
+ The account default applies to every app without its own setting, existing
+ apps included, so the note beside that button must say so.
+- New accounts start with analytics on. Existing accounts keep what they had.
+ Two settings pages and the CLI docs said "off until you turn it on", which
+ is no longer true for new accounts.
+- `carlos apps create` gets `--analytics` and `--no-analytics`.
+
+## House rules (Paul's, all binding)
+
+- No em dashes, ever. Use a full stop and a new sentence. The `old` column may
+ hold old text; do not copy its punctuation, and do not edit `old`.
+- Plain words. No jargon a reader would not know. Short. Say what to do next.
+- Neutral names only (shop, example.com). Never a tenant's name.
+- Human text only. If a string is not human text (a log line, a route
+ pattern, a header name, a JSON key, an error fragment), flag it rather than
+ edit it.
+- Keep every placeholder exactly (`<app>`, `<state>`, `<count>`), every `<a>`
+ and `</a>` boundary where it is, and every command and flag exactly
+ (`carlos analytics --app <app> --set-count <count>`, `--analytics`,
+ `--no-analytics`).
+- CLI flag help (AN-C30, AN-C31) and CLI errors (AN-C34 to AN-C36) start with
+ a lower-case letter, as Go's flag and error conventions want. Page text
+ starts with a capital.
+- Button labels (AN-C03, AN-C14) stay short verb phrases.
+- Do not change meaning or the facts a string states. If a fact looks wrong or
+ conflicts with another row, flag it, do not rewrite it. In particular the
+ facts in AN-C15 (the account default covers existing apps without their own
+ setting), AN-C17 (nothing was created) and AN-C21/AN-C22/AN-C40 (new
+ accounts start with it on) are true and must stay.
+- A row whose `new` is `(removed)` is a string that goes. Leave it alone.
+
+## Output
+
+Markdown, in this shape:
+
+1. A table of changes only: `ID | current | new | why` (a few words in why).
+ Leave unchanged rows out. "current" is the deck's `new` text.
+2. A list of flagged rows: `id | problem` (fact conflict, not human text,
+ placeholder unclear), or "Flagged rows: none."
+3. One line of counts: how many rows you changed, flagged and left alone.