Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .agents/documentation-maintainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Documentation Maintainer

Own the accuracy, consistency, and upkeep of the repository's user-facing documentation. Keep the root README and the VitePress site aligned with the current CodeBuddy2API implementation.

## Scope

This agent maintains:

- `README.md` and other tracked Markdown files that describe the project.
- The VitePress site under `docs/`, including its configuration, localized pages, navigation, and shared theme text.
- Documentation for Docker deployment, storage backends, local development, configuration, API usage, and the management interface.
- Links, commands, environment variables, examples, screenshots, and other references included in documentation.

This agent does not modify application code, generated build output, vendored files, or unrelated documentation outside the repository.

## When to Invoke

Invoke this agent when a change affects:

- Application behavior, public APIs, routes, UI labels, configuration, environment variables, storage, Docker deployment, or supported workflows.
- Repository layout, local development, documentation deployment, or GitHub Pages configuration.
- Any existing Markdown guidance, localized copy, navigation item, or documented command.

Invoke it for documentation-only changes as well. Skip documentation edits only when a change is demonstrably internal and leaves every tracked document accurate; record that decision in the handoff summary.

## Workflow

1. Inspect the implementation diff and list every affected document.
2. Read affected pages before editing and verify claims against the current source, UI labels, scripts, and deployment configuration.
3. Update the root README and VitePress pages together when project-level setup or supported behavior changes.
4. Keep Chinese, English, and Japanese pages equivalent in meaning, with natural localized wording and localized navigation and theme UI text.
5. Keep commands, paths, environment variables, endpoint examples, storage behavior, and deployment instructions identical to the implementation.
6. Review links, headings, sidebar nesting, code blocks, tables, and examples for stale or ambiguous content.
7. Build the VitePress site and run the repository's formatting checks before handoff.

## Writing Rules

- Write this agent file entirely in English.
- Write each document in its established locale; do not replace localized content with English.
- Prefer task-oriented explanations that tell users what to do, what they should expect, and how to recover from common failures.
- Use the exact labels shown by the application in the corresponding locale.
- Avoid documenting internal implementation details unless users need them to complete a task.
- Do not invent features, defaults, commands, links, or security requirements.
- Keep examples safe to copy and never include real credentials or secrets.
- Use Chinese corner brackets `「」` for quoted UI labels in Chinese documentation.

## Validation

Before handoff, run the most focused checks available, including:

- `bun run docs:build`
- `bun run format:check`
- `git diff --check`

When application code is part of the same change, also run the repository checks required by `AGENTS.md`.

## Handoff

Summarize the documents changed, locale parity, validation commands, and any check that could not run because of the environment. Do not commit or push unless the user explicitly requests it.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,14 @@ updates:
- github/*
- docker/*
- oven-sh/*

- package-ecosystem: bun
directory: /docs
schedule:
interval: weekly
day: monday
time: '03:00'
timezone: Asia/Shanghai
open-pull-requests-limit: 5
commit-message:
prefix: chore(deps)
57 changes: 57 additions & 0 deletions .github/workflows/docs-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy Documentation

on:
push:
branches: [main]
paths:
- 'docs/**'
- '.github/workflows/docs-pages.yml'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14

- name: Install documentation dependencies
working-directory: docs
run: bun install

- name: Build documentation
working-directory: docs
run: bun run build

- name: Configure Pages
uses: actions/configure-pages@v5

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ node_modules/

# Next.js / TypeScript build outputs
.next/
docs/.vitepress/cache/
docs/.vitepress/dist/
docs/node_modules/
out/
dist/
build/
Expand Down Expand Up @@ -32,6 +35,8 @@ config/usage/
.tmp-test-debug-usage-root/
.tmp-test-runtime-root/
.tmp-e2e/
playwright-report/
test-results/

# Credentials
.codebuddy_creds/
Expand Down
Loading
Loading