بنقرة واحدة
ccg-docs
code-context-graph — documentation generation, RAG indexing, and docs quality linting.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
code-context-graph — documentation generation, RAG indexing, and docs quality linting.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
code-context-graph — code analysis & architecture. Impact analysis, flow tracing, dead code detection, community structure.
code-context-graph — build code knowledge graphs and search. Core entry point for parsing, building, and querying code graphs.
code-context-graph — file workspace management. Upload, list, and delete files in isolated workspaces for MSA source management.
| name | ccg-docs |
| description | code-context-graph — documentation generation, RAG indexing, and docs quality linting. |
Generate Markdown documentation from code graphs, build RAG indexes for AI consumption, and lint documentation quality.
| Command | Description | Example |
|---|---|---|
docs [--out dir] | Generate Markdown documentation | ccg docs --out docs |
index [--out dir] | Regenerate index.md only | ccg index |
lint [--out dir] | 8-category docs lint | ccg lint |
lint --strict | Exit 1 on issues (for CI/pre-commit) | ccg lint --strict |
hooks install | Install pre-commit git hook | ccg hooks install |
hooks install --lint-strict | Install hook that blocks commit on issues | ccg hooks install --lint-strict |
| Tool | Description |
|---|---|
build_rag_index | Build RAG index from docs and communities. Supports workspace parameter to read docs from a workspace directory. |
get_rag_tree | Navigate RAG document tree. Supports workspace parameter to read workspace-specific doc-index.json. |
get_doc_content | Get documentation file content. Supports workspace parameter to read from a workspace directory. |
search_docs | Search RAG document tree by keyword. Supports workspace parameter to search workspace-specific doc-index.json. |
| Category | Description |
|---|---|
| orphan | Doc files with no matching source code |
| missing | Source files with no documentation |
| stale | Docs outdated vs source (hash/timestamp mismatch) |
| unannotated | Functions lacking @intent/@domainRule annotations |
| contradiction | Doc content contradicting code signatures |
| dead-ref | @see tags pointing to non-existent functions |
| incomplete | Partial documentation (missing @param, @return) |
| drift | Doc structure diverged from code structure |
User: "문서 생성해줘"
→ ccg docs --out docs
→ Generates Markdown files for all modules
User: "RAG 인덱스 만들어줘"
→ build_rag_index via MCP
→ Creates searchable document tree from docs + communities
User: "my-service workspace 문서로 RAG 인덱스 만들어줘"
→ upload_file(workspace: "my-service", file_path: "docs/handler.go.md", content: "<base64>")
→ build_rag_index(workspace: "my-service")
→ search_docs(query: "handler")
→ get_doc_content(workspace: "my-service", file_path: "docs/handler.go.md")
User: "문서 상태 체크해줘"
→ ccg lint
→ Returns 8-category report: orphan, missing, stale, unannotated, etc.
# .github/workflows/docs.yml
- run: ccg lint --strict # Fails build on documentation issues
.ccg.yaml rules support regex patterns for pattern field. Patterns containing $, ^, +, {}, |, \., or .* are auto-detected as regex:
rules:
# Exact match (legacy)
- pattern: "pkg/auth.go::Login"
category: unannotated
action: ignore
# Regex: ignore all symbols under pkg/store/
- pattern: "pkg/store/.*"
category: unannotated
action: ignore
# Regex: ignore all generated code
- pattern: ".*_generated\\.go::.*"
category: incomplete
action: warn
Graph must be built first. If ccg.db doesn't exist, run ccg build . (see /ccg skill).