원클릭으로
kibel-agentic-rag
Use this skill for evidence-first RAG over Kibela using kibel CLI (retrieve -> verify -> cite).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use this skill for evidence-first RAG over Kibela using kibel CLI (retrieve -> verify -> cite).
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use this skill for high-precision Kibela note retrieval via ambiguity-planner-first workflows.
Use this skill when an agent needs broad operational coverage of the official kibel CLI, including safe GraphQL query execution.
| name | kibel-agentic-rag |
| description | Use this skill for evidence-first RAG over Kibela using kibel CLI (retrieve -> verify -> cite). |
| allowed-tools | Bash(kibel:auth status),Bash(kibel:auth login),Bash(kibel:search note),Bash(kibel:search user),Bash(kibel:note get),Bash(kibel:note get-many),Bash(kibel:note get-from-path),Bash(rg:*),Bash(python3:*) |
Produce high-quality answers grounded in Kibela notes with explicit citations. Primary operating mode is Japanese-first retrieval for Japanese teams.
KBIN="${KIBEL_BIN:-kibel}"
if [[ "${KBIN}" == */* ]]; then
[[ -x "${KBIN}" ]] || { echo "kibel binary not executable: ${KBIN}" >&2; exit 127; }
elif ! command -v "${KBIN}" >/dev/null 2>&1; then
echo "kibel not found in PATH (or set KIBEL_BIN)" >&2
exit 127
fi
if ! command -v python3 >/dev/null 2>&1; then
echo "python3 not found in PATH" >&2
exit 127
fi
AUTH_JSON="$("${KBIN}" auth status 2>/dev/null)" || {
echo "auth status command failed" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get("ok") is True else 1)' <<<"${AUTH_JSON}" || {
echo "auth is not ready; run auth login first" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get("data", {}).get("logged_in") is True else 1)' <<<"${AUTH_JSON}" || {
echo "auth is not ready; run auth login first" >&2
exit 3
}
SMOKE_JSON="$("${KBIN}" search note --query "test" --first 1 2>/dev/null)" || {
echo "search note smoke failed" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get("ok") is True else 1)' <<<"${SMOKE_JSON}" || {
echo "search note smoke returned not ok" >&2
exit 3
}
python3 -c 'import json,sys; d=json.load(sys.stdin); sys.exit(0 if isinstance(d.get("data", {}).get("results"), list) else 1)' <<<"${SMOKE_JSON}" || {
echo "search note output shape mismatch: .data.results[] expected" >&2
exit 3
}
If auth is not ready, recover before retrieval:
# interactive
"${KBIN}" auth login --origin "https://<tenant>.kibe.la" --team "<tenant>"
# non-interactive (CI/temporary, `--with-token` reads stdin)
printf '%s' "${KIBELA_ACCESS_TOKEN}" | \
"${KBIN}" auth login --origin "https://<tenant>.kibe.la" --team "<tenant>" --with-token
Token issue page:
https://<tenant>.kibe.la/settings/access_tokens
Tenant placeholder rule:
https://<tenant>.kibe.la の <tenant> を使う。https://example.kibe.la -> team=exampleSecurity note:
KIBELA_ACCESS_TOKEN / --with-token は CI・一時実行向け。常用しない。search note items: .data.results[]search note page cursor: .data.page_info.endCursorsearch user items: .data.users[]auth status: .data.logged_in, .data.team, .data.originUse KIBEL_RAG_PROFILE (default: balanced):
fast: first=8, max_rounds=1, max_note_fetch=4, max_cli_calls=8balanced: first=16, max_rounds=2, max_note_fetch=8, max_cli_calls=16deep: first=24, max_rounds=3, max_note_fetch=16, max_cli_calls=28Corrective thresholds by profile:
| profile | min_top5_relevance | min_must_have_evidence_hits |
|---|---|---|
| fast | 0.60 | 1 |
| balanced | 0.75 | 2 |
| deep | 0.85 | 2 |
Use this policy before retrieval.
ja / en / mixed.intent (what answer is needed)target (team/project/system/person)artifact (guide/spec/postmortem/runbook/policy)time (latest/current/specific period)scope (all-org vs team-local)Candidate classes:
anchor: normalized original queryartifact-focused: intent + artifactscope-focused: target + artifact or target + intenttime-focused: artifact + recency constraint wordsverification-focused: claim-check style query for weak claimsCandidate budget by profile:
fast: up to 2 candidatesbalanced: up to 4 candidatesdeep: up to 7 candidatesRanking priority:
top3-5 relevance firsttop10 only when it improves coverageambiguity_planner: normalize + decompose + generate candidate queries.route_select: classify question as procedure / direct / multi_hop / global.seed_recall: run broad query with profile-specific first.frontier_expand: generate 1-2 follow-up queries from top hits.evidence_pull: fetch full notes only for selected candidates (query-signal coverage first).corrective_loop: if evidence is weak, re-search with rewritten query.verification: run CoVe-style claim checks before final answer.finalize: answer + evidence + unknowns.Run broad queries using planner candidates:
"${KBIN}" search note --query "<topic>" --first "${FIRST:-16}"
Candidate loop example:
declare -a CANDIDATES=(
"<anchor_query>"
"<artifact_focused_query>"
"<scope_or_time_focused_query>"
)
for q in "${CANDIDATES[@]}"; do
"${KBIN}" search note --query "${q}" --first "${FIRST:-16}"
done
Language fallback rule:
ja: keep all candidates Japanese-firsten: use mixed candidates (ja + en) when team docs are Japanese-heavymixed: prioritize candidates matching target team terminologyWhen result volume is high, paginate forward with cursor:
"${KBIN}" search note --query "<topic>" --after "<cursor>" --first "${FIRST:-16}"
Optional reusable preset:
"${KBIN}" search note --query "<topic>" --save-preset "<name>"
"${KBIN}" search note --preset "<name>"
Optionally include latest self context:
"${KBIN}" search note --mine --first 10
Narrow with filters where known:
"${KBIN}" search note \
--query "<topic>" \
--user-id "<USER_ID>" \
--group-id "<GROUP_ID>" \
--folder-id "<FOLDER_ID>" \
--first "${FIRST:-16}"
Rules:
--user-id is optional; if unknown, continue with group/folder filters first."${KBIN}" search user --query "<topic>" --group-id "<GROUP_ID>" --folder-id "<FOLDER_ID>" --first 10
Then inspect returned note metadata (note get) to pin the correct author ID.
--mine is for self-latest only; do not combine it with other search filters.Signal-based rerank rule (generic):
token) as weak evidence.auth/login/token/認証/ログイン), require compound intent evidence (single-token match is insufficient).Fetch full note bodies for top candidates:
"${KBIN}" note get --id "<NOTE_ID>"
"${KBIN}" note get-many --id "<NOTE_ID_1>" --id "<NOTE_ID_2>"
or:
"${KBIN}" note get-from-path --path "/notes/<number>"
CoVe-style minimum rule:
note get で本文確認する。Unknowns に落とす。Procedure-route verification rule:
手順/方法/how-to), evidence should include:
Japanese-first verification rule:
Unknowns.Corrective trigger rule:
top5_relevance < min_top5_relevance(profile)must_have_evidence_hits < min_must_have_evidence_hits(profile)artifact or target) has no strong evidencegroup-id, folder-id, user-id) when availablePrefer notes with:
intent/target/artifact/time)updatedAt when recency mattersReturn three sections in order.
Example:
Answer:
<final answer>
Evidence:
1. <title> (<url>) - <supporting point>
2. <title> (<url>) - <supporting point>
Unknowns:
- <what could not be validated from retrieved notes>
note get / note get-from-path), not title-only.references/workflow.md: compact step-by-step workflow.templates/evidence_answer_template.md: final response template.templates/profile_scorecard.md: profile A/B evaluation sheet.templates/ambiguity_planner_card.md: ambiguity decomposition worksheet.docs/agentic-rag-architecture.md: architecture and KPI-based evaluation.Evaluation policy: