Skip to content

docs: agent-facing deploy-failure auto-debug guide + llms.txt reference (Task #69)#27

Merged
mastermanas805 merged 1 commit into
mainfrom
docs/agent-deploy-failure-debugging
Jun 6, 2026
Merged

docs: agent-facing deploy-failure auto-debug guide + llms.txt reference (Task #69)#27
mastermanas805 merged 1 commit into
mainfrom
docs/agent-deploy-failure-debugging

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

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/eventsreason + last_lines + hint), but nothing in llms.txt told agents this surface exists. Agents were left guessing on a build failure. This closes that gap.

Changes

  • New docs page docs/troubleshooting-deploys.md — served at https://instanode.dev/docs#troubleshooting-deploys (single-page docs anchor) and https://instanode.dev/docs/troubleshooting-deploys.md (markdown mirror). Agent-facing, imperative. Covers:
    • The auto-debug loop: 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 (or redeploy=true on /deploy/new with the same name) → re-poll. Live build: GET /deploy/:id/logs (SSE).
    • The thinner anonymous-stacks path: GET /api/v1/stacks/:slug (status + raw error) + GET /stacks/:slug/logs/:svc; explicitly notes there is no /events autopsy for anon stacks.
    • Honest caveats: failure email delivery blocked (use /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.
  • Renumbered later docs 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/docs ci/02-FAILURE-DIAGNOSIS-AND-AUTODEBUG.md.

Out of scope (separate agent)

The instanode-web/public/llms.txt fallback mirror + any new llms-contract CI marker (fetch-content.mjs requireMarkers / llmsContract.test.ts) are handled separately. Note: this content-repo llms.txt already carries all four current requireMarkers, so the build's lock-step sync is not blocked — this reference will flow to the live llms.txt on the next instanode-web build.

🤖 Generated with Claude Code

…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>
@mastermanas805 mastermanas805 enabled auto-merge (squash) June 6, 2026 04:01
@mastermanas805 mastermanas805 merged commit a10699f into main Jun 6, 2026
2 checks passed
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.

1 participant