Skip to content

[codex] Improve agent documentation discoverability - #224

Open
TommyBez wants to merge 1 commit into
mainfrom
codex/agent-docs-discoverability
Open

[codex] Improve agent documentation discoverability#224
TommyBez wants to merge 1 commit into
mainfrom
codex/agent-docs-discoverability

Conversation

@TommyBez

@TommyBez TommyBez commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Minimize AGENTS.md to non-inferable operating rules and move feature knowledge into docs folders.
  • Replace legacy broad docs with evidence-based feature docs, generated root/folder indexes, and a docs index validation script.
  • Update README, contributing guidance, and the PR template so future changes keep docs discoverable for coding agents.

Validation

  • pnpm docs:index
  • pnpm docs:check
  • pnpm lint
  • pnpm typecheck
  • git diff --check

Note: pnpm verify was not rerun because this workspace still lacks .env.local / DATABASE_URL. The shell also warns that Node is v22.21.0 while the repo declares >=24.

Summary by CodeRabbit

  • Documentation

    • Reorganized and expanded documentation with new comprehensive guides covering agent management, chat workflows, budgets, authentication, and infrastructure topics.
    • Added generated documentation index pages for improved navigation.
  • Chores

    • Updated verification pipeline to include documentation validation checks.
    • Modified contribution guidelines to reference updated documentation structure.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
outname Ready Ready Preview, Comment, Open in v0 Jun 15, 2026 6:35pm
outname-api Ready Ready Preview, Comment Jun 15, 2026 6:35pm
outname-app Ready Ready Preview, Comment Jun 15, 2026 6:35pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds a docs index generator and validation command, updates repo guidance to use generated docs indexes, and adds many feature-scoped documentation pages and generated section indexes across agent runtime, platform, integrations, and product surfaces.

Changes

Repository documentation overhaul

Layer / File(s) Summary
Docs workflow and repository guidance
scripts/docs-index.ts, package.json, AGENTS.md, README.md, CONTRIBUTING.md, .github/PULL_REQUEST_TEMPLATE.md, docs/index.md
Adds a script that generates and checks docs/**/index.md files and markdown line limits, wires pnpm docs:index and pnpm docs:check into repo commands, and updates contributor guidance and PR validation text to use the generated docs structure.
Agent runtime and orchestration docs
docs/agent-chat/*, docs/agent-creation-chat/*, docs/agent-edit-chat/*, docs/agent-management/*, docs/agent-events/*, docs/realtime-turns/*, docs/scheduler/*, docs/heartbeat/*, docs/sub-agents/*, docs/agent-memory/*, docs/agent-skills/*, docs/tools/*, docs/tool-sandboxes/*, docs/cache-revalidation/*, docs/runtime-cache/*, docs/workflow-runtime/*, docs/dreaming/*
Adds feature docs and generated indexes covering chat flows, agent management, runtime execution, durable events, scheduling, memory and skills, tool runtime behavior, cache revalidation, runtime cache expectations, workflow runtime usage, and dreaming behavior.
Platform, data, auth, and integration docs
docs/auth-account/*, docs/waitlist/*, docs/security-edge/*, docs/channels-slack/*, docs/connections/*, docs/inference/*, docs/budgets/*, docs/data/*, docs/platform/*
Adds docs and generated indexes for OTP auth, waitlist transitions, proxy and BotID edge rules, Slack channel contracts, credential and connector handling, inference providers, budget accounting, core data and migrations, and workspace/env/test platform guidance.
Product surface and supporting docs
docs/ui-system/*, docs/email-templates/*, docs/marketing-site/*, docs/launch-video/*, docs/adr/*, packages/shared/content/blog/posts.ts
Adds docs and generated indexes for UI contracts, email templates, marketing routes/content, launch-video manifests and rendering, rewrites one ADR into a shorter structured format, and adjusts blog post string quoting without logic changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • TommyBez/outname#160: Also updates AGENTS.md runtime caveats, including pnpm test and DATABASE_URL guidance.
  • TommyBez/outname#176: Also changes packages/shared/content/blog/posts.ts entries in the exported posts array.

Suggested labels

codex

Poem

🐇 I hopped through docs in tidy rows,
With index trails my whisker knows.
New paths now point where features hide,
And checks patrol each markdown side.
I thumped once proud, then nibbled glue—
The burrow's map is fresh and true.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/agent-docs-discoverability

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
docs/agent-events/overview.md (1)

27-31: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep this overview within the docs line limit.

This file is one line over the repository rule for non-index markdown under docs/. Drop the trailing blank line or otherwise trim the body so it stays at 30 lines or fewer.

As per coding guidelines, non-index markdown files under docs/ must stay at 30 lines or fewer.

🔧 Minimal fix
 - `packages/ai/agent-runtime/server/agent-event-transcript.ts`
 - `packages/ai/agent-runtime/workflows/agent-events/workflow.ts`
-
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/agent-events/overview.md` around lines 27 - 31, The file
docs/agent-events/overview.md exceeds the repository rule of 30 lines maximum
for non-index markdown files under docs/. Reduce the file to 30 lines or fewer
by removing the trailing blank line and/or trimming the body content to comply
with the documentation guidelines.

Source: Coding guidelines

docs/scheduler/overview.md (1)

1-31: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Trim this doc to 30 lines.

As per coding guidelines, non-index markdown files under docs/ must stay at 30 lines or fewer, and this file is 31 lines long. Please condense one line or move detail into a sibling doc.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/scheduler/overview.md` around lines 1 - 31, The file
docs/scheduler/overview.md is currently 31 lines, exceeding the 30-line maximum
requirement for non-index markdown files under docs/. Reduce the file to 30
lines or fewer by either removing one blank line between sections, condensing
one of the bullet points slightly, or moving the entire Anchors section
(including the ## Anchors header and the four anchor file references) to a
separate sibling document that can be referenced from the main overview.

Source: Coding guidelines

docs/sub-agents/overview.md (1)

1-31: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep both overview docs within the 30-line limit.

As per coding guidelines, non-index markdown files under docs/ must stay at 30 lines or fewer; both files are currently 31 lines.

  • docs/sub-agents/overview.md#L1-L31: remove one blank line or move one subsection into a sibling doc.
  • docs/dreaming/overview.md#L1-L31: remove one blank line or move one subsection into a sibling doc.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/sub-agents/overview.md` around lines 1 - 31, Both documentation files
exceed the 30-line limit for non-index markdown files under docs/ and must be
reduced. In docs/sub-agents/overview.md (lines 1-31), reduce the content to 30
lines or fewer by either removing one blank line or moving one subsection (such
as the Anchors section) to a related sibling document. In
docs/dreaming/overview.md (lines 1-31), apply the same approach to reduce that
file to 30 lines or fewer. Choose the same reduction strategy (blank line
removal or subsection relocation) for both files to maintain consistency.

Source: Coding guidelines

🧹 Nitpick comments (1)
docs/agent-events/streams.md (1)

18-18: ⚡ Quick win

Replace the abbreviated source anchor.

.../transcript/route.ts is ambiguous and makes the source reference harder to follow. Spell out the full path so the doc stays precise and navigable.

♻️ Suggested edit
-Source: `apps/api/app/api/agents/[agentId]/events/[eventId]/stream/route.ts`; `.../transcript/route.ts`; `server/agent-event-transcript.ts`; `hooks/use-agent-event-live-transcript.ts`.
+Source: `apps/api/app/api/agents/[agentId]/events/[eventId]/stream/route.ts`; `apps/api/app/api/agents/[agentId]/events/[eventId]/transcript/route.ts`; `server/agent-event-transcript.ts`; `hooks/use-agent-event-live-transcript.ts`.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/agent-events/streams.md` at line 18, In the Source reference line, the
path `.../transcript/route.ts` is abbreviated and ambiguous, making it difficult
to navigate the documentation. Replace this abbreviated path with the complete
full path to the transcript route file so that readers can easily locate the
exact source file being referenced. Ensure all source file references in the
line are fully qualified paths rather than abbreviated versions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/docs-index.ts`:
- Around line 225-233: The shouldGenerateIndex() function only returns true for
directories with more than one non-index markdown file, which means a directory
that previously had a generated index.md can become stale if files are removed.
Modify the condition to also return true if a directory already contains an
existing index.md file, ensuring that previously generated indexes continue to
be validated and potentially updated or cleaned up, even if the directory no
longer meets the multi-file threshold.

---

Outside diff comments:
In `@docs/agent-events/overview.md`:
- Around line 27-31: The file docs/agent-events/overview.md exceeds the
repository rule of 30 lines maximum for non-index markdown files under docs/.
Reduce the file to 30 lines or fewer by removing the trailing blank line and/or
trimming the body content to comply with the documentation guidelines.

In `@docs/scheduler/overview.md`:
- Around line 1-31: The file docs/scheduler/overview.md is currently 31 lines,
exceeding the 30-line maximum requirement for non-index markdown files under
docs/. Reduce the file to 30 lines or fewer by either removing one blank line
between sections, condensing one of the bullet points slightly, or moving the
entire Anchors section (including the ## Anchors header and the four anchor file
references) to a separate sibling document that can be referenced from the main
overview.

In `@docs/sub-agents/overview.md`:
- Around line 1-31: Both documentation files exceed the 30-line limit for
non-index markdown files under docs/ and must be reduced. In
docs/sub-agents/overview.md (lines 1-31), reduce the content to 30 lines or
fewer by either removing one blank line or moving one subsection (such as the
Anchors section) to a related sibling document. In docs/dreaming/overview.md
(lines 1-31), apply the same approach to reduce that file to 30 lines or fewer.
Choose the same reduction strategy (blank line removal or subsection relocation)
for both files to maintain consistency.

---

Nitpick comments:
In `@docs/agent-events/streams.md`:
- Line 18: In the Source reference line, the path `.../transcript/route.ts` is
abbreviated and ambiguous, making it difficult to navigate the documentation.
Replace this abbreviated path with the complete full path to the transcript
route file so that readers can easily locate the exact source file being
referenced. Ensure all source file references in the line are fully qualified
paths rather than abbreviated versions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb9bc861-7bc2-4a0a-b750-a6e2d60f349e

📥 Commits

Reviewing files that changed from the base of the PR and between 0f59087 and 74a7f6e.

📒 Files selected for processing (138)
  • .github/PULL_REQUEST_TEMPLATE.md
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
  • docs/ARCHITECTURE.md
  • docs/SLACK_INTEGRATION.md
  • docs/adr/0004-agent-skills-use-dedicated-sandboxes.md
  • docs/adr/index.md
  • docs/agent-chat/api-contract.md
  • docs/agent-chat/edge-cases.md
  • docs/agent-chat/flow.md
  • docs/agent-chat/index.md
  • docs/agent-chat/invariants.md
  • docs/agent-chat/overview.md
  • docs/agent-chat/state.md
  • docs/agent-chat/tests.md
  • docs/agent-creation-chat/edge-cases.md
  • docs/agent-creation-chat/flow.md
  • docs/agent-creation-chat/index.md
  • docs/agent-creation-chat/invariants.md
  • docs/agent-creation-chat/overview.md
  • docs/agent-creation-chat/state.md
  • docs/agent-creation-chat/tests.md
  • docs/agent-edit-chat/edge-cases.md
  • docs/agent-edit-chat/flow.md
  • docs/agent-edit-chat/index.md
  • docs/agent-edit-chat/invariants.md
  • docs/agent-edit-chat/overview.md
  • docs/agent-edit-chat/state.md
  • docs/agent-edit-chat/tests.md
  • docs/agent-events/concurrency-idempotency.md
  • docs/agent-events/event-kinds.md
  • docs/agent-events/index.md
  • docs/agent-events/overview.md
  • docs/agent-events/state-machine.md
  • docs/agent-events/streams.md
  • docs/agent-management/configuration-contract.md
  • docs/agent-management/edge-cases.md
  • docs/agent-management/flow.md
  • docs/agent-management/index.md
  • docs/agent-management/invariants.md
  • docs/agent-management/overview.md
  • docs/agent-management/product-shell.md
  • docs/agent-management/state.md
  • docs/agent-management/tests.md
  • docs/agent-memory/index.md
  • docs/agent-memory/overview.md
  • docs/agent-memory/sandbox-files-contract.md
  • docs/agent-skills/index.md
  • docs/agent-skills/package-lifecycle.md
  • docs/agent-skills/runtime.md
  • docs/auth-account/index.md
  • docs/auth-account/otp-flow.md
  • docs/auth-account/overview.md
  • docs/budgets/accounting.md
  • docs/budgets/index.md
  • docs/budgets/overview.md
  • docs/cache-revalidation/cache-map.md
  • docs/cache-revalidation/index.md
  • docs/cache-revalidation/overview.md
  • docs/cache-revalidation/revalidation-flow.md
  • docs/channels-slack/channel-contract.md
  • docs/channels-slack/index.md
  • docs/channels-slack/overview.md
  • docs/connections/connector-authoring.md
  • docs/connections/credential-taxonomy.md
  • docs/connections/index.md
  • docs/connections/overview.md
  • docs/data/core-tables.md
  • docs/data/index.md
  • docs/data/migrations.md
  • docs/dreaming/overview.md
  • docs/email-templates/components.md
  • docs/email-templates/index.md
  • docs/email-templates/overview.md
  • docs/email-templates/sending.md
  • docs/heartbeat/overview.md
  • docs/index.md
  • docs/inference/index.md
  • docs/inference/provider-authoring.md
  • docs/inference/providers.md
  • docs/launch-video/index.md
  • docs/launch-video/manifest.md
  • docs/launch-video/overview.md
  • docs/launch-video/rendering.md
  • docs/marketing-site/content.md
  • docs/marketing-site/index.md
  • docs/marketing-site/overview.md
  • docs/marketing-site/routing.md
  • docs/platform/env-matrix.md
  • docs/platform/index.md
  • docs/platform/routing.md
  • docs/platform/test-matrix.md
  • docs/platform/workspaces.md
  • docs/realtime-turns/edge-cases.md
  • docs/realtime-turns/flow.md
  • docs/realtime-turns/index.md
  • docs/realtime-turns/invariants.md
  • docs/realtime-turns/overview.md
  • docs/realtime-turns/runtime-spec.md
  • docs/realtime-turns/state.md
  • docs/realtime-turns/tests.md
  • docs/runtime-cache/index.md
  • docs/runtime-cache/overview.md
  • docs/runtime-cache/redis-requirements.md
  • docs/scheduler/index.md
  • docs/scheduler/overview.md
  • docs/scheduler/recovery.md
  • docs/scheduler/schedule-contract.md
  • docs/security-edge/botid-contracts.md
  • docs/security-edge/index.md
  • docs/security-edge/overview.md
  • docs/security-edge/proxy-rules.md
  • docs/simplification-plan-agent-workflows.md
  • docs/sub-agents/index.md
  • docs/sub-agents/invocation-events.md
  • docs/sub-agents/overview.md
  • docs/tool-sandboxes/index.md
  • docs/tool-sandboxes/manifest-authoring.md
  • docs/tool-sandboxes/overview.md
  • docs/tools/catalog.md
  • docs/tools/index.md
  • docs/tools/maintainer-tool-authoring.md
  • docs/tools/reconnect-and-audit.md
  • docs/ui-system/ai-elements.md
  • docs/ui-system/components.md
  • docs/ui-system/index.md
  • docs/ui-system/overview.md
  • docs/ui-system/product-shell.md
  • docs/waitlist/index.md
  • docs/waitlist/overview.md
  • docs/waitlist/status-transitions.md
  • docs/workflow-runtime/extension-guide.md
  • docs/workflow-runtime/index.md
  • docs/workflow-runtime/overview.md
  • package.json
  • packages/shared/content/blog/posts.ts
  • scripts/docs-index.ts
💤 Files with no reviewable changes (3)
  • docs/simplification-plan-agent-workflows.md
  • docs/SLACK_INTEGRATION.md
  • docs/ARCHITECTURE.md

Comment thread scripts/docs-index.ts
Comment on lines +225 to +233
function shouldGenerateIndex(
directory: DocsDirectory,
docsRoot: string
): boolean {
return (
directory.absolutePath === docsRoot ||
collectNonIndexMarkdownFiles(directory).length > 1
)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep existing folder indexes under validation.

shouldGenerateIndex() only tracks directories with more than one non-index doc, so a folder that once had a generated index.md can drop to one file and then stop being rewritten or checked. That leaves stale generated indexes behind and breaks the “generated indexes stay authoritative” contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/docs-index.ts` around lines 225 - 233, The shouldGenerateIndex()
function only returns true for directories with more than one non-index markdown
file, which means a directory that previously had a generated index.md can
become stale if files are removed. Modify the condition to also return true if a
directory already contains an existing index.md file, ensuring that previously
generated indexes continue to be validated and potentially updated or cleaned
up, even if the directory no longer meets the multi-file threshold.

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