astryx init foolproof: per-command setup nudge + centralized setup check#4153
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
josephfarina
force-pushed
the
navi/vibe/cli-setup-nudge
branch
from
July 22, 2026 00:55
f59ef63 to
67cf01b
Compare
josephfarina
force-pushed
the
navi/vibe/cli-setup-nudge
branch
from
July 22, 2026 01:37
67cf01b to
a913a63
Compare
Enforcement layer 3 of making `astryx init` foolproof: if a project hasn't run init yet (no Astryx marker in any agent-doc file), remind the user/agent after any command to run `astryx init`. - Centralize agent-doc discovery: one AGENT_DOC_PATHS list now feeds discoverAgentDocs, removeAgentDocs, and the new isAstryxInitialized(). It now includes the Hermes files (.hermes.md / HERMES.md) that discovery previously missed — so "where init writes", "where remove looks", and "where the check looks" can never drift again. - Add isAstryxInitialized(): single source of truth for "is Astryx set up here?" (Astryx marker present in any agent-doc file, incl. legacy XDS). - preAction nudge (index.mjs): fires for every valid command — even in --json. Agents pass --json, so the nudge goes to stderr and never corrupts the stdout JSON envelope. Quiet once set up, outside a project, and for init itself. - Guardrail test: all agent-doc locations + the nudge matrix incl --json.
josephfarina
force-pushed
the
navi/vibe/cli-setup-nudge
branch
from
July 22, 2026 03:41
a913a63 to
2af3f76
Compare
josephfarina
marked this pull request as ready for review
July 22, 2026 03:42
cixzhang
added a commit
that referenced
this pull request
Jul 22, 2026
Seven published-behavior PRs merged since v0.1.7 without a changeset, which would leave their contributors uncredited in the CHANGELOG. Add changesets so the v0.1.8 bump credits them: - core docs.mjs redirect to the CLI (#4207) - Table tree-data plugin: useTableTreeState / useTableTreeData (#3789) - Table tree expander aria-label localization (#4149) - foolproof init: postinstall nudges + non-interactive init (#4147, #4153, #4154, #4155)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of making
astryx initfoolproof (agents install the design system but never run init). Enforcement layer 3 of 3:@astryxdesign/corepostinstall nudge — astryx init foolproof: @astryxdesign/core postinstall nudge #4155@astryxdesign/clipostinstall nudge — astryx init foolproof: @astryxdesign/cli postinstall nudge #4154 (reuses the check below)What
AGENT_DOC_PATHSnow feedsdiscoverAgentDocs,removeAgentDocs, and a newisAstryxInitialized()— so "where init writes", "where remove looks", and "where the check looks" can never drift. Closes a real gap: discovery/removal previously missed the Hermes files (.hermes.md/HERMES.md).isAstryxInitialized(dir)— single source of truth for "is Astryx set up here?" (marker present in any agent-doc file, incl. legacyXDS).preActionnudge — after any command, if the project isn't set up, remind the user/agent to run init.preAction(not postAction) so it fires for every valid command, even ones that error or exit early.Why it fires in
--jsonAgents almost always pass
--json. The nudge writes to stderr, which never corrupts the stdout JSON envelope — so agents actually see it and JSON parsing stays clean. Quiet once set up, outside a project (nopackage.json), and forinit/agent-docs.Tests
setup-nudge.test.mjs— 14 cases: marker detection across all 6 agent-doc locations + legacy; nudge matrix incl.--jsonstdout stays valid JSON.The nudge message is identical across all 3 layers; it becomes
getCliInvocation()once #4151 lands.