Skip to content
Open
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
35 changes: 35 additions & 0 deletions .doc-bot-task.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Example task configuration for doc-bot task mode
# This allows running doc-bot iteratively instead of via webhooks

# Repository to work with (GitLab or GitHub)
repo: https://github.com/yourorg/yourproject

# Platform: gitlab or github
platform: github

# Project path (org/project)
project: yourorg/yourproject

# Branch to check for changes
branch: feature/new-api

# Base branch to compare against
base_branch: main

# Optional: Specific commits to analyze (if not specified, checks all commits in branch)
# commits:
# - abc123def
# - def456abc

# Optional: Existing PR/MR number
# If not specified, doc-bot will create one and update this file with the PR number
# pr: "123"

# Optional: Working directory for clones
# work_dir: /tmp/doc-bot-tasks

# Optional: Instructions for the documentation update
# instructions: |
# Focus on the API reference documentation.
# Ensure all new endpoints are documented.
# Skip the tutorial sections.
89 changes: 89 additions & 0 deletions .doc-bot.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Doc-Bot Configuration Example
# Place this file as .doc-bot.yaml in your repository root

# ============================================================================
# Trigger Configuration
# ============================================================================
trigger:
# How the bot is triggered:
# - "auto": Bot comments suggestions on every MR/PR that touches matched paths
# - "slash-command": Bot only acts when /doc-bot is used in a comment
# - "hybrid": Bot auto-triages and suggests, but only writes changes on command
mode: hybrid

# ============================================================================
# Model Configuration
# ============================================================================
# Claude model to use for analysis and doc generation
# Options: claude-sonnet-4-5-20250929, claude-opus-4-6, claude-haiku-3-5
model: claude-sonnet-4-5-20250929

# Maximum agent turns per invocation (controls cost)
# Higher values allow more complex analysis but cost more
max_turns: 20

# ============================================================================
# Style Guide
# ============================================================================
# Path to the documentation style guide (relative to repo root)
# This file is injected into the agent's context as project instructions
# Optional - if not provided, the agent will follow existing doc style
style_guide: docs/docs-style.md

# ============================================================================
# Documentation Targets
# ============================================================================
# Define which source code patterns map to which documentation

docs:
# Example 1: Same-repo documentation
# Documentation lives in the same repository as the source code
- source_patterns:
- "src/compiler/**"
- "src/parser/**"
- "src/type-system/**"
docs_path: docs/taxi-language/
mode: same-repo

# Example 2: Same-repo API documentation
- source_patterns:
- "src/api/**/*.ts"
- "src/handlers/**/*.ts"
docs_path: docs/api/
mode: same-repo

# Example 3: Cross-repo documentation (same platform)
# Documentation lives in a different repository on the same platform
- source_patterns:
- "src/orbital-runtime/**"
- "src/executor/**"
docs_repo: https://gitlab.com/orbital/orbital-docs
docs_path: docs/runtime/
mode: cross-repo

# Example 4: Cross-repo documentation (different platform)
# Source on GitLab, docs on GitHub (or vice versa)
- source_patterns:
- "src/sdk/**"
- "packages/client/**"
docs_repo: https://github.com/orbital/sdk-documentation
docs_path: docs/
mode: cross-repo

# Example 5: Multiple patterns for the same docs
- source_patterns:
- "src/integrations/slack/**"
- "src/integrations/teams/**"
- "src/integrations/discord/**"
docs_path: docs/integrations/
mode: same-repo

# ============================================================================
# Notes
# ============================================================================
# - source_patterns use glob syntax (**, *, ?)
# - docs_path is relative to the repo root (or docs_repo root for cross-repo)
# - mode must be either "same-repo" or "cross-repo"
# - docs_repo is required for cross-repo mode
# - docs_repo can be on a different platform (GitLab or GitHub)
# - The bot automatically resolves which platform adapter to use based on the URL
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
node_modules
dist
npm-debug.log
.git
.gitignore
.env
.env.*
*.md
!LICENSE
.vscode
.idea
coverage
.nyc_output
*.test.ts
__tests__
tests
.github
jest.config.js
.eslintrc.json
.prettierrc.json
.dockerignore
docker-compose.yml
Dockerfile
.doc-bot.example.yaml
24 changes: 24 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Core Configuration
ANTHROPIC_API_KEY=your-anthropic-api-key-here
PORT=3000
CONCURRENCY_LIMIT=3
MAX_COST_PER_INVOCATION=2.0
SESSION_TTL_HOURS=24
LOG_LEVEL=info
CLONE_BASE_DIR=/tmp/doc-bot
NODE_ENV=production

# GitLab Configuration (optional - remove if not using GitLab)
GITLAB_TOKEN=your-gitlab-token-here
GITLAB_URL=https://gitlab.com
GITLAB_WEBHOOK_SECRET=your-gitlab-webhook-secret-here

# GitHub Configuration (optional - remove if not using GitHub)
# Option 1: GitHub App (recommended)
GITHUB_APP_ID=your-github-app-id
GITHUB_PRIVATE_KEY=your-github-app-private-key-here
GITHUB_WEBHOOK_SECRET=your-github-webhook-secret-here

# Option 2: Personal Access Token (simpler, less secure)
# GITHUB_TOKEN=your-github-token-here
# GITHUB_WEBHOOK_SECRET=your-github-webhook-secret-here
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn"
}
}
41 changes: 41 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Description

<!-- Describe your changes in detail -->

## Type of Change

<!-- Mark the relevant option with an "x" -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test coverage improvement

## Testing

<!-- Describe the tests you ran and how to reproduce them -->

- [ ] Unit tests pass (`npm test`)
- [ ] Linter passes (`npm run lint`)
- [ ] Build succeeds (`npm run build`)
- [ ] Manual testing performed

## Checklist

- [ ] My code follows the project's code style
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings or errors
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Related Issues

<!-- Link to related issues using #issue_number -->

Closes #
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "maintainers"
commit-message:
prefix: "deps"
include: "scope"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
reviewers:
- "maintainers"
commit-message:
prefix: "ci"

# Enable version updates for Docker
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
reviewers:
- "maintainers"
commit-message:
prefix: "docker"
Loading
Loading