English | 日本語 | 简体中文 | 한국어 | Español
- Prerequisites
- Installation
- Initial Setup
- Daily Workflow
- Periodic Maintenance
- Team Onboarding
- Language Policy
- CI Integration
- Troubleshooting
- Claude Code >= 1.0.0
- AI Dev OS layer files (L1-L3) set up in your project (see templates: TypeScript / Python)
The fastest way to set up AI Dev OS with Claude Code:
npx ai-dev-os init --rules typescript --plugin claude-codeThis automatically adds submodules, copies CLAUDE.md template, and merges hooks. See AI Dev OS CLI for all options.
Add as a submodule to keep AI Dev OS updates separate from your project:
git submodule add https://github.com/yunbow/ai-dev-os-plugin-claude-code.git .claude/plugins/ai-dev-osgit clone https://github.com/yunbow/ai-dev-os-plugin-claude-code.git
cp -r ai-dev-os-plugin-claude-code/skills/ .claude/skills/
cp -r ai-dev-os-plugin-claude-code/agents/ .claude/agents/Copy the hook definitions from hooks/hooks.json into your project's .claude/settings.json:
{
"permissions": { ... },
"hooks": {
"PreToolUse": [ ... ],
"PostToolUse": [ ... ],
"UserPromptSubmit": [ ... ]
}
}Refer to hooks/hooks.json for the full hook configuration.
If your .claude/settings.json already exists and contains other settings, merge the hooks manually:
- Open
hooks/hooks.jsonand your.claude/settings.jsonside by side - Copy each array (
PreToolUse,PostToolUse,UserPromptSubmit) fromhooks/hooks.json - If your
settings.jsonalready has ahookskey, append the entries to each existing array - If your
settings.jsondoes not have ahookskey, add the entirehooksobject
jq -s '.[0] * {hooks: (.[0].hooks // {} | to_entries + (.[1].hooks | to_entries) | group_by(.key) | map({(.[0].key): [.[] | .value[]] }) | add)}' .claude/settings.json hooks/hooks.json > .claude/settings.merged.json
mv .claude/settings.merged.json .claude/settings.jsonVerification: After merging, confirm that your settings.json contains PreToolUse, PostToolUse, and UserPromptSubmit arrays under the hooks key.
/ai-dev-os-init [tech-stack]
Example:
/ai-dev-os-init nextjs
The wizard will:
- Ask about your tech stack, project scale, and existing rule files
- Detect and import existing rules (
.cursorrules,CLAUDE.md,.eslintrc) - Generate the 4-layer directory structure
- Create a
CLAUDE.mdwith guideline references and Specificity Cascade - Optionally set up git submodule isolation
After initialization, confirm the structure:
ai-dev-os/
├── 01_philosophy/
├── 02_decision-criteria/
├── 03_guidelines/
│ ├── common/
│ └── frameworks/
└── 04_ai-frames/
For non-trivial changes, create a guideline-aware plan first:
/ai-dev-os-plan Add user authentication with JWT
This will:
- Analyze your request and identify affected files
- Map files to relevant AI Dev OS guidelines
- Generate a checklist of applicable rules
- Present the plan for your approval before any code is written
The hook will also suggest /ai-dev-os-plan when it detects implementation-related prompts.
When you want to defer implementation — e.g., for team assignment or backlog management — create a ticket instead:
/ai-dev-os-ticket Add user authentication with JWT
This will:
- Perform the same analysis as
/ai-dev-os-plan(affected files, guideline mapping, checklist) - Ask where to create the ticket (if not configured in CLAUDE.md):
- Local file: saves as
TICKET-001-add-user-auth.mdin the specified directory - GitHub Issue: creates an issue via
gh issue create
- Local file: saves as
- Present a preview for your approval
- Create the ticket — without writing any code
To pre-configure the ticket destination, add to your project's CLAUDE.md:
## Ticket Settings
- output: file
- path: docs/tickets/phase1Or for GitHub Issues:
## Ticket Settings
- output: github-issueWrite code as usual. The hooks will automatically:
- Check guideline compliance on every Write/Edit operation
- Warn about dependency rule violations when editing L1-L2 files
- Remind you to run compliance checks before committing
Run the compliance check:
/ai-dev-os-check
This will:
- Parse
CLAUDE.mdto find applicable guidelines - Get changed files from
git diff - Map files to relevant guidelines
- Check compliance and output a report
When you fix AI-generated code during review, extract new rules:
/ai-dev-os-extract [file-path]
This will:
- Analyze the diff to identify why changes were made
- Generate rule candidates in
MUST/MUST NOTformat - Propose target guideline files and L2 principle links
- Add rules to guidelines upon approval
When a team member questions a rule:
/ai-dev-os-why [rule-or-guideline]
Example:
/ai-dev-os-why "why is any type prohibited?"
/ai-dev-os-audit
Checks:
- Dependency rule compliance (no tool-specific terms in L1, no framework details in L2)
- Freshness (L1: 5yr, L2: 3yr, L3: 12mo, L4: 4mo)
- Traceability (L3→L2 links, orphaned rules)
- Coverage (guidelines for all file patterns)
- Consistency (no contradicting rules)
/ai-dev-os-evolve
Analyzes recent commits and review patterns to propose updates to L1 philosophy and L2 principles. This is the "knowledge spiral" — extracting tacit knowledge from daily practice into explicit principles.
/ai-dev-os-report 1w
/ai-dev-os-report 1m
Generates a summary report suitable for team meetings or stakeholder updates.
- Read
ai-dev-os/01_philosophy/core-values.md(5 min) - Skim
ai-dev-os/02_decision-criteria/(10 min) - Run
/ai-dev-os-whyfor any rules that seem unclear - Start coding — hooks will guide compliance automatically
- Run
/ai-dev-os-initon the project - Start with the starter template (L3 only)
- Use
/ai-dev-os-extractafter each code review session - After 2-4 weeks, run
/ai-dev-os-auditto identify gaps - Gradually build L1-L2 through
/ai-dev-os-evolve
All plugin source files (skills, agents, hooks, templates) are maintained in English. This ensures optimal LLM accuracy and broad accessibility. Translated documentation is provided under docs/i18n/ for reference, but English remains the single source of truth.
Hooks provide real-time advisory guidance but operate only within the AI coding tool. They do not enforce compliance at the repository level. For team-wide enforcement, integrate AI Dev OS checks into your CI pipeline.
name: AI Dev OS Compliance
on: [pull_request]
jobs:
compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Check guideline compliance
run: |
# Option 1: Run markdownlint on guideline files
npx markdownlint-cli docs/ai-dev-os/**/*.md
# Option 2: Custom compliance script
# Parse ai-dev-os-scan JSON output and fail on violations
# python scripts/check-compliance.py --strict| Level | Behavior | Recommended For |
|---|---|---|
| Advisory | Hooks warn during development, CI reports violations but does not block | Solo developers, small teams |
| Warning | CI posts violation comments on PRs but allows merge | Teams adopting AI Dev OS gradually |
| Blocking | CI fails on critical violations (security, auth) | Established teams with mature rules |
Start with advisory level and escalate as your rules mature ([draft] → [proven]).
- Verify hooks are in
.claude/settings.json(nothooks/hooks.jsondirectly) - Check that
jqis installed (jq --version) - On Windows, ensure bash is available in PATH
- Verify skill files are in
.claude/skills/directory - Each skill must have a
SKILL.mdfile with valid YAML frontmatter - Run
ls .claude/skills/to confirm
- If a check is too strict, edit the corresponding guideline in
03_guidelines/ - Use
/ai-dev-os-whyto understand the rule's rationale before removing it - Consider relaxing the rule rather than removing it entirely
- Hook checks run on every Write/Edit — if too slow, reduce guideline scope
- Use
context: forkskills (extract, audit, evolve) for heavy operations - Sub-agents run in isolated context to avoid polluting your main session