docs: agent-facing deploy-failure auto-debug guide + llms.txt reference (Task #69)#27
Merged
Merged
Conversation
…ce (Task #69) Make the deploy-failure auto-debug path discoverable by AI agents from llms.txt. A failed deploy classifies the cause and serves it back over HTTP — agents can self-recover without cluster access. - New docs page docs/troubleshooting-deploys.md (served at /docs#troubleshooting-deploys + /docs/troubleshooting-deploys.md): the GET /api/v1/deployments/:id/events autopsy loop (reason + last_lines + hint -> fix -> POST /deploy/:id/redeploy -> re-poll), the live SSE build log (GET /deploy/:id/logs), the thinner anonymous-stacks path (GET /stacks/:slug + /stacks/:slug/logs/:svc, no /events autopsy), and honest caveats (email delivery blocked, diagnostics-pending window, thinner runtime crash-loop diagnostics). - llms.txt: new "Debugging a failed deploy" section pointing agents at /events (reason, last_lines, hint) with a link to the full guide, plus an md-mirror entry under the text-only routes list. - Renumbered later docs orders (claim 6, auth 7, limits 8, machine-readable 9) to slot the troubleshooting page after deploy/stacks. All endpoint paths verified against the live api router (deploy.go / stack.go / router.go): /deployments/:id, /deployments/:id/events, /deploy/:id/logs, /deploy/:id/redeploy, /stacks/:slug, /stacks/:slug/logs/:svc. Source: InstaNode-dev/docs ci/02-FAILURE-DIAGNOSIS-AND-AUTODEBUG.md. Co-Authored-By: Claude Opus 4.8 <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.
What
Make the deploy-failure auto-debug path discoverable by AI agents from
llms.txt. When an agent (Claude Code, curl, MCP) hits a failed deploy, it can now learn HOW to self-recover — read the classified cause, fix, redeploy — directly from the LLM index.Why
A failed deploy already classifies its cause and serves it back over HTTP (
GET /api/v1/deployments/:id/events→reason+last_lines+hint), but nothing inllms.txttold agents this surface exists. Agents were left guessing on a build failure. This closes that gap.Changes
docs/troubleshooting-deploys.md— served athttps://instanode.dev/docs#troubleshooting-deploys(single-page docs anchor) andhttps://instanode.dev/docs/troubleshooting-deploys.md(markdown mirror). Agent-facing, imperative. Covers:GET /api/v1/deployments/:id(status +error_message) →GET /api/v1/deployments/:id/events(reason,exit_code,last_lines= build-pod log tail,hint) → fix Dockerfile/tarball/port/env →POST /deploy/:id/redeploy(orredeploy=trueon/deploy/newwith the samename) → re-poll. Live build:GET /deploy/:id/logs(SSE).GET /api/v1/stacks/:slug(status + raw error) +GET /stacks/:slug/logs/:svc; explicitly notes there is no/eventsautopsy for anon stacks./events+ dashboard autopsy panel, not email), "diagnostics pending" window, thinner runtime crash-loop diagnostics.llms.txt: new "Debugging a failed deploy (agent self-recovery)" section + md-mirror entry under the text-only routes list.order:frontmatter (claim 6, auth 7, limits 8, machine-readable 9) so the troubleshooting page slots after deploy/stacks.Accuracy
Every endpoint path verified against the live api source (
deploy.go/stack.go/router.go):/api/v1/deployments/:id,/api/v1/deployments/:id/events,/deploy/:id/logs,/deploy/:id/redeploy,/stacks/:slug,/stacks/:slug/logs/:svc. No invented fields. Source material:InstaNode-dev/docsci/02-FAILURE-DIAGNOSIS-AND-AUTODEBUG.md.Out of scope (separate agent)
The
instanode-web/public/llms.txtfallback mirror + any newllms-contractCI marker (fetch-content.mjsrequireMarkers/llmsContract.test.ts) are handled separately. Note: this content-repollms.txtalready carries all four currentrequireMarkers, so the build's lock-step sync is not blocked — this reference will flow to the livellms.txton the next instanode-web build.🤖 Generated with Claude Code