Skip to content

docs: LUA-180 surface the post-deploy debug loop#14

Open
rares04 wants to merge 2 commits intomainfrom
rares/lua-180-docs
Open

docs: LUA-180 surface the post-deploy debug loop#14
rares04 wants to merge 2 commits intomainfrom
rares/lua-180-docs

Conversation

@rares04
Copy link
Copy Markdown
Contributor

@rares04 rares04 commented Apr 28, 2026

Summary

Companion docs PR for LUA-180. Sibling CLI PR: lua-ai-global/lua-core-services#288.

Goal: make sure users (especially LLM builders running `lua chat -m`) and AI agents reading the docs MCP can find the optimal post-deploy debug flow. The single canonical loop is `lua push --auto-deploy → lua chat -m "test" → lua logs --type X --limit 10`.

Files touched

  • `cli/debugging.mdx` — rewritten as the canonical "post-deploy loop" page: 5-step loop, decision matrix (`lua test` vs `lua chat` vs `lua logs`), full 11-type filter table, "After lua chat -m, the CLI auto-surfaces agent_error counts" callout, signal-vs-noise icon guide, post-deploy verification recipe, `LUA_NO_HINTS=1` escape hatch. Preserved the most useful pre-existing content (`console.log` patterns, common bugs).
  • `cli/logs-command.mdx` — added "When to run `lua logs`" section, inline `agent_error` vs `mastra` distinction, post-deploy verification recipe, `--user-id` flag, cross-link to `/cli/debugging`.
  • `cli/chat-command.mdx` — added "Active log probe" subsection (the quiet `agent_error` probe behavior shipping in #288), Debugging callout in Troubleshooting, `lua chat -m && lua logs --type agent_error` recipe, cross-link to `/cli/debugging`.
  • `ai-guide.mdx` — promoted Debugging from §8 to §3 (right after `lua init`), expanded with post-test-always-check pattern, post-deploy verification recipe, full filter-type table; renumbered §3-7 → §4-8; added cross-link to `/cli/debugging`.
  • `getting-started/quick-start.mdx` — added Step 5 "Test and verify" with `lua chat -m` + `lua logs` and the "follow the `✨ Tip:` and `💡 Diagnose:` hints" advice.
  • `cli/non-interactive-mode.mdx` — added "Post-deploy verification (CI-friendly)" subsection with `--ci` push + chat + `jq`-based `agent_error` count check, plus `LUA_NO_HINTS=1` guidance for CI capture.
  • `mcp-for-builders.mdx` — fixed an actual bug: the page advertised `get_page_lua_cli`, which does not exist on the live MCP. Verified the production MCP at `https://docs.heylua.ai/mcp\` via `tools/list` — the live tools are `search_lua_cli` and `query_docs_filesystem_lua_cli`. Updated the table and prose accordingly.
  • `docs.json` — added `cli/debugging` to the CLI Commands sidebar immediately after `cli/logs-command`. JSON validates.

Coordination with PR #286 (logs schema rename)

`mastra` is kept in the filter-type table here because PR #286 (`chore/consolidate-log-source-types`) is the canonical rename of `mastra` → `runtime`. Updating it here would create false drift. After #286 merges, a small follow-up will rename `mastra` → `runtime` across these doc surfaces in one mechanical commit.

Test plan

  • All MDX components (``, ``, ``, ``, ``, ``) balanced.
  • `docs.json` valid (`jq empty`).
  • `ai-guide.mdx` section renumbering verified — no stale references to old §3-7.
  • Mintlify preview shows `cli/debugging` in the sidebar and the page renders.
  • Cross-links resolve.

Related

  • Companion CLI PR: lua-ai-global/lua-core-services#288 — implements the `writeTip`/`writeNextStep` helpers + active `agent_error` probe + contextual `lua logs` hints in every error path. The docs in this PR document the user-facing behavior shipping in that CLI PR.

Made with Cursor


Note

Low Risk
Docs-only changes that reorganize and expand guidance around post-deploy verification and log inspection; low implementation risk beyond potential broken links or confusing command examples.

Overview
Elevates a single canonical post-deploy workflow (lua push --auto-deploy → lua chat -m "test" → lua logs) across the docs, emphasizing the "always check agent_error" pattern, staged-vs-live semantics after lua push, and the new per-turn agent_error probe + opt-out via LUA_NO_HINTS=1.

Rewrites cli/debugging.mdx into the primary "post-deploy loop" guide and threads it through ai-guide.mdx, cli/chat-command.mdx, cli/logs-command.mdx, getting-started/quick-start.mdx, and cli/non-interactive-mode.mdx (including a CI-friendly verification recipe that fails builds on non-zero agent_error).

Updates navigation (docs.json) to include cli/debugging, and corrects MCP docs (mcp-for-builders.mdx) to reference the live tool query_docs_filesystem_lua_cli instead of get_page_lua_cli.

Reviewed by Cursor Bugbot for commit 0328d8e. Bugbot is set up for automated code reviews on this repo. Configure here.

rares04 added 2 commits April 28, 2026 14:55
Wave 1 Agent E for LUA-180 ("Make post-deploy diagnosis easier with
lua logs"). Pairs with the CLI changes that add centralized
writeTip()/writeNextStep() hints, the active agent_error probe in
lua chat, and contextual lua logs --type X --name Y suggestions in
push/deploy error paths.

Surface the canonical debug loop wherever AI builders and human
users land:

- cli/debugging.mdx: rewritten as the canonical "post-deploy loop"
  page. Adds the 5-step push -> test -> check loop, the
  lua test vs lua chat vs lua logs decision matrix, the full 11-type
  --type filter table (skill, webhook, job, preprocessor,
  postprocessor, mcp, mastra, rag, user_message, agent_response,
  agent_error), the auto agent_error probe callout, signal-vs-noise
  guidance for log icons, and the post-deploy verification recipe.
  Preserves console.log debugging patterns and common-bug entries.
- cli/logs-command.mdx: adds "When to run lua logs" (after chat,
  after push, when investigating a user issue), inline
  agent_error vs mastra/runtime distinction, the post-deploy
  verification recipe, --user-id flag, and a cross-link to the
  debugging loop.
- cli/chat-command.mdx: adds an "Active log probe" subsection
  documenting the quiet agent_error probe, a debugging callout in
  Troubleshooting, the chat -m && lua logs recipe, and the
  LUA_NO_HINTS=1 escape hatch.
- ai-guide.mdx: promotes the Debugging section from #8 to #3
  (immediately after lua init) so AI builders see it before they
  write their first tool. Adds the post-test-always-check pattern,
  the post-deploy verification recipe, --user-id usage, the full
  filter-type table, and renumbers sections 4-8 accordingly.
- getting-started/quick-start.mdx: adds a final "Test and verify"
  step (lua chat -m + lua logs) so first-time builders learn the
  verify habit immediately.
- cli/non-interactive-mode.mdx: adds a CI-friendly post-deploy
  verification recipe using --ci push, --ci chat, and a jq-based
  agent_error count check, plus LUA_NO_HINTS=1 guidance for CI.
- mcp-for-builders.mdx: fixes the production MCP tool reference -
  the public docs MCP exposes search_lua_cli and
  query_docs_filesystem_lua_cli (verified against the live
  docs.heylua.ai/mcp endpoint), not the previously documented
  get_page_lua_cli which never existed.
- docs.json: adds cli/debugging to the CLI Commands sidebar
  immediately after cli/logs-command.

Refs LUA-180.

Made-with: Cursor
…fic-first, active probe docs

Made-with: Cursor
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