Add @sightmap/next: seed, build, run-plan, and the SightkickTools component for Next.js - #1
Merged
Merged
Conversation
…Next.js
- sightmap-next seed: one-shot scaffold of .sightmap/ view stubs from the App
Router or Pages Router (route, page source, layout chain as dependencies,
api route handlers as requests). Never overwrites a file.
- sightmap-next build: writes public/.well-known/{sightmap,sightkick}.json,
public/sightkick-runtime.js, and webmcp.init.js for agent-browser
--init-script, using the sightmap and sightkick CLIs.
- <SightkickTools/>: boots the Sightkick runtime from the root layout so each
page registers its view-scoped tools on document.modelContext.
- sightmap-next run-plan: replays stored plans through agent-browser webmcp
invoke and refuses to run when the feature file or compiled IR drifted.
Tests: node --test over the seeder against a fixture App Router tree.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FZAbWuynKT4NqXFMwtoBA
Signed-off-by: Claude <noreply@anthropic.com>
This was referenced Sep 5, 2026
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.
Stack 1/3 — the package. #2 adds the example app, #3 the write-up.
What this changes
Adds
packages/next(@sightmap/next): three CLI commands and one React component, no runtime dependencies beyondnextandreact. Rootnpm testnow runs its tests.sightmap-next seed[id]→:id,[...slug]→**; slots, intercepts, and_privatefolders are skipped. One feature file per top-level route withroute:,source:, the layout chain asdependencies:,stability: stub.app/apiroute handlers becomerequests:seeds. Existing files are never touched.sightmap-next buildsightmap exportandsightkick build/sightkick runtimeintopublic/, and concatenates runtime + IR intowebmcp.init.js. Meant for"prebuild".<SightkickTools ir={…}/>document.modelContexton every page; re-registers on client-side navigation; reuses a runtime an init script already booted.sightmap-next run-planagent-browser webmcp invoke --json.--stamprecords the feature-file and IR hashes; a later run refuses when either moved.What
seedwrites forapp/tasks/[id]/page.tsxunderapp/tasks/layout.tsx:Why
app/sitemap.tsis the right analogy for the served half only: a deployed app describing itself at a well-known URL. It is the wrong analogy for the corpus, which the spec's authoring conventions make a curated authority with no build-time generator. So the derivable part (the route table) is a one-shot seed, the rest stays with the authoring loop, and the build step only publishes what is already in the repo.run-planexists because agent-browser 0.36.0 (2026-09-01) discovers and invokes WebMCP tools through Chrome's CDPWebMCPdomain, which is the surface the Sightkick runtime registers on. That makes agent-browser a drop-in executor for Sightkick plans with no model in the loop at replay time.Checklist
git commit -s)npm testpasses (5 tests); seeded YAML passessightmap validate🤖 Generated with Claude Code
https://claude.ai/code/session_013FZAbWuynKT4NqXFMwtoBA
Generated by Claude Code