Skip to content

docs: replace docs/book with wiki as single source of truth - #72

Open
Lang-Akshay wants to merge 11 commits into
mainfrom
ai-context
Open

docs: replace docs/book with wiki as single source of truth#72
Lang-Akshay wants to merge 11 commits into
mainfrom
ai-context

Conversation

@Lang-Akshay

@Lang-Akshay Lang-Akshay commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What

Replaces the mdBook-based docs/book/ with _context/wiki/ as the single source of documentation — serving both AI agents and human readers from the same Markdown files.

Why

The project had two parallel documentation surfaces (docs/book/src/ and _context/wiki/) that diverged in content and naming. Maintaining both meant every hot-path change required two updates. The wiki is now the sole authoritative source; mdBook renders it for human consumption.

Changes

Deleted

  • docs/book/ — entire directory (31 source files, 8 SVG assets, book.toml, SUMMARY.md)
  • .github/workflows/pages.yml — old book publish workflow

Wiki — new pages

  • security.md — trust boundaries, compromise impact, transport security, secrets handling
  • performance.md — Goose dataplane-only load test, Locust full-stack, benchmark settings

Wiki — updated pages

  • architecture.md — fixed stale ContextForgeGatewayAppStateContextForgeDataPlaneAppState; module boundary label
  • config.md — fixed env var prefix CONTEXTFORGE_GATEWAY_RS_*CONTEXTFORGE_DATA_PLANE_*; fixed schema command; added local Langfuse/OTel/Prometheus stack and Prometheus starter queries
  • deployment.md — fixed image tag info; added TLS choices table
  • getting-started.md — added full local cargo dev workflow: service table, cargo run command, token minting, config seeding, mcp-inspector instructions, server/discover probe, troubleshooting table
  • preferences.md — fixed stale crate paths and schema command; replaced book update rule with wiki update rule
  • project.md — fixed all stale contextforge-gateway-rs-* crate names to contextforge-data-plane-*; replaced book links with wiki links
  • routing.md — expanded capability merge with source-of-truth detail and merge rule list
  • index.md — added security and performance pages; fixed repo name; removed book reference

Book infrastructure — restored pointing at wiki

  • _context/wiki/book.toml — mdBook config (src = ".", edit links to correct GitHub path)
  • _context/wiki/SUMMARY.md — four-section navigation (Project, Architecture, Operations, Contributing)
  • .github/workflows/pages.yml — same workflow shape, now watches _context/wiki/** and deploys from _context/wiki/book
  • .gitignore — replaced docs/book/book/ with _context/wiki/book/

Other

  • AGENTS.md — removed redundant architecture table (wiki index covers it); updated working rule to reference wiki instead of book
  • README.md — all book links replaced with wiki links
  • Makefile — added docs-serve target (mdbook serve _context/wiki --hostname 127.0.0.1 --port 3000 --open)

Verification

mdbook build _context/wiki   # builds clean, all 10 pages rendered
make docs-serve              # live preview with hot reload

GitHub Pages publishes on push to main via the restored workflow — same URL, same experience, wiki content.

@lucarlig lucarlig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need an unique source of truth. We already have the book and the Summary.md please optimize that for AI rather than writing something new from scratch

@lucarlig lucarlig self-assigned this Aug 7, 2026
@Lang-Akshay Lang-Akshay changed the title feat: add LLM-wiki pattern — persistent agent context in _context/wiki/ docs: seed _context/wiki with full architecture book coverage Aug 7, 2026
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
…single true source of information

Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
@Lang-Akshay Lang-Akshay changed the title docs: seed _context/wiki with full architecture book coverage docs: replace docs/book with wiki as single source of truth Aug 10, 2026
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>

@lucarlig lucarlig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Requesting changes because deleting docs/book/ is not yet a lossless migration to the wiki, so the proposed single source of truth would omit durable architecture and integration guidance.

The MCP protocol guardrail is preserved: the wiki still targets MCP 2026-07-28 over Streamable HTTP, uses server/discover plus per-request client metadata for new tests/examples, and rejects new legacy compatibility. The blockers are the other material sections that currently have no wiki equivalent:

  • Migrate the remaining architectural decisions from architectural-choices.md: the “MCP-first, not MCP-only” protocol-neutral shell direction; transport-security ownership and its expected evolution; the requirements for expanding plugin hooks; and the architecture-change follow-through matrix.
  • Preserve the control-plane integration contract: its provisional/de-facto status, exact route and traffic split, required claim shape, MessagePack key/value contract, generation of both schemas/user.json and schemas/user_config.json, and the rule that contract changes must be coordinated across the dataplane, publisher, and integration harness.
  • Preserve or explicitly account for the omitted hot-path/operational material from request flow, concurrency/runtime, plugins, testing, and telemetry. In particular, startup/response flow, progress-token synchronization, runtime/lock details, plugin behavior, configuration options, integration-test lanes, and known telemetry gaps should not silently disappear. If some content is intentionally retired, list it and explain why before removing the source.

There are also branch inconsistencies to fix:

  • _context/wiki/preferences.md:68 and _context/wiki/project.md:54 still instruct contributors to update the “book”.
  • _context/wiki/project.md:5 and :94 still use contextforge-gateway-rs.
  • README.md calls make testing-up / testing-down, but this PR removes those Makefile targets.
  • make docker-prod creates contextforge-data-plane:latest, while compose-up checks for dataplane:latest.
  • The PR body and verification claim a docs-serve target, but the target is absent from the Makefile.

Please keep docs/book/ until the migration has an explicit chapter-to-wiki coverage checklist, or add the missing wiki pages/content in this PR and verify the resulting mdBook plus documented Make targets.

Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
@lucarlig

Copy link
Copy Markdown
Contributor

Thanks — NUMBER_OF_CPUS is fixed. The following issues still remain (architectural diagrams are intentionally out of scope):

  1. Malformed closing code fences. In config.md, deployment.md, getting-started.md, performance.md, and project.md, several Bash/text blocks end with text instead of a plain closing fence. This causes subsequent headings, prose, tables, and the Mermaid block to render inside code blocks. mdbook build and mdbook test currently exit successfully only because content is being swallowed by those malformed fences. Please tag only the opening fence and use a plain closing fence:

    ```bash
    command
    ```
  2. Stale image name. _context/wiki/getting-started.md:6 says make docker-prod builds dataplane:latest; the Makefile builds contextforge-data-plane:latest.

  3. Remaining book content still needs migration before deleting docs/book/:

    • runtime/listener details such as per-runtime tuning, lock inventory, jemalloc rationale, socket backlog, and graceful shutdown;
    • the complete configuration reference, including Redis TLS/mTLS material, upstream certificate/trust settings, OTLP endpoint/protocol/headers/service name, and log name/rotation;
    • current plugin call semantics and the documented demo/test-plugin workflow;
    • the complete cf-integration lanes, commands, overrides, and control-plane baseline settings.
  4. Documentation validation gate. The docs-only validation rule should explicitly require both mdbook build _context/wiki and mdbook test _context/wiki.

Local Markdown link targets are valid.

@cafalchio cafalchio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should have some mermaid for new contributors to understand the flow and architecture.

Signed-off-by: Lang-Akshay <akshay.shinde26@ibm.com>
@Lang-Akshay

Copy link
Copy Markdown
Contributor Author

Thanks for the Review @cafalchio . I have added mermaid diagram to the documentation.

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.

3 participants