Conversation
VitePress setup: - Add vitepress, vitepress-plugin-mermaid as devDependencies - Add docs:dev / docs:build / docs:preview scripts to package.json - Configure VitePress: base URL /github-code-search/, nav, sidebars, local search (Minisearch, no external service), Mermaid plugin, dark/light mode following prefers-color-scheme (appearance: force-auto) - Add docs/.vitepress/theme/index.ts with brand CSS token overrides - Add docs/index.md hero landing page - Add docs/public/versions.json (initial v1 entry) - Exclude docs/** from knip analysis; ignore vitepress deps Governance: - AGENTS.md: add Git conventions section (signed commits + branch naming) - All 3 instruction files: require signed commits in Commit & PR section"
- bun.lock: include vitepress, vitepress-plugin-mermaid, mermaid lockfile entries - .gitignore: ignore docs/.vitepress/cache and docs/.vitepress/dist
Brand & theme: - Replace blue palette with fulll brand colours (violet #9933FF primary, yellow #FFCC33 soft tint, dark blue #0000CC hover) — WCAG AAA contrast - Import Poppins from Google Fonts (Aestetico Informal substitute per brand guidelines), set as --vp-font-family-base with Arial fallback - Dark mode: lighter violet #cc88ff (6.5:1 contrast) with correct tints - Add docs/public/favicon-72.png + apple-touch-icon.png (fulll brand assets) Copilot review fixes: - Fix: replace missing favicon.ico head link with actual brand PNG icons - Fix: configure Mermaid via withMermaid options (theme: 'default') — removes the aggressive CSS invert/hue-rotate filter that distorted diagrams - Fix: remove contradictory entry[] in knip.json (docs/** is already ignored); drop redundant vitepress from ignoreDependencies format:check: - oxfmt auto-fixed AGENTS.md table alignment + config.mts + versions.json Governance: - Add .github/instructions/documentation.instructions.md (brand guidelines, typography, colour palette, VitePress conventions, Mermaid C4 rules)
docs: Initialize VitePress skeleton (#25)
- docs/getting-started/index.md: prerequisites, token scopes table, classic vs fine-grained PAT tip, shell profile snippet - docs/getting-started/installation.md: curl install, custom INSTALL_DIR/VERSION, from source, cross-compilation targets, upgrade pointer - docs/getting-started/first-search.md: end-to-end walkthrough \u2014 TUI anatomy, keyboard navigation, confirm + output, replay command, next-steps links AGENTS.md: clarify that commits must be made locally via git commit -S, not via MCP REST API push tools (mcp_github_push_files etc.) which sign with GitHub's key rather than the developer's personal GPG/SSH key
- AGENTS.md: remove tool-specific run_in_terminal reference, use generic wording - index.md: reword intro (PAT is sole runtime req; Bun in tip callout); remove dead link to /usage/team-grouping - installation.md: add Windows caveat (MINGW/MSYS/Cygwin); use vX.Y.Z version placeholder; list all 6 cross-compile targets (including bun-linux-x64-baseline and bun-windows-x64); remove dead link to /usage/upgrade - first-search.md: add 'text' language to TUI and output fenced blocks; remove dead links to /reference/github-api-limits, /reference/keyboard-shortcuts, /usage/* in What's next section
docs: Add Getting Started section (#26)
- search-syntax.md: GitHub code search qualifiers, practical examples, API limits note - interactive-mode.md: TUI overview, keyboard shortcuts, filter mode, selection behaviour, full workflow example, output and replay command - non-interactive-mode.md: 3 ways to enable, GitHub Actions example, jq / shell tips - output-formats.md: markdown vs json, --output-type repo-and-matches / repo-only, summary line explained - filtering.md: --exclude-repositories, --exclude-extracts (with index warning), --include-archived, combining filters, in-TUI filter - team-grouping.md: --group-by-team-prefix, grouping algorithm, TUI sections, cache location/bypass/purge - upgrade.md: upgrade subcommand, --version, manual upgrade via install.sh - index.md: landing page listing all guides - getting-started/first-search.md: restore /usage/* links (pages now exist) - getting-started/index.md: add link to /usage/team-grouping for read:org scope row
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
) Copilot review fixes: - search-syntax.md: add 'Restrict to specific repos' example showing repo: qualifiers interaction with --org (thread 2) - output-formats.md: - fix Markdown example: correct header (N files selected), add (N matches) suffix per repo, use ::: details for replay (thread 6) - fix repo-only Markdown: raw repo names only, no bullets, ::: details for replay (thread 7) - add --format json to replayCommand in JSON example (thread 9) - fix JSON repo-only: omit matches field, real selection.matches count (thread 3) - non-interactive-mode.md: - separate GitHub Actions YAML into its own yaml block (thread 8) - fix output header to 'N files selected', add (N matches) per repo (thread 11) - fix repo-only shell example to use --format json | jq - interactive-mode.md: fix output header and add (N matches) per repo (thread 10) - upgrade.md: fix output to match actual performUpgrade() messages (thread 4) - filtering.md: clarify --exclude-extracts index is position in API result list for the repo, not an occurrence index within the file (thread 12) VitePress fix: - output-formats.md: replace 4-backtick nested blocks containing <details> with plain 3-backtick text blocks + ::: details VitePress containers to prevent vue:compiler-core 'Invalid end tag' error
docs: add Usage section with 7 guides (#27)
- cli-options.md: full table of all search options (--org, --exclude-repositories, --exclude-extracts, --no-interactive, --format, --output-type, --include-archived, --group-by-team-prefix, --no-cache) + global options (-V, -h) + usage notes - keyboard-shortcuts.md: navigation, selection, filter mode (f / r / Esc / Enter), help and exit (h/? / Enter / q / Ctrl+C), with section for filter-mode bindings - github-api-limits.md: result limits (1,000 max, page 10 hard cap, 256 char query), rate limits (10 unauth / 30 auth req/min), query syntax constraints (no regex, max 5 booleans, NOT behaviour, qualifier-only rejection), pagination behaviour, 3 official GitHub documentation links - environment.md: GITHUB_TOKEN (required scopes), CI, GITHUB_CODE_SEARCH_CACHE_DIR (override + default OS paths table)
- cli-options.md: add intro paragraph; fix <query> required arg; fix --no-interactive and --no-cache defaults to 'true (on)' with clarified descriptions - keyboard-shortcuts.md: keys are case-sensitive, lowercase only; add j/k vim navigation aliases; fix filter mode table: Printable characters + Backspace; clarify Enter when help overlay open vs closed - github-api-limits.md: remove 'deduplicated' from pagination section; fix rate limit callout to say 'retry after reset time'
docs: add Reference section (#28)
Three new pages in docs/architecture/: - overview.md: C4 L1 System Context — Developer + github-code-search + GitHub REST API - containers.md: C4 L2 — CLI parser, API client, TUI, Output renderer, Upgrader, Team cache - components.md: C4 L3 — pure-function core (aggregate, group, rows, summary, filter stats, selection, highlight, output formatter) Each page includes a Mermaid C4 diagram and a prose table describing each actor/container/component with its source file(s) and key exports. VitePress nav and sidebar were already configured in feat/vitepress-docs.
…r; apply Fulll C4 style (#29) ## Plugin migration - package.json: remove vitepress-plugin-mermaid + mermaid, add vitepress-mermaid-renderer ^1.1.11 - config.mts: drop withMermaid() wrapper, use plain defineConfig() - theme/index.ts: init createMermaidRenderer() with dark/base theme toggle - knip.json: update ignoreDependencies accordingly ## C4 diagram refactoring - Apply Fulll brand preset (%%{init}%%) on all diagrams: #FFCC33 = CLI/system, #9933FF = internal modules, #FF9933 = external - UpdateElementStyle / UpdateRelStyle / UpdateLayoutConfig on all diagrams - Add <br/> line breaks for readability - Level N titles across all pages - L2: split into 2a (Search & API layer) and 2b (Display & output layer) to eliminate relation crossings - L3: split into 3a (CLI data pipeline) and 3b (TUI render layer) to keep each diagram under 7 elements with zero crossings - vitepress-mermaid-renderer provides zoom, pan, fullscreen, SVG/PNG export via hover toolbar on every diagram
- components.md: fix aggregate() function name (was applyFiltersAndExclusions) - components.md: fix highlightFragment() function name (was highlight) - components.md + containers.md: fix --format json (was --output-type json) - package.json: re-add mermaid ^11.0.0 as explicit peer dep of vitepress-mermaid-renderer - knip.json: add mermaid to ignoreDependencies
docs: add C4 architecture diagrams (L1–L3) with Fulll brand style (#29)
- .github/workflows/docs.yml: new workflow — 3 jobs
- build: bun docs:build + upload-pages-artifact (triggered on main push)
- deploy: actions/deploy-pages@v4 (triggered on main push)
- snapshot: triggered on vX.0.0 tags — builds with VITEPRESS_BASE,
deploys to gh-pages under /vX/ via peaceiris/actions-gh-pages,
prepends entry to versions.json via stefanzweifel/git-auto-commit-action
- All third-party actions pinned to commit SHAs
- docs/.vitepress/config.mts: base reads process.env.VITEPRESS_BASE
with fallback to /github-code-search/ for regular main-branch deploys
- docs/public/versions.json already initialised with v1 (latest) — no change needed
- Covers issue #31 (GitHub Pages CI/CD deploy) as prerequisite
- docs.yml: use glob tag pattern v[0-9]*.0.0 (not regex +)
- docs.yml: unify deployment on peaceiris/actions-gh-pages (gh-pages
branch) for both latest and versioned snapshots — removes the
incompatible mix of GitHub Actions Pages deployment and gh-pages branch
- docs.yml: pin actions/checkout to commit SHA (11bd71901bbe…)
- docs.yml: fix versions.json link to /${MAJOR}/ (was /github-code-search/${MAJOR}/)
- config.mts: import versions.json and generate nav version dropdown
dynamically so it stays in sync with CI-prepended entries
docs: versioning strategy — CI snapshot + deploy workflow
Replace peaceiris/actions-gh-pages (third-party deploy) with official GitHub Actions Pages deployment (actions/deploy-pages), satisfying the 'no third-party deploy service' acceptance criterion of issue #31. Strategy: - Pages source: GitHub Actions (actions/deploy-pages) - gh-pages branch: versioned snapshot storage only (not served directly) - deploy job: assembles a combined artifact — latest docs at the root + each vX/ snapshot fetched from the gh-pages storage branch — then uploads with actions/upload-pages-artifact + deploys via actions/deploy-pages (both pinned to commit SHAs) - snapshot job: stores the versioned build in gh-pages branch using plain git worktree (no peaceiris); removes [skip ci] from the versions.json commit so the push to main re-triggers the deploy job and the new snapshot is immediately included in the Pages artifact All actions pinned: actions/upload-pages-artifact 56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 actions/deploy-pages d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 (others unchanged from PR #39)
- Use exact version tags (@v4.2.2) instead of SHA pins for consistency
- Add contents:read to deploy job permissions (job-level overrides global)
- Add set -euo pipefail to merge-snapshots and store-snapshot scripts
- Use git ls-tree -- pathspec + empty-dir validation after git archive
- Validate GITHUB_REF_NAME pattern before extracting major version
- Use parameter expansion MAJOR=${GITHUB_REF_NAME%%.*} instead of cut
- Add git worktree remove cleanup after push
docs: GitHub Actions Pages CI/CD — combined artifact deployment
Remove 450+ lines of content now available on the VitePress docs site. Keep: 2-line description, docs badge, release badge, GITHUB_TOKEN export, curl install one-liner, quick usage example. Full documentation at https://fulll.github.io/github-code-search/
docs: slim README to 17 lines — link to docs site
…Match, fancy styling
docs: epic #24 polish — SVG icons, animated terminal hero, nav activeMatch, fancy styling
|
Coverage after merging feat/vitepress-docs into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2.1.2 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
| echo "major=$MAJOR" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2.1.2 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
| mv /tmp/versions_new.json docs/public/versions.json | ||
|
|
||
| - name: Commit versions.json to main | ||
| uses: stefanzweifel/git-auto-commit-action@v5.0.1 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive VitePress documentation site as specified in issue #24. The migration consolidates the 470-line README into a well-structured documentation site with proper navigation, versioning support, and architecture diagrams while reducing the README to 17 lines with a link to the full docs.
Changes:
- Adds VitePress documentation infrastructure with custom theme, Mermaid diagram support, and versioning
- Migrates all README content to organized docs structure (Getting Started, Usage, Reference, Architecture)
- Implements GitHub Actions workflow for automated deployment to GitHub Pages with versioned snapshot support
- Updates project configuration files (package.json, knip.json, .gitignore) for docs tooling
- Adds documentation guidelines for contributors in AGENTS.md and instruction files
Reviewed changes
Copilot reviewed 33 out of 43 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds VitePress, Mermaid, and related dependencies; adds docs:dev, docs:build, docs:preview scripts |
| knip.json | Ignores docs/** directory and VitePress-related dependencies from unused exports checking |
| .gitignore | Excludes VitePress build artifacts (cache and dist directories) |
| docs/.vitepress/config.mts | VitePress configuration with navigation, sidebar, versioning dropdown, and site metadata |
| docs/.vitepress/theme/index.ts | Custom theme extending VitePress default with Mermaid renderer and terminal demo component |
| docs/.vitepress/theme/custom.css | Brand styling with Fulll color palette, Poppins font, and responsive design |
| docs/.vitepress/theme/TerminalDemo.vue | Animated terminal demo component for hero section |
| docs/index.md | Landing page with hero section and feature cards |
| docs/getting-started/*.md | Prerequisites, installation, and first search guides |
| docs/usage/*.md | Seven usage guides covering search syntax, modes, formats, filtering, grouping, and upgrades |
| docs/reference/*.md | Reference documentation for CLI options, shortcuts, API limits, and environment variables |
| docs/architecture/*.md | C4 architecture diagrams (Levels 1-3) documenting system structure |
| docs/public/* | Static assets including favicons, icons, and versions.json for version dropdown |
| .github/workflows/docs.yml | CI/CD workflow for deploying docs to GitHub Pages with versioned snapshot support |
| README.md | Slimmed down to 17 lines with badges and link to full documentation site |
| AGENTS.md | Adds Git conventions section documenting signed commit requirements |
| .github/instructions/*.instructions.md | Updates instruction files with signed commit requirements and adds new documentation guidelines |
| - name: Prepend new version entry to versions.json | ||
| run: | | ||
| MAJOR="${{ steps.ver.outputs.major }}" | ||
| LINK="/${MAJOR}/" |
There was a problem hiding this comment.
The version dropdown creates links using relative paths like "/v2/" (line 190 in workflow). However, the VitePress site is deployed at /github-code-search/ (base URL), so a link to "/v2/" would navigate to the site root /v2/ instead of /github-code-search/v2/ where the snapshot is actually deployed. The LINK variable should be "/github-code-search/${MAJOR}/" to create correct absolute paths that work with the configured base URL.
| LINK="/${MAJOR}/" | |
| LINK="/github-code-search/${MAJOR}/" |
| paths: | ||
| - "docs/**" | ||
| - ".github/workflows/docs.yml" |
There was a problem hiding this comment.
The workflow combines branches and tags under a single push event with a paths filter. In GitHub Actions, paths filters apply to both branches and tags when combined. This means pushing a major version tag (v2.0.0) will only trigger the snapshot job if the tagged commit modified docs/** or the workflow file. If tags are created on commits without doc changes (e.g., after a version bump commit), the snapshot job won't run. Consider separating into two push events: one for branches with paths filter, and one for tags without paths filter to ensure version tags always trigger snapshots.
| paths: | |
| - "docs/**" | |
| - ".github/workflows/docs.yml" |
|
|
||
| ## 5. Mermaid / C4 diagrams | ||
|
|
||
| - Use `vitepress-plugin-mermaid` — wrap diagrams in ` ```mermaid ` fenced blocks. |
There was a problem hiding this comment.
The documentation instructions file (line 77) refers to vitepress-plugin-mermaid but the actual package installed in package.json is vitepress-mermaid-renderer. The documentation should be updated to match the actual package name being used, or vice versa. This discrepancy could confuse contributors.
| - Use `vitepress-plugin-mermaid` — wrap diagrams in ` ```mermaid ` fenced blocks. | |
| - Use `vitepress-mermaid-renderer` — wrap diagrams in ` ```mermaid ` fenced blocks. |
| - Branch name: `refactor/<short-description>` (e.g. `refactor/extract-filter-module`). | ||
| - Commit message: imperative mood, e.g. `Extract FilterStats helpers into render/filter.ts`. | ||
| - **All commits must be signed** (GPG or SSH). Configure once with `git config --global commit.gpgsign true`. | ||
| Commits pushed via the GitHub API (Copilot Coding Agent, MCP tools) are automatically Verified by GitHub. |
There was a problem hiding this comment.
Lines 139-140 state that commits pushed via the GitHub API "are automatically Verified by GitHub" and that agents should avoid using MCP REST API push tools. However, this contradicts the requirement stated in AGENTS.md lines 137-141 which explicitly says commits signed by GitHub's key (like those from REST API pushes) do NOT carry the developer's identity and should be avoided. The instructions files should consistently state that ALL commits must be locally signed with the developer's GPG/SSH key, not GitHub's key.
| Commits pushed via the GitHub API (Copilot Coding Agent, MCP tools) are automatically Verified by GitHub. | |
| Commits must be created and signed locally with your own GPG/SSH key; do **not** use GitHub API / REST-based push tools (including Copilot Coding Agent or MCP tools) that produce commits signed by GitHub’s key. |
| - **All commits must be signed** (GPG or SSH). Configure once with `git config --global commit.gpgsign true`. | ||
| Commits pushed via the GitHub API (Copilot Coding Agent, MCP tools) are automatically Verified by GitHub. |
There was a problem hiding this comment.
Lines 69-70 state that commits pushed via the GitHub API "are automatically Verified by GitHub" which contradicts the signed commit requirement documented in AGENTS.md lines 137-141. The AGENTS.md explicitly says commits signed by GitHub's key (from REST API pushes) do NOT carry the developer's identity and should NOT be used. This instruction should be updated to align with the requirement that all commits must be locally signed with the developer's own GPG/SSH key.
| - **All commits must be signed** (GPG or SSH). Configure once with `git config --global commit.gpgsign true`. | |
| Commits pushed via the GitHub API (Copilot Coding Agent, MCP tools) are automatically Verified by GitHub. | |
| - **All commits must be signed** (GPG or SSH) with your own key. Configure once with `git config --global commit.gpgsign true`. | |
| Commits created via the GitHub API (Copilot Coding Agent, MCP tools) are signed with GitHub’s key and do **not** satisfy this requirement; do not use them for feature work in this repository. |
| - **All commits must be signed** (GPG or SSH). Configure once with `git config --global commit.gpgsign true`. | ||
| Commits pushed via the GitHub API (Copilot Coding Agent, MCP tools) are automatically Verified by GitHub. |
There was a problem hiding this comment.
Lines 78-79 state that commits pushed via the GitHub API "are automatically Verified by GitHub" which contradicts the signed commit requirement documented in AGENTS.md lines 137-141. The AGENTS.md explicitly says commits signed by GitHub's key (from REST API pushes) do NOT carry the developer's identity and should NOT be used. This instruction should be updated to align with the requirement that all commits must be locally signed with the developer's own GPG/SSH key.
| - **All commits must be signed** (GPG or SSH). Configure once with `git config --global commit.gpgsign true`. | |
| Commits pushed via the GitHub API (Copilot Coding Agent, MCP tools) are automatically Verified by GitHub. | |
| - **All commits must be locally signed with your own GPG or SSH key.** Configure once with `git config --global commit.gpgsign true`. | |
| Do **not** rely on commits signed by GitHub’s key (for example, commits created via the GitHub REST API, Copilot Coding Agent, or MCP tools); these do not carry your developer identity and do **not** satisfy this requirement. |
| github-code-search "useFeatureFlag" --org my-org | ||
| ``` | ||
|
|
||
| `github-code-search` fetches all matching code items across your organisation (up to 1 000 results) and opens the **interactive TUI**. |
There was a problem hiding this comment.
The number "1 000" uses space-separated formatting, but according to stored codebase conventions, comma-separated formatting "1,000" should be used instead in documentation. This convention is established to maintain consistency across all documentation.
| `github-code-search` fetches all matching code items across your organisation (up to 1 000 results) and opens the **interactive TUI**. | |
| `github-code-search` fetches all matching code items across your organisation (up to 1,000 results) and opens the **interactive TUI**. |
| uses: stefanzweifel/git-auto-commit-action@v5.0.1 | ||
| with: | ||
| # No [skip ci] — the push to main matches paths: docs/** and re-triggers | ||
| # the deploy job, which merges the new snapshot into the Pages artifact. | ||
| commit_message: "docs: add ${{ steps.ver.outputs.major }} to versions.json" | ||
| file_pattern: docs/public/versions.json | ||
| branch: main |
There was a problem hiding this comment.
The workflow uses stefanzweifel/git-auto-commit-action@v5.0.1 which creates commits that are signed by GitHub's key, not the developer's personal key. This violates the signed commit requirement documented in AGENTS.md lines 137-141 which explicitly states commits signed by GitHub's key do NOT carry the developer's identity and should be avoided. Consider using a local git commit approach instead, or document this as an exception for CI-created commits.
| uses: stefanzweifel/git-auto-commit-action@v5.0.1 | |
| with: | |
| # No [skip ci] — the push to main matches paths: docs/** and re-triggers | |
| # the deploy job, which merges the new snapshot into the Pages artifact. | |
| commit_message: "docs: add ${{ steps.ver.outputs.major }} to versions.json" | |
| file_pattern: docs/public/versions.json | |
| branch: main | |
| # Use a local git commit instead of git-auto-commit-action to avoid | |
| # commits signed with GitHub's global key. These CI commits are an | |
| # explicit exception for generated docs metadata (see AGENTS.md). | |
| run: | | |
| MAJOR="${{ steps.ver.outputs.major }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/public/versions.json | |
| # Only create a commit if there are staged changes. | |
| if ! git diff --cached --quiet; then | |
| git commit -m "docs: add ${MAJOR} to versions.json" | |
| # No [skip ci] — the push to main matches paths: docs/** and re-triggers | |
| # the deploy job, which merges the new snapshot into the Pages artifact. | |
| git push origin HEAD:main | |
| fi |
What does this PR do?
Fixes #24