fix: deploy-readiness gate + Sentry/PostHog foundation guidance#228
Merged
Conversation
Three systemic fixes: 1. Deploy gate (rouge-loop.js): after foundation-eval passes and provisioning completes, check foundation_completion.deploy_ready. If false, escalate immediately — don't build stories that can't be evaluated. Irish Planning built 7 stories before discovering at milestone-check that there was no staging URL. 2. Sentry guidance (foundation-building.md): withSentryConfig wraps route files and injects runtime exports that conflict with explicit declarations. Foundation must use instrumentation.ts pattern instead, or set autoInstrumentServerFunctions:false. Verify build passes with a route declaring runtime='nodejs' before committing. 3. PostHog/analytics guidance: either provision the project + set env vars during foundation, or defer the integration entirely. Don't add dead SDK code that looks "done" but needs manual configuration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Three systemic fixes from Irish Planning's deploy failures:
Deploy gate (
rouge-loop.js): After foundation-eval passes, checkfoundation_completion.deploy_ready. Iffalse, escalate immediately instead of building stories that can't be evaluated. Irish Planning built 7 stories, then milestone-check had no URL → product walk skipped → degraded evaluation.Sentry guidance (
00-foundation-building.md):withSentryConfigwraps route files and injects conflictingruntimeexports. Foundation must use theinstrumentation.tspattern instead, or disableautoInstrumentServerFunctions.PostHog/analytics guidance: Either provision the project + set env vars during foundation, or defer entirely. Don't add dead SDK + consent banner that looks done but is non-functional.
Test plan
escalate()helper with informative summary🤖 Generated with Claude Code