원클릭으로
ccg-annotate
code-context-graph — annotation system. AI-driven annotation workflow, tag reference, and annotation search.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
code-context-graph — annotation system. AI-driven annotation workflow, tag reference, and annotation search.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Analyze code relationships with CCG impact radius, flow tracing, callers/callees, git-diff risk, and affected stored flows. Use when a task asks what a change affects, how a call path flows, who calls a symbol, or which flows recent changes touch. Do not use for simple text lookup, documentation generation, or annotation authoring.
Isolate CCG graph build, search, documentation discovery, and analysis by namespace. Use when working across multiple repositories or services, preventing cross-project graph leakage, listing populated namespaces, or applying one namespace consistently across MCP and CLI operations. Do not use for ordinary single-repository work that fits the default namespace.
Author and refine CCG annotations such as @intent, @domainRule, @sideEffect, @mutates, @index, and @see. Use when adding business meaning to code, improving annotation-aware code or documentation retrieval, fixing annotation lint findings, or documenting operational contracts. Do not use for generated Markdown editing or annotations that merely restate symbol names.
Build, update, inspect, and search code-context-graph graphs and route to specialized CCG workflows. Use when a task needs CCG setup, graph freshness, exact symbol or relationship lookup, annotation-aware full-text search, MCP graph queries, or selection among CCG analysis, docs, annotation, and namespace skills. Do not use for a simple file or string lookup when grep/read is sufficient.
Generate, discover, read, and lint CCG documentation. Use when producing Markdown and Wiki snapshots, narrowing broad module questions with search_docs, reading generated docs with get_doc_content, or diagnosing orphan, missing, stale, incomplete, contradiction, dead-ref, and drift findings. Do not use for direct source annotation authoring or exact call-graph analysis.
code-context-graph — documentation generation, RAG indexing, and docs quality linting.
| name | ccg-annotate |
| description | code-context-graph — annotation system. AI-driven annotation workflow, tag reference, and annotation search. |
AI-driven annotation workflow for adding structured metadata to code. Annotations are indexed and searchable via FTS.
| Command | Description | Example |
|---|---|---|
annotate [file|dir] | AI-generate annotations for code | ccg annotate internal/analysis/ |
example [language] | Show annotation writing example | ccg example go |
tags | Show all annotation tag reference | ccg tags |
| Tool | Description |
|---|---|
get_annotation | Get annotation and doc tags for a specific node |
| Tag | Purpose | Example |
|---|---|---|
@index | File/package description | @index Payment processing service |
@intent | Why this function exists | @intent verify credentials before session creation |
@domainRule | Business rule | @domainRule lock account after 5 failures |
@sideEffect | Side effects | @sideEffect sends notification email |
@mutates | State changes | @mutates user.FailedAttempts, session.Token |
@requires | Precondition | @requires user.IsActive == true |
@ensures | Postcondition | @ensures session != nil |
@param | Parameter description | @param username the login ID |
@return | Return description | @return JWT token on success |
@see | Related function | @see SessionManager.Create |
ccg annotate is NOT a CLI binary command — it is an AI-driven workflow executed by Claude.
When the user runs ccg annotate [file|dir], Claude should:
.go, .py, .ts, .java, etc.)For each declaration, read the code and determine:
@intent)@domainRule)@sideEffect: DB writes, API calls, file I/O, notifications)@mutates: fields, tables, caches)@requires: auth, valid input, active state)@ensures: return conditions, post-state)@index on package declaration)// for Go, # for Python, etc.)@intent returns the name for getName())After annotating, run ccg build . to re-index with new annotations.
@intent should describe WHY, not WHAT (not "creates user" but "register new account for onboarding flow")@domainRule should be specific business logic, not generic validation@sideEffect only for actual side effects (DB, network, file, notification)@index should summarize the module's responsibility in one line// @index User authentication and session management service.
package auth
// AuthenticateUser validates credentials and creates a session.
// Called from login API handler.
//
// @param username user login ID
// @param password plaintext password (hashed internally)
// @return JWT token on success
// @intent verify user identity before granting system access
// @domainRule lock account after 5 consecutive failed attempts
// @domainRule locked accounts auto-unlock after 30 minutes
// @sideEffect writes login attempt to audit_log table
// @sideEffect sends security alert email on 3rd failed attempt
// @mutates user.FailedAttempts, user.LockedUntil, user.LastLoginAt
// @requires user.IsActive == true
// @ensures err == nil implies valid JWT with 24h expiry
func AuthenticateUser(username, password string) (string, error) {
Annotations are indexed in FTS and searchable via ccg search (see /ccg skill):
@intent — function purpose/goal@domainRule — business rules@sideEffect — side effects@mutates — state changes@index — file/package level descriptionExample: user asks "결제 관련 코드" → ccg search "결제" finds functions annotated with payment-related @intent/@domainRule.