Skip to content

[NO-TICKET] Tell the agent how to finish the map-link lines setup leaves - #446

Merged
mariojgt merged 1 commit into
mainfrom
mariot/agent-guide-map-binding
Oct 26, 2026
Merged

mariojgt merged 1 commit into
mainfrom
mariot/agent-guide-map-binding

Conversation

@mariojgt

Copy link
Copy Markdown
Contributor

What changed

Setup can end with two To do lines:

  • Some attacks are only reported, not blocked yet
  • Could not confirm whether rules for this app are ready

Both mean the same thing: the app's map was uploaded but could not be linked to the guard, so rules written for this app's own inputs can only report. The guide says To do lines are the agent's to finish, but nothing told the agent how to finish these two. In a recent Lovable install it passed them on to the person, who was left asking whether the app was protected.

AGENT-INSTALL.md

  • New guidance for both lines: run npx @patchstack/connect setup --verbose, read the reason on the could not bind this map to the runtime guard — <reason> line, fix it, then rerun setup until the line is gone. It gives the fix for each reason the code can report:
    • no guard rules file;
    • more than one candidate rules file;
    • invalid JSON or not a rules bundle;
    • unreadable or unwritable.
  • "Still being prepared" needs nothing.
  • How to answer "is my app protected?" in three parts:
    • the protection is installed;
    • Patchstack's rules only report until the site is connected to an account that includes protection (the SaaS serves dry-run enforcement until then);
    • the live app has none of it until the person publishes again.

Setup output (src/cli.ts)

  • The hint on the map-link line now points to setup --verbose. It used to say "Finish adding protection, then run setup again."
  • When there is no link, the readiness line says it clears once the link is fixed. It used to say the app would check again by itself, which never happens without a link.

Tests

  • npm run typecheck and npm run build are green, as are the disclosure, capability and install-prompt checks.
  • Full npm test: 4603 passed. 4 failed under full-suite load and all pass when run on their own: three timing tests and the plain-wording setup test, which hit its 5s timeout.

Rollout

Both AGENT-INSTALL.md and the setup output change, and agents read the published tarball. So the hostile field test is owed after the release that carries this, plus standard or lovable for doc accuracy.

🤖 Generated with Claude Code

Setup can end with "Some attacks are only reported, not blocked yet" and
"Could not confirm whether rules for this app are ready". Both mean the
map setup uploaded could not be linked to the guard, and nothing told
the agent how to finish that, so it passed the lines on to the person.

AGENT-INSTALL.md now says to run setup --verbose, read the reason on the
"could not bind this map" line, and fix it, with the fix for each
reason, then rerun setup until the line is gone. It also says how to
answer "is my app protected?": installed, blocking only once the site is
connected to an account that includes protection, and live only after
publishing again.

The setup hints point at --verbose, and the readiness line says it
follows the link when there is none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderbuds

coderbuds Bot commented Oct 26, 2026

Copy link
Copy Markdown

🎯 Elite quality (95%) — Docs and CLI hints now point agents to the exact verbose reason and its fixes.

📦 Small

See how your team is trending →

@mariojgt

Copy link
Copy Markdown
Contributor Author

/review

@mariojgt
mariojgt merged commit bc0fa0b into main Oct 26, 2026
23 checks passed
@mariojgt
mariojgt deleted the mariot/agent-guide-map-binding branch October 26, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants