Skip to content

Commit 11996c0

Browse files
committed
update
1 parent ea1d0d8 commit 11996c0

File tree

833 files changed

+128161
-33098
lines changed

Some content is hidden

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

833 files changed

+128161
-33098
lines changed

.coverage.project

52 KB
Binary file not shown.

.cursorrules/AGENTS.md

Lines changed: 79 additions & 57 deletions
Large diffs are not rendered by default.

.cursorrules/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ Development standards and coding guidelines for the Research Project Template.
55
## Files
66

77
### Main Documents
8+
89
- **AGENTS.md** - overview and navigation (start here)
910
- **README.md** - This file (quick reference)
1011

1112
### Development Standards
13+
1214
- **error_handling.md** - Exception handling patterns
1315
- **python_logging.md** - Logging standards and best practices
1416
- **infrastructure_modules.md** - Infrastructure module development guide
@@ -22,7 +24,7 @@ Development standards and coding guidelines for the Research Project Template.
2224
- **api_design.md** - API design and interface standards
2325
- **manuscript_style.md** - Manuscript formatting and style standards
2426
- **reporting.md** - Reporting module standards and outputs
25-
- **refactoring.md** - **NEW**: Refactoring and modularization standards (clean break approach)
27+
- **refactoring.md** - Refactoring and modularization standards (clean break approach)
2628

2729
## Key Principles
2830

@@ -226,9 +228,12 @@ Before commit:
226228
- [ ] All tests pass
227229
- [ ] No linter errors
228230
- [ ] Docs updated
229-
- [ ] Type hints ## Navigation Tips
231+
- [ ] Type hints on all public APIs
232+
233+
## Navigation Tips
230234

231235
**Pick your task:**
236+
232237
- Writing code → [type_hints_standards.md](type_hints_standards.md)
233238
- Handling errors → [error_handling.md](error_handling.md)
234239
- Writing secure code → [security.md](security.md)
@@ -244,5 +249,5 @@ Before commit:
244249
- See [AGENTS.md](AGENTS.md) for documentation and navigation guide
245250
- See [Quick Navigation Guide](AGENTS.md#quick-navigation-guide) for activity-based guidance
246251
- See [../docs/AGENTS.md](../docs/AGENTS.md) for main project documentation
247-
- See [../docs/core/HOW_TO_USE.md](../docs/core/HOW_TO_USE.md) for usage guide
248-
- See [../docs/development/SECURITY.md](../docs/development/SECURITY.md) for security policy
252+
- See [../docs/core/how-to-use.md](../docs/core/how-to-use.md) for usage guide
253+
- See [../docs/development/security.md](../docs/development/security.md) for security policy

.cursorrules/api_design.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,5 +731,5 @@ def new_function_name(parameter: str) -> str:
731731
- [error_handling.md](error_handling.md) - Exception handling in APIs
732732
- [testing_standards.md](testing_standards.md) - Testing API contracts
733733
- [infrastructure_modules.md](infrastructure_modules.md) - Module API design
734-
- [../docs/reference/API_REFERENCE.md](../docs/reference/API_REFERENCE.md) - API documentation
735-
- [../docs/core/ARCHITECTURE.md](../docs/core/ARCHITECTURE.md) - API architecture design
734+
- [../docs/reference/api-reference.md](../docs/reference/api-reference.md) - API documentation
735+
- [../docs/core/architecture.md](../docs/core/architecture.md) - API architecture design

.cursorrules/code_style.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,4 +524,4 @@ Add to GitHub Actions workflow:
524524
- [error_handling.md](error_handling.md) - Exception handling patterns
525525
- [python_logging.md](python_logging.md) - Logging standards
526526
- [infrastructure_modules.md](infrastructure_modules.md) - Module development standards
527-
- [../docs/best-practices/BEST_PRACTICES.md](../docs/best-practices/BEST_PRACTICES.md) - Code quality best practices
527+
- [../docs/best-practices/best-practices.md](../docs/best-practices/best-practices.md) - Code quality best practices

.cursorrules/documentation_standards.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ See [../AGENTS.md](../AGENTS.md) for overview
407407

408408
- [Related Module](../infrastructure/AGENTS.md) - Infrastructure documentation
409409
- [External Resource](https://example.com) - External documentation
410-
- [Configuration Guide](CONFIGURATION.md) - Configuration documentation
410+
- [Configuration Guide](configuration.md) - Configuration documentation
411411
```
412412

413413
## Format Standards
@@ -537,13 +537,7 @@ Before committing documentation:
537537

538538
- [testing_standards.md](testing_standards.md) - Document tests properly
539539
- [type_hints_standards.md](type_hints_standards.md) - Type hint documentation
540-
- [../docs/DOCUMENTATION_INDEX.md](../docs/DOCUMENTATION_INDEX.md) - documentation index
540+
- [../docs/documentation-index.md](../docs/documentation-index.md) - documentation index
541541
- [../docs/AGENTS.md](../docs/AGENTS.md) - Main project documentation
542542
- [../AGENTS.md](../AGENTS.md) - Root documentation
543-
- [../docs/core/ARCHITECTURE.md](../docs/core/ARCHITECTURE.md) - System architecture
544-
545-
546-
547-
548-
549-
543+
- [../docs/core/architecture.md](../docs/core/architecture.md) - System architecture

.cursorrules/error_handling.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,7 @@ def test_exception_chaining():
357357

358358
## See Also
359359

360-
- [Error Handling Guide](../docs/operational/ERROR_HANDLING_GUIDE.md) - error handling patterns
360+
- [Error Handling Guide](../docs/operational/error-handling-guide.md) - error handling patterns
361361
- [Logging](python_logging.md) - Logging standards
362362
- [testing_standards.md](testing_standards.md) - Testing error conditions
363363
- [documentation_standards.md](documentation_standards.md) - Documenting exceptions
364-
365-
366-

.cursorrules/folder_structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Additional documentation files should only be added when:
166166
| File | Purpose | When to Use |
167167
|------|---------|-------------|
168168
| `CHANGELOG.md` | Version history, migration notes | Versioned infrastructure modules |
169-
| `EXAMPLES.md` | Extended usage examples | Complex modules with many use cases |
169+
| `examples.md` | Extended usage examples | Complex modules with many use cases |
170170
| `TROUBLESHOOTING.md` | Detailed troubleshooting | Error-prone modules (LLM, rendering) |
171171
| `API.md` | API reference | Large public-facing modules |
172172
| `DESIGN.md` | Design decisions, rationale | Complex architectural decisions |

.cursorrules/git_workflow.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Standardized Git workflow ensures clean history, easy collaboration, and reliabl
1515

1616
```bash
1717
# ✅ GOOD: Descriptive feature branches
18-
git checkout -b feature/add-literature-search
18+
git checkout -b feature/add-reporting-dashboard
1919
git checkout -b feature/improve-pdf-validation
2020
git checkout -b bugfix/fix-rendering-crash
2121

@@ -27,7 +27,7 @@ git checkout -b update
2727

2828
### Branch Naming Convention
2929

30-
```
30+
```text
3131
<type>/<description>
3232
3333
Types:
@@ -45,7 +45,7 @@ Types:
4545

4646
### Commit Message Format
4747

48-
```
48+
```text
4949
<type>(<scope>): <description>
5050
5151
[optional body]
@@ -57,7 +57,7 @@ Types:
5757

5858
| Type | Description | Example |
5959
|------|-------------|---------|
60-
| `feat` | feature | `feat(literature): add arXiv search support` |
60+
| `feat` | feature | `feat(reporting): add HTML dashboard output` |
6161
| `fix` | Bug fix | `fix(pdf): resolve rendering crash on empty sections` |
6262
| `docs` | Documentation | `docs(api): update LLM integration guide` |
6363
| `style` | Code style | `style(core): format imports with isort` |
@@ -71,7 +71,7 @@ Types:
7171
### Scopes
7272

7373
- **infrastructure** - Infrastructure modules
74-
- **literature** - Literature search functionality
74+
- **reporting** - Reporting and dashboard generation
7575
- **llm** - LLM integration
7676
- **rendering** - Document rendering
7777
- **validation** - Quality validation
@@ -85,7 +85,7 @@ Types:
8585

8686
```bash
8787
# ✅ GOOD: Clear, descriptive commits
88-
feat(literature): add Semantic Scholar API integration
88+
feat(reporting): add executive summary generation
8989

9090
- Implement Semantic Scholar source adapter
9191
- Add rate limiting for API calls
@@ -124,18 +124,21 @@ BREAKING CHANGE: ValidationError now requires context parameter
124124
### Commit Message Guidelines
125125
126126
#### Subject Line
127+
127128
- **Limit to 50 characters**
128129
- **Start with lowercase** (except proper nouns)
129130
- **No period** at the end
130131
- **Imperative mood** ("add" not "added")
131132
132133
#### Body (Optional)
134+
133135
- **Separate from subject** with blank line
134136
- **Explain what and why**, not how
135137
- **Wrap at 72 characters**
136138
- **Use bullet points** for lists
137139
138140
#### Footer (Optional)
141+
139142
- **Breaking changes**: `BREAKING CHANGE: description`
140143
- **Issue references**: `Closes #123`, `Fixes #456`
141144
- **Co-authors**: `Co-authored-by: Name <email>`
@@ -429,6 +432,7 @@ Configure branch protection:
429432
### Common Git Issues
430433

431434
**Merge Conflicts:**
435+
432436
```bash
433437
# Abort merge
434438
git merge --abort
@@ -443,6 +447,7 @@ git rebase --continue
443447
```
444448

445449
**Lost Commits:**
450+
446451
```bash
447452
# Find lost commits
448453
git reflog
@@ -452,6 +457,7 @@ git checkout <commit-hash>
452457
```
453458

454459
**Large Files:**
460+
455461
```bash
456462
# Remove large files from history
457463
git filter-branch --tree-filter 'rm -f large-file.dat' HEAD
@@ -467,5 +473,5 @@ git lfs track "*.pdf"
467473
- [testing_standards.md](testing_standards.md) - Testing patterns and coverage
468474
- [infrastructure_modules.md](infrastructure_modules.md) - Module development standards
469475
- [documentation_standards.md](documentation_standards.md) - Documentation writing guide
470-
- [../docs/best-practices/VERSION_CONTROL.md](../docs/best-practices/VERSION_CONTROL.md) - Version control best practices
471-
- [../docs/operational/CI_CD_INTEGRATION.md](../docs/operational/CI_CD_INTEGRATION.md) - CI/CD integration guide
476+
- [../docs/best-practices/version-control.md](../docs/best-practices/version-control.md) - Version control best practices
477+
- [../docs/operational/ci-cd-integration.md](../docs/operational/ci-cd-integration.md) - CI/CD integration guide

.cursorrules/infrastructure_modules.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The `infrastructure/` directory contains **reusable, generic build and validatio
88

99
### Subfolder Organization
1010

11-
```
11+
```text
1212
infrastructure/<module>/
1313
├── __init__.py # Public API exports
1414
├── AGENTS.md # documentation
@@ -31,7 +31,7 @@ infrastructure/<module>/
3131

3232
### Test Organization
3333

34-
```
34+
```text
3535
tests/infra_tests/test_<module>/
3636
├── __init__.py
3737
├── conftest.py # Shared fixtures
@@ -53,29 +53,29 @@ tests/infra_tests/test_<module>/
5353

5454
```python
5555
# Good: Import from infrastructure package
56-
from infrastructure.literature import LiteratureSearch
56+
from infrastructure.reporting import generate_pipeline_report
5757
from infrastructure.llm import LLMClient
5858
from infrastructure.rendering import RenderManager
5959
from infrastructure.reporting import generate_pipeline_report, get_error_aggregator
6060

6161
# Bad: Relative imports outside package
62-
from ..literature import LiteratureSearch # DON'T
62+
from ..reporting import generate_pipeline_report # DON'T
6363
```
6464

6565
### Exception Handling
6666

6767
```python
6868
# Good: Use infrastructure exceptions
6969
from infrastructure.core.exceptions import (
70-
LiteratureSearchError,
70+
ReportingError,
7171
LLMConnectionError,
7272
RenderingError
7373
)
7474

7575
# Good: Raise with context
76-
raise LiteratureSearchError(
77-
"API request failed",
78-
context={"source": "arxiv", "query": query}
76+
raise ReportingError(
77+
"Report generation failed",
78+
context={"format": "html", "stage": stage_name}
7979
)
8080
```
8181

@@ -93,12 +93,12 @@ logger.info(f"Processing {count} items")
9393

9494
## Module-Specific Guidelines
9595

96-
### Literature Module
96+
### Documentation Module
9797

98-
- **Multi-source**: Support multiple academic databases
99-
- **Rate limiting**: Respect API rate limits automatically
100-
- **Caching**: Cache responses where possible
101-
- **Deduplication**: Merge results from multiple sources
98+
- **Standards enforcement**: Validate AGENTS.md and README.md structure
99+
- **Cross-referencing**: Check internal link integrity
100+
- **Template generation**: Auto-generate documentation scaffolds
101+
- **Coverage tracking**: Monitor documentation completeness
102102

103103
### LLM Module
104104

@@ -133,7 +133,7 @@ logger.info(f"Processing {count} items")
133133

134134
### Environment Variables
135135

136-
- Prefix with module name: `LITERATURE_API_KEY`
136+
- Prefix with module name: `REPORTING_OUTPUT_DIR`
137137
- Document in module README.md
138138
- Provide sensible defaults
139139

@@ -176,7 +176,7 @@ class ModuleConfig:
176176

177177
```python
178178
# Good
179-
raise LiteratureSearchError("Query failed")
179+
raise ReportingError("Report generation failed")
180180

181181
# Bad
182182
raise Exception("Query failed")
@@ -188,7 +188,7 @@ raise Exception("Query failed")
188188
try:
189189
api_call()
190190
except RequestException as e:
191-
raise LiteratureSearchError("API failed") from e
191+
raise ReportingError("Report generation failed") from e
192192
```
193193

194194
## Documentation Requirements
@@ -244,8 +244,9 @@ Infrastructure modules are integrated into the build pipeline through:
244244
5. **Validation** (`scripts/04_validate_output.py`) - Quality assurance
245245

246246
**Pipeline Entry Points**: Two orchestrators available:
247+
247248
- `./run.sh --pipeline`: 10 stages (0-9) with optional LLM stages (stage 0 cleanup, stages 1-9 tracked)
248-
- `python3 scripts/run_all.py`: 8-stage core pipeline (00-05) only
249+
- `python3 scripts/run_all.py`: 8-stage core pipeline (00-07) only
249250

250251
Update these scripts to discover and use new infrastructure modules as needed.
251252

@@ -258,7 +259,7 @@ Before committing:
258259
- [ ] AGENTS.md - [ ] README.md written
259260
- [ ] Type hints on all public APIs
260261
- [ ] Docstrings on all functions
261-
- [ ] infrastructure/__init__.py updated
262+
- [ ] infrastructure/**init**.py updated
262263
- [ ] infrastructure/AGENTS.md updated
263264
- [ ] No linter errors
264265
- [ ] Wrapper script created (if needed)
@@ -285,7 +286,7 @@ Before committing:
285286

286287
### Module Structure
287288

288-
```
289+
```text
289290
infrastructure/example_module/
290291
├── __init__.py # Public API exports
291292
├── core.py # Core functionality
@@ -295,7 +296,7 @@ infrastructure/example_module/
295296
└── README.md # Quick reference
296297
```
297298

298-
### __init__.py Example
299+
### **init**.py Example
299300

300301
```python
301302
"""Example module - brief description.
@@ -465,20 +466,19 @@ Before merging a new infrastructure module:
465466
- [ ] Configuration documented
466467
- [ ] CLI interface working (if applicable)
467468
- [ ] No imports from project-specific code
468-
- [ ] infrastructure/__init__.py updated
469+
- [ ] infrastructure/**init**.py updated
469470
- [ ] infrastructure/AGENTS.md updated
470471
- [ ] Tests pass locally
471472
- [ ] No linter errors
472473

473474
## References
474475

475476
- [Infrastructure AGENTS.md](../infrastructure/AGENTS.md) - Module organization
476-
- [Modules Guide](../docs/modules/MODULES_GUIDE.md) - guide to all advanced modules
477-
- [API Reference](../docs/reference/API_REFERENCE.md) - API documentation for all modules
478-
- [Two-Layer Architecture](../docs/architecture/TWO_LAYER_ARCHITECTURE.md) - Architecture explanation
477+
- [Modules Guide](../docs/modules/modules-guide.md) - guide to all advanced modules
478+
- [API Reference](../docs/reference/api-reference.md) - API documentation for all modules
479+
- [Two-Layer Architecture](../docs/architecture/two-layer-architecture.md) - Architecture explanation
479480
- [Testing Guide](testing_standards.md) - Testing infrastructure code
480481
- [Error Handling Guide](error_handling.md) - Exception patterns
481482
- [Logging Guide](python_logging.md) - Logging standards
482483
- [Documentation Guide](documentation_standards.md) - Writing module docs
483484
- [Type Hints Guide](type_hints_standards.md) - Type annotation patterns
484-

0 commit comments

Comments
 (0)