Skip to content

docs: restructure into navigable docs/ tree and add MCP user guide#35

Merged
artyomsv merged 1 commit into
masterfrom
docs/restructure-and-mcp-guide
Jun 5, 2026
Merged

docs: restructure into navigable docs/ tree and add MCP user guide#35
artyomsv merged 1 commit into
masterfrom
docs/restructure-and-mcp-guide

Conversation

@artyomsv

@artyomsv artyomsv commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

Restructures project documentation so that the GitHub repo browser is easy to navigate and the headline MCP feature finally has a user-facing guide.

Before — 8 markdown files at the repo root totalling 2735 lines; the README alone was 307 lines covering Features + Architecture + Quick start + Configuration + Project Structure + Roadmap. No user-facing MCP guide existed (only a PRD in docs/roadmap/mcp-server.md).

After — 4 files at the root (the GitHub-conventional set: README, CHANGELOG, CONTRIBUTING, LICENSE), everything else under docs/ as a navigable tree. README is a 95-line landing page. New docs/mcp.md documents all 17 MCP tools with input schemas pulled directly from cmd/quil/mcp_tools.go, plus client wiring for Claude Desktop, Claude Code, Cursor, and VS Code Copilot.

Structure

quil/
├── README.md             95 lines — landing page only (was 307)
├── CHANGELOG.md          (unchanged — convention)
├── CONTRIBUTING.md       rewritten as a thin pointer page (was 119 lines of duplicated build info)
├── LICENSE
└── docs/
    ├── README.md         NEW — documentation index, github.com renders it on `docs/` click
    ├── installation.md   NEW — every install path + build-from-source
    ├── quick-start.md    NEW — first-launch walkthrough
    ├── features.md       NEW — capability tour grouped by area
    ├── keybindings.md    NEW — full keymap + customization
    ├── configuration.md  NEW — ~/.quil/config.toml reference
    ├── mcp.md            NEW — 317-line MCP user guide (the headline)
    ├── plugin-reference.md  (existing)
    ├── troubleshooting.md  NEW — daemon won't start, MCP not detected, log locations, reset
    ├── architecture.md   moved from root via git mv (history preserved)
    ├── roadmap.md        moved
    ├── vision.md         moved
    ├── prd.md            moved
    ├── versioning.md     moved
    ├── plans/            (existing)
    ├── roadmap/          (existing)
    └── superpowers/      (existing)

What changed by file

File Lines (before → after) Purpose
README.md 307 → 95 Landing page: hero + install (3 paths) + 5-key quick start + MCP wiring snippet + Documentation table
CONTRIBUTING.md 119 → 111 Thin pointer page: branch/commit conventions + doc-maintenance checklist. Build instructions moved into docs/installation.md.
docs/README.md new (48 lines) Documentation index — what github.com auto-renders when a visitor clicks the docs/ folder
docs/installation.md new (142 lines) Linux/macOS one-liner, Windows zip, Go install, Docker + native build paths, dev/debug variants, uninstall
docs/quick-start.md new (111 lines) What to do after install — 5 keys, opening a typed pane, automatic persistence, AI assistant connection
docs/features.md new (224 lines) Feature catalog grouped: persistence, layout, clipboard, plugins, observability, pane notes, operations
docs/keybindings.md new (143 lines) Full keymap + customization syntax, why Tab/Shift+Tab are not bound
docs/configuration.md new (153 lines) Every section + every key of ~/.quil/config.toml with defaults and effects
docs/mcp.md new (317 lines) Headline doc. Architecture diagram, wiring snippets for Claude Desktop / Claude Code / Cursor / VS Code Copilot, all 17 tools with input schemas, redaction model, per-pane logging, troubleshooting
docs/troubleshooting.md new (197 lines) Daemon won't start, blank TUI, MCP not detected, version mismatch, log file locations, force-stop, full reset
ARCHITECTURE.mddocs/architecture.md moved git mv preserves history
PRD.mddocs/prd.md moved Cross-references inside fixed up
ROADMAP.mddocs/roadmap.md moved Internal docs/roadmap/... links rewritten as sibling links
VISION.mddocs/vision.md moved
VERSIONING.mddocs/versioning.md moved
.claude/CLAUDE.md edited Documents section rewritten to reflect new tree
site/src/pages/docs.astro edited Reorganised into 5 sections (Getting started / Using Quil / Authoring / Project context / Future roadmap) with current paths + 4 new entries
site/src/components/Footer.astro edited Doc links updated; MCP guide added
docs/plans/2026-03-09-m1-foundation.md 1 line Historical plan's Reference: pointers updated to ../prd.md and ../vision.md

Why MCP got its own user guide

quil mcp is the project's headline AI feature — Quil becomes the bridge between your AI assistant and your terminal. But until this PR, the only MCP documentation was docs/roadmap/mcp-server.md, which is a PRD describing the architecture, not a user guide. A user could not figure out how to wire Quil into Claude Desktop or Cursor without reading the source code.

docs/mcp.md solves that. It contains:

  1. A diagram of how quil mcp bridges MCP JSON-RPC over stdio to the daemon IPC over the Unix socket
  2. Copy-pasteable JSON config snippets for 4 popular MCP clients (Claude Desktop, Claude Code CLI, Cursor, VS Code Copilot Chat)
  3. All 17 tools documented in a single table per group (Discovery, Reading, Interacting, Lifecycle, TUI cooperation, Event observation, Memory reporting) with input schemas pulled directly from cmd/quil/mcp_tools.go so the docs cannot drift
  4. Example AI prompts showing real workflows: build monitoring, cross-pane context, workspace setup, triaging a stuck pane
  5. Security model — the <<REDACT>>...<</REDACT>> marker contract + the regex-fallback layer (OpenAI keys, GitHub PATs, JWTs, BIP-32 extended keys) that catches secrets the AI forgot to wrap
  6. Per-pane MCP logging — where the log files live, what gets logged, the orange border highlight
  7. Troubleshooting — daemon connect failure, AI client not seeing the server, send_keys racing the target TUI, where to look in the logs

Cross-reference verification

A custom relative-link checker was written for the new docs/ tree:

for f in docs/*.md; do
  while IFS= read -r link; do
    target=$(echo "$link" | sed -nE 's/.*\]\(([^)#]+)(#[^)]*)?\).*/\1/p')
    case "$target" in http*|/*) continue;; *.md)
      full="$(dirname "$f")/$target"
      [ ! -f "$full" ] && echo "BROKEN in $f: $target"
    esac
  done < <(grep -oE '\]\([^)]+\.md(#[^)]*)?\)' "$f")
done

All internal MD links resolve. The recursive grep for stale root-MD path mentions across the whole repo (excluding historical content under docs/plans/, docs/roadmap/, docs/superpowers/) returns only:

  • Historical CHANGELOG entries that describe past releases (won't touch)
  • Intentional "moved from root X.md" labels in CLAUDE.md
  • One historical PRD note in docs/roadmap/pane-notes.md (preserved for archaeology)

Verification

  • astro check + astro build against site/0 errors, 0 warnings, 11 pages built
  • Relative-link checker walks every MD link in docs/ — all resolve
  • git mv preserved file history for all 5 moved files (verify with git log --follow docs/architecture.md)
  • README went 307 → 95 lines; root .md count went 8 → 4

Independence from other open PRs

This PR is independent of #34 (feat(tui): add Stop daemon action). They touch disjoint files:

Either can land first; merging order does not require re-basing.

The README had grown to 307 lines covering features + architecture +
keybinds + config + project structure + roadmap, and the MCP integration
— the project's headline AI feature — had no user-facing guide. Other
substantial reference docs (ARCHITECTURE, PRD, ROADMAP, VISION,
VERSIONING) lived at the repo root, making the directory listing on
github.com noisy and hard to navigate.

Structure now:

  Root keeps the four GitHub-conventional files (README, CHANGELOG,
  CONTRIBUTING, LICENSE). README is a 95-line landing page: hero,
  install, five-key quick start, MCP wiring snippet, Documentation
  table linking into docs/.

  docs/ is a navigable wiki. github.com renders docs/README.md as a
  table-of-contents when you click into docs/. Every page has its own
  anchor TOC and is focused on one topic.

New docs:

  - docs/README.md            documentation index
  - docs/installation.md      install paths + build-from-source
  - docs/quick-start.md       first-launch walkthrough
  - docs/features.md          capability tour grouped by area
  - docs/keybindings.md       full keymap + customization
  - docs/configuration.md     ~/.quil/config.toml reference
  - docs/mcp.md               the missing piece: how to wire Quil into
                              Claude Desktop / Claude Code / Cursor /
                              VS Code Copilot, every one of the 17
                              tools documented with input schemas
                              pulled directly from cmd/quil/mcp_tools.go,
                              redaction model, troubleshooting
  - docs/troubleshooting.md   daemon won't start, MCP not detected,
                              log file locations, force-stop, reset

Moved via git mv (history preserved):

  - ARCHITECTURE.md → docs/architecture.md
  - PRD.md          → docs/prd.md
  - ROADMAP.md      → docs/roadmap.md
  - VISION.md       → docs/vision.md
  - VERSIONING.md   → docs/versioning.md

Cross-reference fixes:

  - All internal MD links in moved files re-anchored to the new
    docs/ layout (sibling links instead of repo-root paths;
    ../CHANGELOG.md for the one root file referenced).
  - .claude/CLAUDE.md "Documents" section rewritten to reflect the new
    tree.
  - site/src/pages/docs.astro reorganized into five sections (Getting
    started / Using Quil / Authoring & extending / Project context /
    Future roadmap PRDs) with current paths.
  - site/src/components/Footer.astro doc links updated; MCP guide
    added.
  - docs/plans/2026-03-09-m1-foundation.md "Reference:" pointers
    updated to ../prd.md and ../vision.md.

CONTRIBUTING.md rewritten as a thin pointer-page: branch/commit
conventions, PR expectations, doc-maintenance checklist. Deep build
material moved into docs/installation.md (Build from source section).

Verification:

  - astro check + astro build clean (0 errors, 0 warnings, 11 pages)
  - Recursive grep for stale paths returns only historical CHANGELOG
    entries and intentional "moved from root X.md" labels
  - Custom link checker walks every relative MD link in docs/ — all
    resolve

README went 307 → 95 lines; root MD count went 8 → 4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@artyomsv artyomsv merged commit 06d7b26 into master Jun 5, 2026
5 checks passed
@artyomsv artyomsv deleted the docs/restructure-and-mcp-guide branch June 5, 2026 11:53
artyomsv added a commit that referenced this pull request Jun 5, 2026
…36)

## Summary

Fixes the false-positive minor bump on PR #35 (docs restructure) that
shipped **v1.13.0 with no user-visible changes**.

The release pipeline was scanning both subject AND body of every commit
since the last tag, hoping to catch type lines preserved in squash
bodies when the subject was branch-name-derived. That heuristic produced
this false positive: the #35 PR description contained the literal
back-tick-wrapped reference

> This PR is independent of #34 (`` `feat(tui): add Stop daemon action`
``).

…and the regex `\bfeat[(:/]` matched the substring `feat(` inside the
backticks just as readily as it would have matched a real `feat(tui):`
commit. The release job classified the PR as `minor` and shipped v1.13.0
with nothing user-facing in it.

## Fix

| What | Before | After |
|---|---|---|
| Type classification (feat/fix/perf/bang) | scans `%s%n%b` (subject +
body) | scans `%s` (subject only) — the merger sets the squash subject
explicitly and it IS the authoritative classification |
| `BREAKING CHANGE` detection | matched anywhere in subject+body via
`BREAKING CHANGE` | matches `^BREAKING[ -]CHANGE:` in body **anchored to
line start with trailing colon** — the Conventional Commits footer form.
Prose mentions like "this is not a BREAKING CHANGE" no longer match. |
| Branch-name fallback (`feat/foo-bar`) | covered via body scan | still
covered — the existing `[(:/]` regex on subjects accepts `feat/foo-bar`
form natively |

Diff is ~30 lines, all in `.github/workflows/release.yml`.

## Why this never bit before

The body-scan was a defense-in-depth measure for branch-name-derived
squash subjects. In practice, every merge in this repo's history has had
a properly conventional subject set by the merger, so the body scan
never had to do its intended job — it just sat there waiting to
false-positive. PR #35 was the first PR whose description text contained
a conventional-commit-style reference to another PR, and that's when the
bug surfaced.

## Self-test

Smoke-tested the new regex on the prose vs. footer distinction:

```
$ echo "BREAKING CHANGE: yes" | grep -qE '^BREAKING[ -]CHANGE:'
→ match (correct — real footer)

$ echo "no BREAKING CHANGE here" | grep -qE '^BREAKING[ -]CHANGE:'
→ no match (correct — prose mention)

$ echo "feat(api): add foo" | grep -qiE '\bfeat[(:/]'
→ match (correct — real subject)

$ echo "ref to feat(api)" | grep -qiE '\bfeat[(:/]'
→ matches the regex but the body is no longer scanned for feat —
  irrelevant to the bump path now
```

## Why this PR doesn't bump

The PR is committed as `chore(ci):`, which falls through to the "skip
release" branch in the workflow itself. No `v1.14.1` release will be cut
by merging this; the next user-visible feature PR will bump as normal.

## Test plan

- [x] Inspected the PR #35 squash body to confirm the matching string
(`` `feat(tui)` `` inside backticks)
- [x] Verified the new `^BREAKING[ -]CHANGE:` anchor matches the
Conventional Commits footer form but not casual prose
- [x] Confirmed `chore(ci):` does not match the bump regexes — this PR's
own merge will skip the release job (no v1.14.1 will ship)
- [x] Diff is small and reviewable (~30 lines, single file)
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