Repository navigation
Closed
Copy link
Description
Summary
README.md is 1548 lines. It mixes installation, a feature tour, per-feature configuration and reference material. Split it so the README is a short landing page and every detail has exactly one home, written as what -> why -> how, understandable within seconds, linking out only to official external references and only when needed. Apply the same principle to AGENTS.md, adding nested AGENTS.md files only where a package needs them.
Current state
docs/already has 34 topic pages, and the README duplicates many of them: Commands (commands-reference.md), Tools (tools-reference.md), Configuration (configuration-reference.md), Shortcuts (shortcuts-guide.md), Channels (channels.md,scheduling.md), Heartbeat (heartbeat.md), Skills (skills.md), Web Terminal (web-terminal.md).- These topics exist only in the README, with no
docs/page: Installation (~160 lines), Cost Tracking, Tool Approval System, Computer Use, Frame Sources & Vision Annotation, Persistent Memory, Reminders & Command Hooks, Global Flags. - No package under
internal/has its own docs. The architecture overview lives only inAGENTS.md. Package doc comments (doc.go) are not an option, becauseAGENTS.mdbans comments above packages and files. So aREADME.mdin the package directory is the vehicle, and GitHub renders it when browsing the directory. - The root
README.mdis copied into the npm package at publish time (npm/.gitignore), so the landing page must also make sense on its own on npmjs.com. AGENTS.mdis 65 lines / ~6.9k chars.inferinjects it into the system prompt, capped at 8000 chars / 399 lines (agent.agents_md,DefaultInstructionsMaxCharsinconfig/config.go). That leaves ~1k chars of headroom, so new agent detail cannot keep going into the root file.
Are nested AGENTS.md files a good practice?
Yes, but this repo has a gap:
- The AGENTS.md spec (https://agents.md) recommends nested files for subprojects: the file closest to the edited code takes precedence.
- Claude Code (v2.1.277+) loads a subdirectory
AGENTS.mdon demand when it reads files in that directory (https://code.claude.com/docs/en/memory). Codex concatenates the files from the root down to the working directory. inferdoes not do this.buildAgentsMDInfoininternal/agent/agent_utils.goreads only./AGENTS.md. Until infer supports nested files, they are invisible to infer users and to this repo's owninfer.ymlbot.
So nested files are worth it only for rules an agent would otherwise get wrong in that package. Infer support for nested files should be tracked as its own feature request.
Proposed layout
README.md- landing page only: pitch, recommended install method plus a link to the others, quick start, a feature index (one line per feature linking to itsdocs/page), contributing and license.docs/<topic>.md- user-facing what/why/how per feature (the existing pattern), plus new pages for the README-only topics above.internal/<context>/README.md- contributor-facing what/why/how for each bounded context and capability named inAGENTS.md(agent,conversation,scheduler,a2a,browser,computer,mcp,audio,skills,github,channels,plugins): what it owns, why it is separate, and how it plugs in (domain ports, container wiring, config file). It links to the matchingdocs/page instead of repeating user configuration.- Root
AGENTS.md- stays the always-loaded agent brief: stack, commands, repo-wide rules, security gotchas. internal/<pkg>/AGENTS.md- only where needed (candidates:presentation/for bubbletea v2 and styling rules,agent/tools/for tool manifests and registration). Agent rules only, never a copy of the package README.
Acceptance Criteria
-
README.mdis a landing page of roughly 200 lines or fewer: pitch, install (recommended method + link todocs/installation.md), quick start, feature index linking todocs/, contributing and license. - Every section removed from the README has exactly one home: it is merged into its existing
docs/page (not duplicated), or moved to a new page (docs/installation.md,docs/cost-tracking.md,docs/tool-approval.md,docs/computer-use.md,docs/vision.md,docs/memory.md,docs/hooks.md). Global Flags move intodocs/commands-reference.md. - Every new or touched doc page opens with what / why / how in its first few lines. External links point only to official upstream references, and only where needed.
- Each bounded context and capability listed in
AGENTS.mdhas aninternal/<context>/README.mdcovering what / why / how in about 80 lines or fewer. - Root
AGENTS.mdstays well under infer's 8000-char injection cap. No rule appears in both a README and anAGENTS.md. - Nested
AGENTS.mdfiles are added only for packages with agent-specific rules, and the rootAGENTS.mdsays that such packages ship their own file. - A follow-up feature request is filed for
inferto load nestedAGENTS.mdfiles (today only./AGENTS.mdis injected). - All relative links in
README.md,docs/,internal/**/README.mdandexamples/resolve, andtask lint(markdownlint) passes.
Out of scope
- The docs site (
inference-gateway/docs, thecli*.mdpages) is maintained separately. Syncing it is a follow-up. - Rewriting existing
docs/pages beyond merging README material and adding the what/why/how opener. CHANGELOG.mdand.agents/skills/*.
Open questions
- Package READMEs only for the bounded contexts and capabilities (proposed), or for every Go package?
Only for bounded context
internal/<domain>/README.md
- Should the README's Development section fold into
CONTRIBUTING.mdentirely?
yes
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Sep 28, 2026
@infer /model ollama_cloud/deepseek-v4.1-flash Can you work on this? use /ponytail:ponytail /domain-driven-design
inference-gateway-maintainer commentedon Sep 28, 2026
Model:
ollama_cloud/deepseek-v4.1-flash· View JobTodos
Pull Request
#1384
✅ Infer Result: Success
Done - PR #1384 is ready for review
I split the 1548-line README into a landing page with per-topic docs, gave every bounded context a package README, and rebuilt the agent briefs.
Pull request: #1384 (branch
fix/issue-1379, 3 commits)What changed
README.md is now a 138-line landing page - badges and pitch, the recommended npx install plus a link to
docs/installation.md, a three-step quick start, a one-line-per-feature index linking intodocs/, an examples pointer, and contributing/license. TheDevelopmentsection folds intoCONTRIBUTING.md(per the open question).New docs pages (each opens with what / why / how in its first lines):
installation.md,cost-tracking.md,tool-approval.md,computer-use.md,vision.md,memory.md,hooks.md. The README-only Commands material (infer skills,plugins,avatars,export,insights,reset) and theGlobal Flagssection were merged intodocs/commands-reference.md; the tool-category summary and approval overview were merged intodocs/tools-reference.mdas a new Tool Overview. So every removed section now has exactly one home, none duplicated.I added
docs/examples.mdfor the Examples section: it is user-facing and had no existing home, so it was the only way to keep the README at landing-page size without losing it.Root AGENTS.md is down to 6531 chars (it was 8083, over infer's 8000-char injection cap). It keeps the stack, build/test/lint, repo-wide invariants, import style, testing, style/commits, security gotchas and config, drops the long tool-manifest bullet into the package brief, points at
internal/<context>/README.mdfor architecture, and states that packages with agent-specific rules ship their ownAGENTS.md.Package docs: every bounded context and capability named in AGENTS.md now has an
internal/<context>/README.md(agent, conversation, scheduler, browser, computer, tools, protocols/a2a, protocols/mcp, protocols/agui, audio, skills, github, channels, plugins) with what it owns, why it is separate and how it plugs in (domain ports,NewTools(...)/container wiring, config file), linking to its user-facing docs page instead of repeating configuration. Nested agent briefs were added only where a package has agent-specific rules:internal/tools/AGENTS.md(manifests and registry) andinternal/presentation/AGENTS.md(Bubble Tea v2, Bubbles v2, styling). No rule is duplicated between a README and an AGENTS.md.Verification
task lintpasses (golangci-lint 0 issues, markdownlint clean).README.md,docs/,internal/**/README.mdandexamples/resolve (checked with a throwaway Node script).Follow-ups filed
infershould load nestedAGENTS.mdfiles (todaybuildAgentsMDInfoinjects only./AGENTS.md, which is why the nested briefs currently only help agents that walk the tree).gh pr edit, so they are recorded here.Model:
ollama_cloud/deepseek-v4.1-flash· Exit Code:0· Duration: 9m 34sTokens: 8,291,525 in · 78,263 out · 8,369,788 total (58 requests)
Tool calls: 123 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Sep 28, 2026
🎉 This issue has been resolved in version 0.218.0 🎉
The release is available on:
Your semantic-release bot 📦🚀