Skip to content

fix(cli): the setup reminder prints first and says why to run init now - #12544

Merged
josephfarina merged 7 commits into
mainfrom
josephfarina/setup-reminder-first
Nov 18, 2026
Merged

josephfarina merged 7 commits into
mainfrom
josephfarina/setup-reminder-first

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

User impact

In a project that installs Astryx but never ran init, every command except init, agent-docs and mcp reminds once a day: "Next step: run npx astryx init …". Coding agents almost never acted on it, for two reasons this PR fixes:

  1. They never saw it. The reminder printed on stderr after the command's own output, and agents usually keep only the start of a long answer (npx astryx component --list 2>&1 | head -120). The tail was cut, and because the reminder prints once a day, that one showing was used up unseen.
  2. When they saw it, it read like an optional extra. "to finish setup and install the Astryx agent prompt" reads as a file change nobody asked for, so agents kept working without it.

After this change the reminder prints before the command's output, and says why to run init now:

Astryx is not set up in this project yet. Next step: run `npx astryx init` now, before you write Astryx code. It asks no questions, prints the getting-started steps, and saves the Astryx guide to AGENTS.md.

Problem and solution fit

  • Why do agents skip init? The one signal that reaches them inside the CLI (this reminder) was cut by their own output trimming, or worded as optional.
  • Why does it hurt? Without init there is no Astryx guide in AGENTS.md/CLAUDE.md, so later sessions guess at components, tokens and setup.
  • Why does it matter? init is the setup step, and agents set up most new Astryx projects.

The fix keeps every rule of the reminder (once a day per project, never under CI, never in --json, quiet once set up, the same command it names) and changes only where it prints and what it says.

Expected behavior and authority

AST-081 DEC-14 now records it: the setup reminder is the one notice that prints before the command's output, on stderr, once a day per project, on a failing command too (which uses up the day), never into stdout or JSON; CI and the other quiet paths silence it.

The CLI's no-prompt, agent-first conventions (docs/contributing/cli-conventions.md: an agent reads every byte, test text with agents). The command the reminder names keeps the AST-081 FR5 picker; the core and CLI postinstall layers share the same text through the generated setup contract (pnpm check:setup-contract).

Smallest restoration

  • clients/cli/index.mjs: the preAction hook prints the reminder (once a day, not under CI) instead of keeping it for postAction. A failing command now shows it too, since the line comes first.
  • foundation/agent-docs/agent-doc-state.mjs (+ the generated copy in core): the new wording.

Evidence

  • Before: re-running each blind run's first Astryx command (the one the daily reminder rides) exactly as the agent wrote it, pipes kept, the reminder reached the agent's output in about a third of runs (only runs with no pipe); after: in nearly all.
  • Blind tests with fresh agents (several coding-agent CLIs and models, strong to small; casual asks in an empty folder, a plain app, and an app that installs Astryx), local registry serving this build: more runs ran init correctly with this change than on main; moving the line alone did not change behavior, the wording plus the position did. A held-out task set is being scored the same way.
  • Representative unchanged path: --json stays clean; CI prints nothing; a set-up project prints nothing; a second command the same day prints nothing.
  • Stderr replay (12 commands × 3 projects × first run / second run / CI, 108 runs a side, main vs this head): exit codes and stdout identical; --json 2>&1 parses; --version 2>&1 | head -1 intact; 2>/dev/null stdout identical; the reminder never prints under CI, --json, --version or help; once a day it is line 1 of the merged stream. No tool interface breaks.
  • Regression tests: setup-nudge.test.mjs runs the real CLI with both streams into one file, as 2>&1 does, and checks the reminder comes before the first line of output, that a failing command shows it and uses the day, and the new wording on every path; the postinstall tests check the shared text.

Scope

Components: cli (setup reminder), core (generated setup contract copy), AST-081 DEC-14

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

CI=1 npx vitest run --project node packages/cli (only theme-edit picture tests that fail the same on main on this machine, which has no browser), npx vitest run packages/core/src/postinstall.test.mjs, node scripts/generate-setup-contract.mjs --check, node scripts/check-cli-structure.mjs, node scripts/check-changesets.mjs.

Writing rubric results

R1 narration: none; the DEC-14 paragraph states what the reminder does in the present tense.
R2 research: none in the record; the blind-test results stay in this description.
R3 evidence: no evidence cells changed.
R4 rejected alternatives: none added; DEC-14 keeps its one Rejected line.
R5 change references: none.
R6 open questions: none.
R7 project status: none.

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 18, 2026 5:55am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 6:05 AM UTC

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b97e647

Storybook · Sandbox · built from this PR's head

Package size:

  • @astryxdesign/cli 5.38 MB packed (+81 B); no new dependencies
  • @astryxdesign/core 7.66 MB packed (+36 B); no new dependencies

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the setup reminder, and on two fixes.

Owner decision needed: no current spec clause covers where the setup reminder prints, whether a failed command shows it, or its new text; docs/specs/AST-081-global-mode/spec.md FR2 and FR5 cover only the commands it names. An engineering owner records the decision, for example by adding the clause to that record or by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Blocking:

  • setup-nudge.test.mjs:217-224 still passes when the reminder prints after the output, because stdout and stderr are captured apart and joined in a fixed order, so it should assert the order on one interleaved stream.
  • The description says every command but init reminds once a day, but mcp is exempt too (SETUP_NUDGE_EXEMPT in clients/cli/index.mjs).

Also worth a look: outside-project.test.mjs:899 still matches the old /finish setup/ text and can no longer fail, and each reminded answer now opens with an empty line because setupNudge()'s leading newline survives .trimEnd().

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Changeset: the reminder now prints on stderr before the command's own output — verified (clients/cli/index.mjs:951-1020; a real component --list run).
  • Changeset: a reminder at the end was cut by 2>&1 | head and the day used up unseen — verified (the base prints and records the day after the command; a real base run).
  • Changeset: it still never prints under CI, in --json, or once the project is set up — verified (setup-nudge.test.mjs:175-182, :207-213, :259-263; real runs).
  • Changeset: a command that fails now shows it — verified (setup-nudge.test.mjs:226-232; a real run).
  • Changeset: the reminder now reads as quoted — verified (foundation/agent-docs/agent-doc-state.mjs:213).
  • Changeset: the old text said init would install the agent prompt — verified (base agent-doc-state.mjs).
  • Changeset: agents read the old text as an unrequested file change — the author's agent-run finding, not checkable here.
  • Changeset: the command it names and the places it prints are unchanged — verified (the picker calls at index.mjs:1003, :1015, :1020; the same three surfaces).
  • Description: every command but init reminds once a day — false (mcp is exempt too, index.mjs:569).
  • Description: init asks no questions, prints the remaining setup steps and saves the guide to AGENTS.md — verified (commands/init.doc.mjs:18; init writes the block to the root AGENTS.md).
  • Description: once a day, no CI, no --json, quiet once set up and the same command are kept — verified (tests above; real runs).
  • Description: Core and CLI postinstall share the text through the generated contract — verified (generate-setup-contract.mjs --check in sync).
  • Description: blind agent runs saw and acted on the reminder more often — stated, no transcripts in the pull request.
  • Description: the new test checks the reminder comes before the output — false (setup-nudge.test.mjs:217-224 passes with the old placement).
  • Description: the tests check that a failure shows it and uses the day, the new text on every path, and the shared postinstall text — verified (the failure test fails with the old placement; setup-nudge.test.mjs:170, :307, :322; cli-postinstall.test.mjs:88; core/src/postinstall.test.mjs:150, :193).
  • Description: the listed test and check commands pass — verified for the related suites, the setup-contract, changeset and CLI-structure checks.
  • .changeset/setup-reminder-first.md — clear
  • .changeset/setup-reminder-says-why.md — clear
  • packages/cli/clients/cli/commands/cli-postinstall.test.mjs — clear
  • packages/cli/clients/cli/commands/setup-nudge.test.mjs — the ordering test does not prove the order
  • packages/cli/clients/cli/index.mjs — behavior waits on an owner decision; non-blocking leading empty line
  • packages/cli/foundation/agent-docs/agent-doc-state.mjs — new text waits on an owner decision
  • packages/core/scripts/agent-doc-state.mjs — clear (generated copy, in sync)
  • packages/core/src/postinstall.test.mjs — clear
  • Cross-file: packages/cli/clients/cli/commands/outside-project.test.mjs:899 still matches the old text (non-blocking)

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as ready for review November 18, 2026 02:42

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about the setup reminder, and on two fixes.

Owner decision needed: no current spec clause covers where the setup reminder prints, whether a failed command shows it, or its new text, since docs/specs/AST-081-global-mode/spec.md FR2 and FR5 cover only the command it names and its DEC-14 puts the other once-a-day notices after the output. An engineering owner records the decision, either by adding the clause to that record or by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Blocking:

  • setup-nudge.test.mjs:217-224 still passes when the reminder prints after the output, because stdout and stderr are captured apart and joined in a fixed order, so it should assert the order on one interleaved stream.
  • The description says every command but init reminds once a day, but mcp is exempt too (SETUP_NUDGE_EXEMPT in clients/cli/index.mjs).

Also worth a look: outside-project.test.mjs:899 still matches the old /finish setup/ text and can no longer fail, and each reminded answer opens with an empty line because setupNudge()'s leading newline survives .trimEnd().

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Changeset: the reminder now prints on stderr before the command's own output — verified (clients/cli/index.mjs:951-954, :1003-1020; a real component --list run puts it on line 2 of 529).
  • Changeset: a reminder at the end was cut by 2>&1 | head and the day used up unseen — verified (the base prints and records the day after the command; a real base run ends with it on line 528).
  • Changeset: it still never prints under CI, in --json, or once the project is set up — verified (setup-nudge.test.mjs CI, --json and set-up cases; real runs).
  • Changeset: a command that fails now shows it — verified (setup-nudge.test.mjs:226-232; a real run).
  • Changeset: the reminder now reads as quoted — verified (foundation/agent-docs/agent-doc-state.mjs:213, Core's generated copy :223).
  • Changeset: the old text said init would install the agent prompt — verified (the base agent-doc-state.mjs).
  • Changeset: agents read the old text as an unrequested file change — the author's agent-run finding, not checkable here.
  • Changeset: the command it names and the places it prints are unchanged — verified (the picker calls at index.mjs:1003, :1015, :1020; the same three surfaces).
  • Description: every command but init reminds once a day — false (mcp is exempt too, index.mjs:569).
  • Description: the reminder printed after the output, so agents that keep the start lost it while the day was used — verified (base runs).
  • Description: the old wording read as optional, and blind agent runs saw and acted on the new reminder more often — the author's findings, with no transcripts in the pull request.
  • Description: the new text, with init asking no questions, printing the getting-started steps and saving the guide to AGENTS.md — verified (agent-doc-state.mjs:213; commands/init.doc.mjs:18-24).
  • Description: once a day, no CI, no --json, quiet once set up and the same command are kept — verified (tests above; real runs).
  • Description: the named command keeps the picker, and Core and CLI postinstall share the text through the generated contract — verified (generate-setup-contract.mjs --check in sync).
  • Description: the hook prints in preAction instead of postAction, and a failing command now shows it — verified (index.mjs:951-1024).
  • Description: the new test checks the reminder comes before the output — false (setup-nudge.test.mjs:217-224 passes with the old placement).
  • Description: the tests check that a failure shows it and uses the day, the new text on every path, and the shared postinstall text — verified (the failure test fails with the old placement; setup-nudge.test.mjs:170, :307, :322; cli-postinstall.test.mjs:88; core/src/postinstall.test.mjs:150, :193).
  • Description: no public API hidden under the fix — verified (no API rows in the built surfaces).
  • Description: the listed test and check commands pass — verified for the related suites and the setup-contract, changeset and CLI-structure checks.
  • .changeset/setup-reminder-first.md — clear
  • .changeset/setup-reminder-says-why.md — clear
  • packages/cli/clients/cli/commands/cli-postinstall.test.mjs — clear
  • packages/cli/clients/cli/commands/setup-nudge.test.mjs — the ordering test does not prove the order
  • packages/cli/clients/cli/index.mjs — behavior waits on an owner decision; non-blocking leading empty line
  • packages/cli/foundation/agent-docs/agent-doc-state.mjs — new text waits on an owner decision
  • packages/core/scripts/agent-doc-state.mjs — clear (generated copy, in sync)
  • packages/core/src/postinstall.test.mjs — clear
  • Cross-file: packages/cli/clients/cli/commands/outside-project.test.mjs:899 still matches the old text (non-blocking)

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (engineering owner, covering this pull request): the once-a-day setup reminder goes to standard error before the command's output, also on a command that fails (a failing command uses up the day), and never into standard output or JSON. The existing quiet paths, such as CI=1, still suppress it. spec:AST-081 DEC-14 states this placement, and this pull request merges only if the replay of standard-error output shows that no tool breaks with the earlier placement.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec cafe451

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec f8e6175

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: two description fixes stand between this pull request and approval; the code, the tests and the spec change are in order.

Blocking:

  • The description says every command but init reminds once a day, but agent-docs and mcp are exempt too (SETUP_NUDGE_EXEMPT in clients/cli/index.mjs), so it should name all three.
  • The owner decision on this pull request lets it merge only once the replay of standard-error output shows that no tool breaks with the reminder first, and the description does not report that result yet, so add which commands or tools were replayed and that none broke.

The new one-stream test now fails with the old placement, so the earlier concern about the ordering test is resolved. Also worth a look: outside-project.test.mjs:899 still matches the old /finish setup/ text and can no longer fail, and each reminded answer opens with an empty line because setupNudge()'s leading newline survives .trimEnd().

Claims and files checked

Review mode: full; reason: spec-record

  • Changeset: the reminder now prints on stderr before the command's own output — verified (clients/cli/index.mjs:951-954, :1001-1020; a real component --list run puts it on line 2 of 529).
  • Changeset: at the end of the output it was cut by 2>&1 | head and the day used up unseen — verified (the base prints and records the day after the command; a real base run ends with it on line 528).
  • Changeset: it still never prints under CI, in --json, or once the project is set up — verified (setup-nudge.test.mjs:176-185, :208-216, :278-282; real runs).
  • Changeset: a command that fails now shows it — verified (setup-nudge.test.mjs:245-251, which fails with the base placement; a real run).
  • Changeset: the reminder now reads as quoted — verified (foundation/agent-docs/agent-doc-state.mjs:213, Core's generated copy :223).
  • Changeset: the old text said init would install the agent prompt — verified (the base agent-doc-state.mjs).
  • Changeset: agents read the old text as a file change nobody asked for — the author's agent-run finding, not checkable here.
  • Changeset: the command it names and the places it prints are unchanged — verified (the picker calls at index.mjs:1001-1020; the CLI reminder and both postinstalls).
  • Description: every command but init reminds once a day — false (agent-docs and mcp are exempt too, index.mjs:569).
  • Description: the reminder printed after the output, agents keep the start of a long answer, and the day was used up unseen — verified (base runs).
  • Description: the old wording read as optional, and blind agent runs saw and acted on the new reminder more often — the author's findings, with no transcripts in the pull request.
  • Description: the new text, with init asking no questions, printing the getting-started steps and saving the guide to AGENTS.md — verified (agent-doc-state.mjs:213; commands/init.doc.mjs:18-24).
  • Description: the global-mode record's notice decision now records the placement, the failing command, stderr only and the quiet paths — verified (docs/specs/AST-081-global-mode/spec.md:1174-1180).
  • Description: once a day, no CI, no --json, quiet once set up and the same command are kept — verified (the tests above; real runs).
  • Description: the named command keeps the picker, and the Core and CLI postinstalls share the text through the generated contract — verified (the setup-contract check is in sync).
  • Description: the hook prints in preAction instead of postAction, so a failing command shows it too — verified (index.mjs:951-1024).
  • Description: the regression test sends both streams to one file and checks the order, the failure case and the wording; the postinstall tests check the shared text — verified (the order and failure tests fail with the base placement; the order test anchors on the first component entry; cli-postinstall.test.mjs:88, core/src/postinstall.test.mjs:150, :193).
  • Description: --json stays clean, CI prints nothing, a set-up project and a second command the same day print nothing — verified (tests; real runs).
  • Description: no public API, default or interaction model is hidden under the fix — verified (the built surfaces of Core, build and the themes are identical; no CLI option changes).
  • Description: the listed test and check commands pass — verified for the related suites and the setup-contract, changeset and CLI-structure checks; the full CLI suite is left to CI.
  • .changeset/setup-reminder-first.md — clear
  • .changeset/setup-reminder-says-why.md — clear
  • docs/specs/AST-081-global-mode/spec.md — clear (owner-approved at this head; no approval line changed)
  • packages/cli/clients/cli/commands/cli-postinstall.test.mjs — clear
  • packages/cli/clients/cli/commands/setup-nudge.test.mjs — clear (the order and failure tests fail with the base placement)
  • packages/cli/clients/cli/index.mjs — clear; non-blocking leading empty line
  • packages/cli/foundation/agent-docs/agent-doc-state.mjs — clear
  • packages/core/scripts/agent-doc-state.mjs — clear (generated copy, in sync)
  • packages/core/src/postinstall.test.mjs — clear
  • Cross-file: packages/cli/clients/cli/commands/outside-project.test.mjs:899 still matches the old text (non-blocking)

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 0b3c055

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: two description fixes stand between this pull request and approval; the code, the tests and the spec change are in order.

Blocking:

  • The description says every command but init reminds once a day, but agent-docs and mcp are exempt too (SETUP_NUDGE_EXEMPT in clients/cli/index.mjs), so it should name all three.
  • The owner decision on this pull request lets it merge only once the replay of standard-error output shows that no tool breaks with the reminder first, and the description does not report that result yet, so add which commands or tools were replayed and that none broke.

The reminder's first line is now the reminder itself, so 2>&1 | head -1 keeps it. Also worth a look: outside-project.test.mjs:899 still matches the old /finish setup/ text and can no longer fail.

Claims and files checked

Review mode: incremental; reason: none

  • Changeset: the reminder now prints on stderr before the command's own output — verified (clients/cli/index.mjs:952-955; a real component --list run puts it on line 1 of 528).
  • Changeset: at the end of the output it was cut by 2>&1 | head and the day used up unseen — verified (the base records the day after the command; with the base placement a real run ends with it on line 528).
  • Changeset: it still never prints under CI, in --json, or once the project is set up — verified (setup-nudge.test.mjs:176-185, :208-216, :281-285; real runs).
  • Changeset: a command that fails now shows it — verified (setup-nudge.test.mjs:248-254, which fails with the base placement; a real run).
  • Changeset: the reminder now reads as quoted — verified (foundation/agent-docs/agent-doc-state.mjs:213, Core's generated copy :223).
  • Changeset: the old text said init would install the agent prompt — verified (the base agent-doc-state.mjs).
  • Changeset: agents read the old text as a file change nobody asked for — the author's agent-run finding, not checkable here.
  • Changeset: the command it names and the places it prints are unchanged — verified (the picker calls at index.mjs:1002-1021; the CLI reminder and both postinstalls).
  • Description: every command but init reminds once a day — false (agent-docs and mcp are exempt too, index.mjs:569).
  • Description: the reminder printed after the output, agents keep the start of a long answer, and the day was used up unseen — verified (base-placement runs).
  • Description: the old wording read as optional, and blind agent runs saw and acted on the new reminder more often — the author's findings, with no transcripts in the pull request.
  • Description: the new text, with init asking no questions, printing the getting-started steps and saving the guide to AGENTS.md — verified (agent-doc-state.mjs:213; commands/init.doc.mjs:17-24).
  • Description: the global-mode record's notice decision now records the placement, the failing command, stderr only and the quiet paths — verified (docs/specs/AST-081-global-mode/spec.md:1174-1180).
  • Description: once a day, no CI, no --json, quiet once set up and the same command are kept — verified (the tests above; real runs).
  • Description: the named command keeps the picker, and the Core and CLI postinstalls share the text through the generated contract — verified (the setup-contract check is in sync).
  • Description: the hook prints in preAction instead of postAction, so a failing command shows it too — verified (index.mjs:952-1024).
  • Description: the regression test sends both streams to one file and checks the order, the failure case and the wording; the postinstall tests check the shared text — verified (the order and failure tests fail with the base placement; cli-postinstall.test.mjs:88, core/src/postinstall.test.mjs:150, :193).
  • Description: --json stays clean, CI prints nothing, a set-up project and a second command the same day print nothing — verified (tests; real runs).
  • Description: no public API, default or interaction model is hidden under the fix — verified (the built surfaces of Core, build and the seven themes are identical; no CLI command or option changes).
  • Description: public text carries no internal context — verified.
  • Description: the listed test and check commands pass — verified for the related suites and the setup-contract, changeset and CLI-structure checks; the full CLI suite is left to CI.
  • .changeset/setup-reminder-first.md — clear
  • .changeset/setup-reminder-says-why.md — clear
  • docs/specs/AST-081-global-mode/spec.md — clear (owner-approved at this head; no approval line changed)
  • packages/cli/clients/cli/commands/cli-postinstall.test.mjs — clear
  • packages/cli/clients/cli/commands/setup-nudge.test.mjs — clear (the order and failure tests fail with the base placement; the first line is now asserted to be the reminder)
  • packages/cli/clients/cli/index.mjs — clear
  • packages/cli/foundation/agent-docs/agent-doc-state.mjs — clear
  • packages/core/scripts/agent-doc-state.mjs — clear (generated copy, in sync)
  • packages/core/src/postinstall.test.mjs — clear
  • Cross-file: packages/cli/clients/cli/commands/outside-project.test.mjs:899 still matches the old text (non-blocking)

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b97e647

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the CI workflow on this head was refused for capacity ("CI is full") and has not run yet, so a maintainer re-runs it; Lint and the CLI smoke test passed.

The updated description fixes both points from the last review: it names init, agent-docs and mcp as the commands that never remind, and it reports the stderr replay the owner's decision asked for, which a replay of 90 paired runs confirms (stdout and exit codes unchanged, --json clean, the reminder first only on the first reminded run of the day).

Optional: outside-project.test.mjs:899 still matches the old /finish setup/ text and can no longer fail.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Changeset: the reminder now prints on stderr before the command's own output instead of after it — verified (clients/cli/index.mjs:952-955; it is line 1 of a real component --list answer).
  • Changeset: at the end of the output it was cut by 2>&1 | head and the day used up unseen — verified (on the base it is the last of 528 lines, and the base records the day whatever the caller keeps).
  • Changeset: it still never prints under CI, in --json, or once the project is set up — verified (setup-nudge.test.mjs:176-185, :208-216, :281-285; replay).
  • Changeset: a command that fails now shows it — verified (setup-nudge.test.mjs:248-254, which fails with the base placement; replay).
  • Changeset: the reminder now reads as quoted — verified (foundation/agent-docs/agent-doc-state.mjs:213, Core's generated copy :223).
  • Changeset: the old text said init would install the agent prompt — verified (the base agent-doc-state.mjs).
  • Changeset: agents read the old text as a file change nobody asked for — the author's agent-run finding, not checkable here.
  • Changeset: the command it names and the places it prints are unchanged — verified (picker calls at index.mjs:1002-1021; the CLI reminder and both postinstalls).
  • Description: every command except init, agent-docs and mcp reminds once a day — verified (SETUP_NUDGE_EXEMPT, index.mjs:569).
  • Description: the reminder printed after the output, agents keep the start of a long answer, and the day was used up unseen — verified (base placement in paired runs).
  • Description: the old wording read as optional, and blind agent runs saw and acted on the new reminder more often — the author's findings, not checkable here.
  • Description: without init there is no Astryx guide in the agent files — verified (commands/init.doc.mjs:17-25 writes it).
  • Description: the fix keeps once a day, no CI, no --json, quiet once set up and the same command, and changes where and what it prints — verified (tests; replay); the failing-command case is stated separately.
  • Description: the global-mode record's notice decision now records the placement, the failing command, stderr only and the quiet paths — verified (docs/specs/AST-081-global-mode/spec.md:1174-1180).
  • Description: the CLI conventions say an agent reads every byte and to test text changes with agents — verified (docs/contributing/cli-conventions.md:148, :169).
  • Description: the named command keeps the picker, and the Core and CLI postinstalls share the text through the generated setup contract — verified (setup-contract check in sync).
  • Description: the hook prints in preAction instead of postAction, so a failing command shows it too, and the wording changes in the shared module and its generated copy — verified (index.mjs:952-1021).
  • Description: --json stays clean, CI prints nothing, a set-up project and a second command the same day print nothing — verified (tests; replay).
  • Description: the stderr replay shows identical exit codes and stdout, parseable --json 2>&1, an intact --version 2>&1 | head -1, no reminder under CI, --json, --version or help, and the reminder as line 1 once a day, so no tool breaks — verified (a replay of 90 paired base and head runs agrees on every point).
  • Description: the regression test sends both streams to one file and checks the order, the failure case and the wording; the postinstall tests check the shared text — verified (the order and failure tests fail with the base placement; cli-postinstall.test.mjs:88, core/src/postinstall.test.mjs:150, :193).
  • Description: the scope is the CLI reminder, Core's generated copy and the notice decision — verified (the nine changed files).
  • Description: no new public API, default or interaction model is hidden under the fix — verified (built surfaces of Core, build and the seven themes are identical; no CLI command or option changes).
  • Description: public text carries no internal context — verified.
  • Description: the listed test and check commands pass — verified for the related suites and the setup-contract, changeset and CLI-structure checks; the full suites wait on CI.
  • .changeset/setup-reminder-first.md — clear
  • .changeset/setup-reminder-says-why.md — clear
  • docs/specs/AST-081-global-mode/spec.md — clear (owner-approved at this head; no approval line changed)
  • packages/cli/clients/cli/commands/cli-postinstall.test.mjs — clear
  • packages/cli/clients/cli/commands/setup-nudge.test.mjs — clear (the order and failure tests fail with the base placement)
  • packages/cli/clients/cli/index.mjs — clear
  • packages/cli/foundation/agent-docs/agent-doc-state.mjs — clear
  • packages/core/scripts/agent-doc-state.mjs — clear (generated copy, in sync)
  • packages/core/src/postinstall.test.mjs — clear
  • Cross-file: packages/cli/clients/cli/commands/outside-project.test.mjs:899 still matches the old text (non-blocking)

Automated review (maintainer link)

@josephfarina josephfarina reopened this Nov 18, 2026
@josephfarina
josephfarina merged commit 1a54235 into main Nov 18, 2026
148 of 154 checks passed
@github-actions
github-actions Bot deleted the josephfarina/setup-reminder-first branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — b97e6474 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant