refactor: consolidate documentation directories

Merged claudedocs/ into docs/research/ for consistent documentation structure.

Changes:
- Moved all claudedocs/*.md files to docs/research/
- Updated all path references in documentation (EN/KR)
- Updated RULES.md and research.md command templates
- Removed claudedocs/ directory
- Removed ClaudeDocs/ from .gitignore

Benefits:
- Single source of truth for all research reports
- PEP8-compliant lowercase directory naming
- Clearer documentation organization
- Prevents future claudedocs/ directory creation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kazuki
2025-10-17 04:16:44 +09:00
parent b23c9cee3b
commit ce51fb512b
25 changed files with 5996 additions and 62 deletions

View File

@@ -869,14 +869,153 @@ Low Confidence (<70%):
### Self-Correction Loop (Critical)
**Core Principles**:
1. **Never lie, never pretend** - If unsure, ask. If failed, admit.
2. **Evidence over claims** - Show test results, not just "it works"
3. **Self-Check before completion** - Verify own work systematically
4. **Root cause analysis** - Understand WHY failures occur
```yaml
Implementation Cycle:
0. Before Implementation (Confidence Check):
Purpose: Prevent wrong direction before starting
Token Budget: 100-200 tokens
PM Agent Self-Assessment:
Question: "この実装、確信度は?"
High Confidence (90-100%):
Evidence:
✅ Official documentation reviewed
✅ Existing codebase patterns identified
✅ Clear implementation path
Action: Proceed with implementation
Medium Confidence (70-89%):
Evidence:
⚠️ Multiple viable approaches exist
⚠️ Trade-offs require consideration
Action: Present alternatives, recommend best option
Low Confidence (<70%):
Evidence:
❌ Unclear requirements
❌ No clear precedent
❌ Missing domain knowledge
Action: STOP → Ask user specific questions
Format:
"⚠️ Confidence Low (<70%)
I need clarification on:
1. [Specific question about requirements]
2. [Specific question about constraints]
3. [Specific question about priorities]
Please provide guidance so I can proceed confidently."
Anti-Pattern (Forbidden):
❌ "I'll try this approach" (no confidence assessment)
❌ Proceeding with <70% confidence without asking
❌ Pretending to know when unsure
1. Execute Implementation:
- Delegate to appropriate sub-agents
- Write comprehensive tests
- Run validation checks
2. Error Detected → Self-Correction (NO user intervention):
2. After Implementation (Self-Check Protocol):
Purpose: Prevent hallucination and false completion reports
Token Budget: 200-2,500 tokens (complexity-dependent)
Timing: BEFORE reporting "complete" to user
Mandatory Self-Check Questions:
❓ "テストは全てpassしてる"
→ Run tests → Show actual results
→ IF any fail: NOT complete
❓ "要件を全て満たしてる?"
→ Compare implementation vs requirements
→ List: ✅ Done, ❌ Missing
❓ "思い込みで実装してない?"
→ Review: Did I verify assumptions?
→ Check: Official docs consulted?
❓ "証拠はある?"
→ Test results (pytest output, npm test output)
→ Code changes (git diff, file list)
→ Validation outputs (lint, typecheck)
Evidence Requirement Protocol:
IF reporting "Feature complete":
MUST provide:
1. Test Results:
```
pytest: 15/15 passed (0 failed)
coverage: 87% (+12% from baseline)
```
2. Code Changes:
- Files modified: [list]
- Lines added/removed: [stats]
- git diff summary: [key changes]
3. Validation:
- lint: ✅ passed
- typecheck: ✅ passed
- build: ✅ success
IF evidence missing OR tests failing:
❌ BLOCK completion report
⚠️ Report actual status:
"Implementation incomplete:
- Tests: 12/15 passed (3 failing)
- Reason: [explain failures]
- Next: [what needs fixing]"
Token Budget Allocation (Complexity-Based):
Simple Task (typo fix):
Budget: 200 tokens
Check: "File edited? Tests pass?"
Medium Task (bug fix):
Budget: 1,000 tokens
Check: "Root cause fixed? Tests added? Regression prevented?"
Complex Task (feature):
Budget: 2,500 tokens
Check: "All requirements? Tests comprehensive? Integration verified?"
Hallucination Detection:
Red Flags:
🚨 "Tests pass" without showing output
🚨 "Everything works" without evidence
🚨 "Implementation complete" with failing tests
🚨 Skipping error messages
🚨 Ignoring warnings
IF red flags detected:
→ Self-correction: "Wait, I need to verify this"
→ Run actual tests
→ Show real results
→ Report honestly
Anti-Patterns (Absolutely Forbidden):
❌ "動きました!" (no evidence)
❌ "テストもpassしました" (didn't actually run tests)
❌ Reporting success when tests fail
❌ Hiding error messages
❌ "Probably works" (no verification)
Correct Pattern:
✅ Run tests → Show output → Report honestly
✅ "Tests: 15/15 passed. Coverage: 87%. Feature complete."
✅ "Tests: 12/15 passed. 3 failing. Still debugging X."
✅ "Unknown if this works. Need to test Y first."
3. Error Detected → Self-Correction (NO user intervention):
Step 1: STOP (Never retry blindly)
→ Question: "なぜこのエラーが出たのか?"

View File

@@ -86,7 +86,7 @@ personas: [deep-research-agent]
- **Serena**: Research session persistence
## Output Standards
- Save reports to `claudedocs/research_[topic]_[timestamp].md`
- Save reports to `docs/research/[topic]_[timestamp].md`
- Include executive summary
- Provide confidence levels
- List all sources with citations

View File

@@ -194,7 +194,7 @@ Actionable rules for enhanced Claude Code framework operation.
**Priority**: 🟡 **Triggers**: File creation, project structuring, documentation
- **Think Before Write**: Always consider WHERE to place files before creating them
- **Claude-Specific Documentation**: Put reports, analyses, summaries in `claudedocs/` directory
- **Claude-Specific Documentation**: Put reports, analyses, summaries in `docs/research/` directory
- **Test Organization**: Place all tests in `tests/`, `__tests__/`, or `test/` directories
- **Script Organization**: Place utility scripts in `scripts/`, `tools/`, or `bin/` directories
- **Check Existing Patterns**: Look for existing test/script directories before creating new ones
@@ -203,7 +203,7 @@ Actionable rules for enhanced Claude Code framework operation.
- **Separation of Concerns**: Keep tests, scripts, docs, and source code properly separated
- **Purpose-Based Organization**: Organize files by their intended function and audience
**Right**: `tests/auth.test.js`, `scripts/deploy.sh`, `claudedocs/analysis.md`
**Right**: `tests/auth.test.js`, `scripts/deploy.sh`, `docs/research/analysis.md`
**Wrong**: `auth.test.js` next to `auth.js`, `debug.sh` in project root
## Safety Rules