Skip to content

[feat] surface remaining setup steps after scan + consistent guide labels#72

Merged
mariojgt merged 2 commits into
mainfrom
feat/scan-guide-next-steps
Jul 14, 2026
Merged

[feat] surface remaining setup steps after scan + consistent guide labels#72
mariojgt merged 2 commits into
mainfrom
feat/scan-guide-next-steps

Conversation

@mariojgt

Copy link
Copy Markdown
Contributor

Summary

Closes the "half-finished setup" gap a real hosted-platform run exposed: an agent installed @patchstack/connect, eventually ran scan (widget + claim URL appeared), and declared "done" — but the package.json build hooks were never wired, so future CI builds won't re-scan or mark-build. Two changes:

A. scan now surfaces what's left (src/cli.ts). After a scan, it computes countRemainingSteps (already imported) and, if any remain, prints:

Setup not complete — 1 step(s) remaining, including the package.json build hooks (which scan can't wire).
Run `npx @patchstack/connect guide` for the exact steps to finish for this project.

This closes the loop for the common case where an agent runs scan but not guide and otherwise assumes the widget + claim URL means it's finished. Best-effort (never fails a successful scan); self-suppressing once setup is complete.

B. guide checklist uses consistent action labels (src/guide.ts). Previously the prefix meant "run this", "edit this into a file", and plain prose — an agent couldn't tell execute from edit. Now every actionable line is labelled:

  • Run → — a command to execute
  • Edit <file> → — a change to apply and review by hand
  • Note → — context

…and each todo headline names the actor ("Wire the build hooks yourself — edit package.json"). This keeps the read-then-apply / agent-as-reviewer framing (deliberately not more commanding — that would push toward the dictation refusals the field-test tracks).

Rendered:

 ✖ Wire the build hooks yourself — edit package.json "scripts" (chain with && if a hook already exists)
     Edit package.json → "prebuild": "patchstack-connect scan"
     Edit package.json → "postbuild": "patchstack-connect mark-build"

Tests

  • npm run typecheck ✓, npm test ✓ (390 passed). Added assertions locking in the Run → / Edit package.json → labels so the scheme can't silently regress. All previously-asserted command/snippet substrings are preserved.

Caveat (🟠 gated)

Both guide.ts and the scan output are read live by agents. Per MAINTAINING.md this needs a field-test run, and the fixture installs the published package — so the behavior can only be exercised end-to-end after a publish. Validated here by typecheck, unit tests, and a real local guide render.

🤖 Generated with Claude Code

…/Edit labels

A) scan now prints a state-aware 'setup not complete' footer when steps remain (e.g. the package.json build hooks it can't wire itself), pointing at guide — closing the loop for agents that run scan but not guide and otherwise assume the widget + claim URL means done.

B) the guide checklist labels every action consistently — 'Run →' for a command, 'Edit <file> →' for a hand-applied change, 'Note →' for context — and each todo names the actor, so an agent can tell 'run this' from 'edit this file' at a glance. Read-then-apply framing preserved. All prior asserted substrings kept; added label-regression assertions.

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

coderbuds Bot commented Jul 14, 2026

Copy link
Copy Markdown

Introduces clear user nudges and consistent guide labels.

🎯 Quality: 100% Elite · 📦 Size: Small

📈 This month: Your 88th PR — above team average · Averaging Excellent

See how your team is trending →

@mariojgt

Copy link
Copy Markdown
Contributor Author

/review

@mariojgt mariojgt merged commit 11d4dc3 into main Jul 14, 2026
4 checks passed
@mariojgt mariojgt deleted the feat/scan-guide-next-steps branch July 14, 2026 14:40
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