بنقرة واحدة
three-tier-docs
Use after code changes. Syncs CLAUDE.md, CONTEXT.md, and docs/ai-context/ automatically.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use after code changes. Syncs CLAUDE.md, CONTEXT.md, and docs/ai-context/ automatically.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Coordinate specialized teammates in Agent Teams for execution, review, and planning. Delegate mode mandatory with TaskCompleted/TeammateIdle hooks.
Plan completion workflow - archive plan, verify todos, create git commit, push with retry. Use for finalizing completed plans.
Plan confirmation workflow - extract plan from conversation, create file, auto-review with Interactive Recovery. Use for confirming plans after /00_plan.
Plan execution workflow - parallel SC implementation, worktree mode, verification patterns, GPT delegation. Use for executing plans with TDD + Ralph Loop.
Use when blocked, stuck, or needing fresh perspective. Consults GPT experts via Codex CLI with graceful fallback.
Coordinate independent teammates concurrently in Agent Teams for 50-70% speedup. Launch multiple teammates simultaneously.
| name | three-tier-docs |
| description | Use after code changes. Syncs CLAUDE.md, CONTEXT.md, and docs/ai-context/ automatically. |
Purpose: Auto-sync documentation across 3 tiers (CLAUDE.md → CONTEXT.md → docs/) Target: Documenter agent after implementation
/document command# Tier 1: Sync 3 Entry Point documents
# - CLAUDE.md (≤200 lines)
# - docs/ai-context/project-structure.md
# - docs/ai-context/docs-overview.md
# Tier 2: Component CONTEXT.md (≤200 lines)
# - Purpose, key files, patterns
# Tier 3: Feature CONTEXT.md (≤200 lines)
# - Implementation details
Tier 1: Entry Points (3 files only)
CLAUDE.md - Architecture, features, Quick Start (≤200 lines)docs/ai-context/project-structure.md - Tech stack, file tree (≤200 lines)docs/ai-context/docs-overview.md - Documentation navigation, Tier mapping (≤200 lines)Tier 2: CONTEXT.md (Component Directory)
Tier 3: CONTEXT.md (Feature Directory)
| Tier | Location | Files | Update Frequency |
|---|---|---|---|
| 1 | Root + docs/ai-context/ | CLAUDE.md, project-structure.md, docs-overview.md | Project changes |
| 2 | Component dirs | CONTEXT.md | Component changes |
| 3 | Feature dirs | CONTEXT.md | Feature changes |
Tier 1 Structure (3 files total):
CLAUDE.md - Project architecture, features, Quick Start (≤200 lines)docs/ai-context/project-structure.md - Tech stack, file treedocs/ai-context/docs-overview.md - Documentation navigation, Tier mappingRequired: CLAUDE.md must reference project-structure.md and docs-overview.md at the top
Verification:
# Check Tier 1 files exist
for file in "CLAUDE.md" "docs/ai-context/project-structure.md" "docs/ai-context/docs-overview.md"; do
if [ ! -f "$file" ]; then
echo "FAIL: Missing Tier 1 file: $file"
exit 1
fi
done
# Check CLAUDE.md references the other 2 files
if ! grep -q "project-structure.md" CLAUDE.md || ! grep -q "docs-overview.md" CLAUDE.md; then
echo "FAIL: CLAUDE.md must reference project-structure.md and docs-overview.md"
exit 1
fi
echo "✓ Tier 1 documents verified"
Target directories: Any directory with code files (e.g., src/, components/, lib/)
Script: See REFERENCE.md for full bash implementation
# Generate CONTEXT.md for key directories
for dir in src/ components/ lib/ .claude/commands/ .claude/skills/ .claude/agents/; do
[ -d "$dir" ] || continue
[ -f "$dir/CONTEXT.md" ] && [ -s "$dir/CONTEXT.md" ] && continue
# Generate template (see REFERENCE.md for full script)
echo "✓ Generated $dir/CONTEXT.md"
done
Size Limit: ≤200 lines per file
Invoke the docs-verify skill for comprehensive validation.
Validation includes:
Script: See @.claude/skills/docs-verify/SKILL.md for full verification commands
Verify documentation compliance immediately after update:
# 1. Tier 1 Line Limits (≤200)
for file in CLAUDE.md docs/ai-context/*.md; do
[ -f "$file" ] || continue
lines=$(wc -l < "$file" | tr -d ' ')
[ "$lines" -gt 200 ] && echo "FAIL: $file has $lines lines (limit: 200)"
done
# 2. ai-context file count (exactly 2)
count=$(find docs/ai-context -maxdepth 1 -name "*.md" -type f | wc -l | tr -d ' ')
[ "$count" -ne 2 ] && echo "FAIL: docs/ai-context/ has $count files (expected: 2)"
# 3. Cross-reference check
grep -oE '@[^][:space:]]+' CLAUDE.md | while read ref; do
[ ! -e "${ref#@}" ] && echo "Broken: $ref"
done
Line count violations: CLAUDE.md >200 lines → Extract to docs/ai-context/ | CONTEXT.md >200 lines → Move examples or simplify
Broken cross-references: Check file exists with test -f {path} | Use absolute paths (e.g., @.claude/skills/...)
Missing frontmatter: Add required fields (name, description) | Validate with yamllint {file}
Recovery Steps: Invoke docs-verify skill → Find violating file → Apply fix from REFERENCE.md → Re-verify
Internal: @.claude/skills/three-tier-docs/REFERENCE.md - Complete templates, examples, verification patterns | @.claude/skills/documentation-best-practices/SKILL.md - Size limits, quality standards
External: Documentation System Design | Writing for AI
Version: claude-pilot 4.4.15