بنقرة واحدة
cai-onboard
Use when onboarding a project into CAI. Triggers: 'cai-onboard', 'onboard', '온보딩', 'onboarding', '프로젝트 분석'
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when onboarding a project into CAI. Triggers: 'cai-onboard', 'onboard', '온보딩', 'onboarding', '프로젝트 분석'
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Add backlog items to an existing sprint through guided brainstorming and planning. Automatically detects sprint context or asks for sprint location. Includes brainstorming phase, plan mode for task design, and ensures tasks are sized for single Claude Code sessions. Triggers include "add backlog", "new feature", "add task", "백로그 추가", "기능 추가", "태스크 추가".
Initialize a sprint with kanban-style structure for multi-agent collaboration. Use when user wants to start a sprint, set up sprint structure, or manage work with multiple agents. Triggers include "new sprint", "init sprint", "setup sprint", "start sprint", "스프린트 시작", "스프린트 초기화", "새 스프린트". Creates BACKLOG.md, HANDOFF.md, INSTRUCTION.md, and sets up active/, refs/designs/, refs/plans/ folders.
Design Feature or Task in detail within a sprint. Refines backlog items through brainstorming, creates implementation plan in Plan mode, and adds Sub-tasks to BACKLOG.md upon approval. Triggers: 'plan task', 'plan feature', 'plan backlog'
Review completed Task or Feature deliverables. Uses type-specific checklists (coding/docs/ideation/general) for quality review. Two modes: default (creates improvement Tasks) and immediate-fix (fixes issues directly). Triggers: 'review task', 'review feature', 'review backlog'
Review work in the current session after an agent marks a task as review. Applies type-specific criteria (coding/design/docs/general), reports findings, user selects improvements, enters Plan Mode, then executes improvements and marks task done. Triggers: 'review work', '작업 리뷰', '리뷰해줘'
Apply latest sprint-init template changes to existing sprints. Updates only rules/guidelines sections while preserving user data (Features, Tasks, tables). Triggers: 'update sprint', 'upgrade sprint', 'update template', 'update sprint version'
| name | cai-onboard |
| description | Use when onboarding a project into CAI. Triggers: 'cai-onboard', 'onboard', '온보딩', 'onboarding', '프로젝트 분석' |
⛔ HARD RULE — Interview is NEVER a subagent. Phase 3 (E5) and New Project Flow (N1) interviews are delegated to the
cai:cai-interviewskill, which the main agent runs directly in the current conversation. Do NOT dispatch the interview as a Task subagent — that severs the user's conversational context.
Orchestrates the full onboarding pipeline: analyzes an existing codebase (or bootstraps a new project) and generates a complete set of CAI documents.
--incremental)--resume)| Flag | Effect |
|---|---|
--new | New project mode: skip Phase 1-2 (no code to analyze), start with interview |
--resume | Skip already-generated artifacts (check file existence before each step) |
--incremental | Only analyze modules not yet covered by specs |
--force-interview | Re-run Phase 3 even if context docs already exist |
Is --new flag set?
├── YES → New Project Flow (skip to Step N1)
└── NO → Existing Project Flow (Step E1-E4)
E1. Structure Scan
Invoke the structure-scanner agent to analyze the project's directory and file structure.
context/specs/_overview.md draftAfter completion, write detected source roots to cai.md Configuration section:
Source roots: [detected/paths/]
E2. Parallel Module Analysis
For each module identified by structure-scanner, invoke module-analyst agents in parallel.
context/specs/{module}/_overview.md draft, optional context/specs/{module}/{component}.md draftsIf --incremental: skip modules that already have context/specs/{module}/_overview.md.
If --resume: skip any spec file that already exists.
E3. Verification (MANDATORY — DO NOT SKIP)
You MUST invoke the verification-agent after E2 completes. Do NOT proceed to Phase 2 without running verification. This is non-negotiable. If you skip this step, the generated specs may contain hallucinated claims that will mislead future AI sessions.Invoke the verification-agent to cross-validate all generated spec drafts against actual source code.
After verification completes:
verified or reviewed: update the spec's frontmatter confidence field accordingly.draft and re-verify if significant corrections were made.[Verification] 30 specs 검증 완료
✓ Confirmed: 85 claims
✗ Incorrect: 3 claims (자동 수정됨)
? Uncertain: 5 claims
📈 Promoted: 22 specs (draft→verified), 5 specs (draft→reviewed)
📎 Remaining draft: 3 specs
Do NOT proceed to E4 until verification is complete, confidence promotions are applied, and results are displayed.
E4. Draft Generation
Invoke the draft-generator agent to produce initial context documents from code analysis.
context/decisions/*.md drafts (from git history patterns)context/issues/*.md drafts (from code smells, TODOs)context/project.md draft (from README, package.json, etc.)confidence: draftIf --resume: skip document types where files already exist.
CRITICAL: This phase requires user interaction. Do NOT skip, automate, or bypass this phase unless
--newwas used and interview was already completed. The user MUST participate.
E5. Context Interview
Invoke the cai:cai-interview skill. The main agent runs it directly — the interview skill itself forbids subagent dispatch.
Pass the following to the interview skill:
context/specs/*, context/decisions/* drafts, context/issues/* drafts, context/project.md draft).context/roadmap/*.md files (code cannot infer future plans)If --force-interview: run even if context docs already exist.
E6. Parallel Synthesis
Invoke two agents in parallel:
relationship-mapper — maps inter-module dependencies, data flows, and cross-cutting scenarios
_overview.md files with depends_on, module_dependencies fields + context/specs/_relationships.md (dependency graph, data flows, cross-cutting scenarios)convention-extractor — identifies repeated patterns across the codebase
context/conventions/*.md files (naming, error handling, testing patterns, etc.)E7. Constitution Assembly
Invoke the constitution-assembler agent.
Present the proposed CLAUDE.md content to the user for approval. Do NOT modify CLAUDE.md without explicit user consent.
N1. Context Interview (BLOCKING)
Invoke the cai:cai-interview skill. Pass:
--new mode.context/project.md, context/conventions/*, context/decisions/*, context/issues/*, context/roadmap/*.context/project.mdcontext/project.md + context/conventions/ draftscontext/decisions/*.mdcontext/issues/*.mdcontext/roadmap/planned/*.mdN2. Initial Constitution Assembly
Invoke the constitution-assembler agent with interview results.
N3. Inform user: "Once the project has code, run /cai-onboard --incremental to generate specs."
Display phase transitions clearly:
[Phase 1/4] Analyzing project structure...
✓ Structure scan complete (5 modules found)
✓ Module analysis complete (5/5, 30 specs generated)
⏳ Verification running... (DO NOT SKIP)
✓ Verification: 85 confirmed, 3 corrected, 5 uncertain
[Phase 2/4] Generating document drafts...
✓ 3 decisions, 2 issues, 1 project doc drafted
[Phase 3/4] Interview (your input needed)...
...
[Phase 4/4] Synthesizing relationships and conventions...
✓ Dependencies mapped
✓ 4 conventions extracted
✓ CLAUDE.md update proposed
Agent: structure-scanner — Scans directory/file structure, identifies module boundaries
Task("Scan project structure at {project_root}. Detect source roots and module boundaries.", agent="agents/structure-scanner.md")Agent: module-analyst — Analyzes a single module's internal structure (invoked N times in parallel)
Task("Analyze module at {module_path}. Structure scan result: {scan_result}", agent="agents/module-analyst.md")Agent: verification-agent — Cross-validates spec claims against source code
Task("Verify these spec drafts against source code: {draft_paths}", agent="agents/verification-agent.md")Agent: draft-generator — Generates decisions, issues, project.md from git/code analysis
Task("Generate context document drafts for project at {project_root}", agent="agents/draft-generator.md")(Phase 3 interview is delegated to the cai:cai-interview skill — see E5 / N1. It is run by the main agent and never dispatched as a subagent.)
Agent: relationship-mapper — Maps inter-module dependencies
Task("Map relationships between modules. Specs: {spec_paths}", agent="agents/relationship-mapper.md")Agent: convention-extractor — Extracts repeated patterns as conventions
Task("Extract conventions from codebase. Source roots: {source_roots}", agent="agents/convention-extractor.md")Agent: constitution-assembler — Assembles CLAUDE.md update proposal
Task("Assemble constitution from context documents at context/", agent="agents/constitution-assembler.md")| Artifact | Path | Condition |
|---|---|---|
| Project overview spec | context/specs/_overview.md | Existing project |
| Module relationships | context/specs/_relationships.md | Existing project (Phase 4) |
| Module specs | context/specs/{module}/_overview.md | Existing project |
| Component specs | context/specs/{module}/{component}.md | If modules have clear components |
| Decisions | context/decisions/NNN-{slug}.md | If git history reveals decisions |
| Issues | context/issues/{slug}.md | If code reveals issues |
| Project doc | context/project.md | Always |
| Roadmap items | context/roadmap/{status}/{slug}.md | From interview |
| Conventions | context/conventions/{topic}.md | Existing project |
| CLAUDE.md proposal | (displayed to user) | Always |
| Source roots config | .claude/rules/cai.md | Auto-detected |
| Error | Action |
|---|---|
| structure-scanner finds no recognizable code | Suggest --new mode |
| module-analyst fails for one module | Continue with others, report failure, suggest re-run with --resume |
| verification-agent finds major inconsistencies | Display report, ask user whether to proceed or re-analyze |
| User declines interview (Phase 3) | HALT. Phase 3 is mandatory. Explain why and ask again. |
| Partial completion (interrupted) | Inform user to re-run with --resume |
| Source roots cannot be auto-detected | Ask user to specify source roots manually |