Skip to content

Commit a84bb4c

Browse files
fix: restore accidentally deleted coderipple directory
- Restored entire coderipple/ directory from HEAD~1 - Includes all source code, tests, examples, and documentation - Preserves CI/CD pipeline fixes from previous commit - 66 files restored including core multi-agent system
1 parent 504d79c commit a84bb4c

66 files changed

Lines changed: 26405 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

coderipple/IMPORT_GUIDELINES.md

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# CodeRipple Import Guidelines
2+
3+
This document establishes the standard import patterns for the CodeRipple project to ensure consistency across development environments and CI/CD pipelines.
4+
5+
## Standard Import Patterns
6+
7+
### ✅ Correct Import Patterns
8+
9+
All CodeRipple modules should be imported using the package prefix:
10+
11+
```python
12+
# Core agents
13+
from coderipple.orchestrator_agent import orchestrator_agent
14+
from coderipple.tourist_guide_agent import tourist_guide_agent
15+
from coderipple.building_inspector_agent import building_inspector_agent
16+
from coderipple.historian_agent import historian_agent
17+
18+
# Core tools
19+
from coderipple.webhook_parser import GitHubWebhookParser, WebhookEvent
20+
from coderipple.git_analysis_tool import analyze_git_diff
21+
from coderipple.config import get_config
22+
23+
# Content generation and validation
24+
from coderipple.content_generation_tools import generate_content
25+
from coderipple.bedrock_integration_tools import enhance_content_with_bedrock
26+
from coderipple.content_validation_tools import validate_content_quality
27+
28+
# Analysis tools
29+
from coderipple.source_code_analysis_tool import analyze_source_code
30+
from coderipple.existing_content_discovery_tool import discover_existing_content
31+
32+
# Advanced features
33+
from coderipple.agent_context_flow import coordinate_agents
34+
from coderipple.real_diff_integration_tools import integrate_diff_analysis
35+
```
36+
37+
### ❌ Incorrect Import Patterns
38+
39+
**Do NOT use these patterns:**
40+
41+
```python
42+
# ❌ Direct module imports (will fail in CI/CD)
43+
from webhook_parser import GitHubWebhookParser
44+
from git_analysis_tool import analyze_git_diff
45+
from tourist_guide_agent import tourist_guide_agent
46+
47+
# ❌ src.module imports (legacy pattern)
48+
from src.webhook_parser import GitHubWebhookParser
49+
from src.git_analysis_tool import analyze_git_diff
50+
51+
# ❌ sys.path manipulation (not needed with proper package structure)
52+
import sys
53+
import os
54+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
55+
```
56+
57+
## Package Structure
58+
59+
CodeRipple follows standard Python package structure:
60+
61+
```
62+
coderipple/
63+
├── src/
64+
│ └── coderipple/
65+
│ ├── __init__.py
66+
│ ├── orchestrator_agent.py
67+
│ ├── tourist_guide_agent.py
68+
│ ├── building_inspector_agent.py
69+
│ ├── historian_agent.py
70+
│ ├── webhook_parser.py
71+
│ ├── git_analysis_tool.py
72+
│ ├── config.py
73+
│ └── ... (other modules)
74+
├── tests/
75+
│ ├── test_*.py (all test files)
76+
│ └── test_import_diagnostics.py (diagnostic framework)
77+
└── examples/
78+
└── *.py (example files)
79+
```
80+
81+
## Environment Compatibility
82+
83+
These import patterns work consistently across:
84+
85+
- **Local Development**: macOS, Linux, Windows
86+
- **CI/CD Pipelines**: GitHub Actions, GitLab CI, etc.
87+
- **AWS Lambda**: Production deployment environment
88+
- **Docker Containers**: Containerized deployments
89+
90+
## Diagnostic Tools
91+
92+
### Import Diagnostics Test
93+
94+
Run the comprehensive import diagnostic test to validate your environment:
95+
96+
```bash
97+
cd coderipple
98+
python3 tests/test_import_diagnostics_standalone.py
99+
```
100+
101+
This test provides:
102+
- Environment analysis (Python version, paths, package installation)
103+
- Available modules discovery
104+
- Import validation with specific error reporting
105+
- Actionable recommendations for fixing issues
106+
107+
### Pytest Integration
108+
109+
For pytest-based testing:
110+
111+
```bash
112+
cd coderipple
113+
pytest tests/test_import_diagnostics.py -v
114+
```
115+
116+
## Troubleshooting
117+
118+
### Common Issues and Solutions
119+
120+
**Issue**: `ModuleNotFoundError: No module named 'module_name'`
121+
**Solution**: Use `from coderipple.module_name import ...` instead of `from module_name import ...`
122+
123+
**Issue**: `ModuleNotFoundError: No module named 'src.module_name'`
124+
**Solution**: Replace `from src.module_name import ...` with `from coderipple.module_name import ...`
125+
126+
**Issue**: Imports work locally but fail in CI/CD
127+
**Solution**: Ensure you're using the `coderipple.` prefix for all CodeRipple modules
128+
129+
**Issue**: `ModuleNotFoundError: No module named 'coderipple'`
130+
**Solution**: Install the CodeRipple package: `cd coderipple && pip install -e .`
131+
132+
### Environment Validation
133+
134+
Check your environment setup:
135+
136+
```python
137+
import sys
138+
import coderipple
139+
140+
print(f"Python version: {sys.version}")
141+
print(f"CodeRipple installed: {coderipple.__file__}")
142+
print(f"CodeRipple version: {coderipple.__version__}")
143+
```
144+
145+
## Development Workflow
146+
147+
### Before Committing Code
148+
149+
1. **Run import diagnostics**: `python3 tests/test_import_diagnostics_standalone.py`
150+
2. **Verify test imports**: `python3 -c "from tests.test_your_module import *"`
151+
3. **Check example imports**: `python3 -c "from examples.your_example import *"`
152+
4. **Run full test suite**: `pytest tests/ -v`
153+
154+
### Code Review Checklist
155+
156+
- [ ] All imports use `from coderipple.module_name import ...` pattern
157+
- [ ] No `sys.path.insert()` statements in test or example files
158+
- [ ] No `from src.module_name import ...` patterns
159+
- [ ] No direct module imports without `coderipple.` prefix
160+
- [ ] Import diagnostic test passes
161+
162+
## CI/CD Integration
163+
164+
The import diagnostic framework is integrated into the CI/CD pipeline to catch import issues before deployment:
165+
166+
```yaml
167+
# GitHub Actions example
168+
- name: Run Import Diagnostics
169+
run: |
170+
cd coderipple
171+
python3 tests/test_import_diagnostics_standalone.py
172+
```
173+
174+
## Future Enhancements
175+
176+
- **Import Linting**: Consider adding flake8 or pylint rules to enforce import patterns
177+
- **Pre-commit Hooks**: Automatically validate imports before commits
178+
- **IDE Integration**: Configure IDEs to suggest correct import patterns
179+
180+
---
181+
182+
**Last Updated**: Unit 14.2 Implementation (June 2025)
183+
**Maintained By**: CodeRipple Development Team

coderipple/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# coderipple Documentation Hub
2+
3+
*Auto-generated documentation hub maintained by CodeRipple Tourist Guide Agent*
4+
*Last updated: 2025-06-26 23:41:17*
5+
6+
---
7+
8+
Welcome to the coderipple documentation! This hub provides access to all automatically maintained documentation organized by a **layered documentation structure** - three layers that handle different depths of understanding.
9+
10+
## Documentation Layers
11+
12+
### 🎯 User Documentation (How to ENGAGE)
13+
*Start here if you want to use or contribute to coderipple*
14+
15+
*No user documentation available yet*
16+
17+
### 🏗️ System Documentation (What it IS)
18+
*Current system architecture, capabilities, and technical specifications*
19+
20+
- **[architecture.md](coderipple/system/architecture.md)**: System Architecture
21+
*Updated: 2025-06-26 23:41:17*
22+
23+
### 📚 Decision Documentation (Why it BECAME this way)
24+
*Historical context, architectural decisions, and evolution story*
25+
26+
- **[architecture_decisions.md](coderipple/decisions/architecture_decisions.md)**: Architectural Decision Records
27+
*Updated: 2025-06-26 23:41:17*
28+
29+
---
30+
31+
## Quick Navigation
32+
33+
- **[Repository](https://github.com/robertoallende/coderipple)** - Source code and issues
34+
- **Documentation Status**: 2 files across 2 layers
35+
- **Framework**: [Layered Documentation Structure](https://github.com/robertoallende/coderipple#documentation-layers)
36+
37+
## About This Documentation
38+
39+
This documentation is automatically maintained by **CodeRipple**, a multi-agent system that updates documentation based on code changes. Each layer serves a different purpose:
40+
41+
- **User docs** help you discover, learn, and use the system
42+
- **System docs** explain what currently exists and how it works
43+
- **Decision docs** preserve why things were built this way
44+
45+
*Documentation automatically updates when code changes. If you notice gaps or issues, please [create an issue](https://github.com/robertoallende/coderipple/issues).*
46+
47+
## System Status
48+
49+
-**Step 1**: GitHub webhook payload parsing
50+
-**Step 2**: Git analysis tool framework
51+
-**Step 3**: Multi-agent system (Tourist Guide, Building Inspector, Historian)
52+
-**Step 4A-F**: Complete enhanced documentation generation (README, intelligent content, context flow, Bedrock integration, validation, real diff)
53+
-**Step 5A-D**: Advanced agent capabilities (source analysis, content discovery, update logic, context-rich generation)
54+
-**Step 6**: Tourist Guide enhancement (bootstrap, user documentation structure)
55+
-**Step 7**: Configuration management & directory structure
56+
- 📅 **Step 8**: AWS infrastructure deployment (Lambda, API Gateway, Terraform)
57+
58+
*Generated by CodeRipple Tourist Guide Agent on 2025-06-26 23:41:17*

0 commit comments

Comments
 (0)