Skip to main content

Module push_preview

Module push_preview 

Source
Expand description

push-preview — a push that would publish interface changes no approved preview covers (ADR-0028, work.preview-unless-planned-evidence).

git push -u origin feat/settings-toggle   # app/routes/settings.tsx changed

Interface regressions kept reaching pull requests and deployed sites after the agent had checked its own screen in a browser. The person’s eyes are the check that does not share the agent’s blind spots, and localhost is where rejecting a screen costs one sentence instead of a fix pull request and a release. So a UI-changing commit is published only after the person approved THAT commit — registered with amont-agent preview register and answered on a marked question (see crate::preview).

§Where it speaks

examine fires on the shape of a push. confirm resolves what the push would publish (amont_agent_guard::push_target, a documented subset), and fires only when all hold: the repository has a user interface (a dev script, or git config amont.agent.push-preview.ui true), a pushed branch carries a file under app/, src/, web/ or a .tsx/.jsx/.css/.html whose nearest package.json looks like an interface and whose diff is not comments only (crate::preview; tests and test-tool configs never count: *.test.*, *.spec.*, __tests__/, and an unrendered file under e2e/, tests/, test/ or named vitest.*, jest.*, playwright.*, cypress.*), the plan the branch landed does not declare the preview’s evidence (an approved ## Preview section whose first line is evidence:; never for a picked mockup), and that commit has no approval. A push this guard cannot read is journalled with its shape and passes — except under deny, where it is held so that --all is not the way around the gate.

The rule runs BEFORE the command, so it speaks of what the push would do. Whether a push actually published anything is push-published’s record.

Constants§

RULE