Skip to content

Commit 16e7153

Browse files
committed
updates
1 parent 13b01b4 commit 16e7153

File tree

870 files changed

+3685
-214384
lines changed

Some content is hidden

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

870 files changed

+3685
-214384
lines changed

.coverage.project

52 KB
Binary file not shown.

.cursorrules/AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This directory contains development standards, coding guidelines, and best pract
3535
- Domain-independent tools
3636
- Reusable across projects
3737
- 60% minimum test coverage (currently 83.33% - exceeds stretch goal!)
38-
- Tests: `tests/infrastructure/`
38+
- Tests: `tests/infra_tests/`
3939

4040
**Layer 2: Project** (Specific, customizable)
4141
- Location: `projects/{name}/src/` (project-specific code)
@@ -65,7 +65,7 @@ The template provides **two pipeline orchestrators** with different scope:
6565

6666
**Interactive Menu (`./run.sh`)**
6767
- **Use for**: Full pipeline with optional LLM stages
68-
- **Stages**: 0-9 (stage 0 cleanup, stages 1-9 displayed as [1/9] to [9/9])
68+
- **Stages**: 0-9 (stage 0 cleanup, stages 1-10 displayed as [1/10] to [10/10])
6969
- **Features**: Interactive menu, literature search, LLM reviews, translations
7070
- **When to use**: builds, LLM features needed
7171

.cursorrules/infrastructure_modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ infrastructure/<module>/
3232
### Test Organization
3333

3434
```
35-
tests/infrastructure/test_<module>/
35+
tests/infra_tests/test_<module>/
3636
├── __init__.py
3737
├── conftest.py # Shared fixtures
3838
├── test_core.py # Core functionality tests
@@ -245,7 +245,7 @@ Infrastructure modules are integrated into the build pipeline through:
245245

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

250250
Update these scripts to discover and use new infrastructure modules as needed.
251251

.cursorrules/llm_standards.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,16 +435,16 @@ class TestLLMIntegration:
435435

436436
```bash
437437
# Pure logic tests only (fast, no Ollama required)
438-
pytest tests/infrastructure/llm/ -m "not requires_ollama" -v
438+
pytest tests/infra_tests/llm/ -m "not requires_ollama" -v
439439

440440
# All tests (requires running Ollama)
441-
pytest tests/infrastructure/llm/ -v
441+
pytest tests/infra_tests/llm/ -v
442442

443443
# Integration tests only
444-
pytest tests/infrastructure/llm/ -m requires_ollama -v
444+
pytest tests/infra_tests/llm/ -m requires_ollama -v
445445

446446
# With coverage
447-
pytest tests/infrastructure/llm/ --cov=infrastructure/llm --cov-report=html
447+
pytest tests/infra_tests/llm/ --cov=infrastructure/llm --cov-report=html
448448
```
449449

450450
## Streaming Patterns

.cursorrules/testing_standards.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ tests/
5656
For each infrastructure module:
5757

5858
```
59-
tests/infrastructure/test_<module>/
59+
tests/infra_tests/test_<module>/
6060
├── __init__.py
6161
├── conftest.py # Fixtures: sample data, temp files
6262
├── test_core.py # Core functionality
@@ -387,10 +387,10 @@ def logger_fixture(caplog):
387387
python3 -m pytest tests/
388388

389389
# Run specific test file
390-
python3 -m pytest tests/infrastructure/test_core/test_basic.py
390+
python3 -m pytest tests/infra_tests/test_core/test_basic.py
391391

392392
# Run specific test function
393-
python3 -m pytest tests/infrastructure/test_core/test_basic.py::test_validation_passes
393+
python3 -m pytest tests/infra_tests/test_core/test_basic.py::test_validation_passes
394394

395395
# Run with verbose output
396396
python3 -m pytest tests/ -v

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ invalid/
7575

7676
# Separate repositories (managed independently)
7777
projects/cognitive_integrity/
78+
/projects_archive

AGENTS.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This document provides documentation for the Research Project Template system, e
2424
**Layer 1: Infrastructure (Generic - Reusable)**
2525

2626
- `infrastructure/` - Generic build/validation tools (reusable across projects)
27-
- `scripts/` - Entry point orchestrators (two pipeline options: 6-stage core or 10-stage extended)
27+
- `scripts/` - Entry point orchestrators (two pipeline options: 8-stage core or 10-stage extended)
2828
- `tests/` - Infrastructure and integration tests
2929

3030
**Layer 2: Projects (Project-Specific - Customizable)**
@@ -82,6 +82,7 @@ The template now supports **multiple independent projects** within a single repo
8282
**Example Projects:**
8383

8484
- `projects/code_project/` - Code-focused with analysis pipeline
85+
- `projects/blake_active_inference/` - Active inference research project
8586

8687
**Note:** Archived projects are preserved in `projects_archive/` for reference but are not actively executed.
8788

@@ -399,7 +400,7 @@ The template provides **three entry points** for pipeline execution:
399400
# Interactive menu with manuscript operations
400401
./run.sh
401402

402-
# Non-interactive: Extended pipeline (9 stages displayed as [1/9] to [9/9]) with optional LLM review
403+
# Non-interactive: Extended pipeline (10 stages displayed as [1/10] to [10/10]) with optional LLM review
403404
./run.sh --pipeline
404405
```
405406

@@ -412,13 +413,13 @@ python3 scripts/execute_pipeline.py --project code_project --core-only
412413

413414
**Entry Point Comparison**
414415

415-
- **`./run.sh`**: Main entry point - Interactive menu or extended pipeline (9 stages), includes optional LLM review stages. Stages are displayed as [1/9] to [9/9] in logs.
416-
- **`./run.sh --pipeline`**: 9 stages, includes optional LLM review stages. Stages are displayed as [1/9] to [9/9] in logs.
416+
- **`./run.sh`**: Main entry point - Interactive menu or extended pipeline (10 stages), includes optional LLM review stages. Stages are displayed as [1/10] to [10/10] in logs.
417+
- **`./run.sh --pipeline`**: 10 stages, includes optional LLM review stages. Stages are displayed as [1/10] to [10/10] in logs.
417418
- **`python3 scripts/execute_pipeline.py --core-only`**: Core pipeline only (no LLM).
418419

419420
### Pipeline Stages
420421

421-
**Full Pipeline Stages** (displayed as [1/9] to [9/9] in logs):
422+
**Full Pipeline Stages** (displayed as [1/10] to [10/10] in logs):
422423

423424
1. **Clean Output Directories** - Clean working and final output directories
424425
2. **Environment Setup** - Verify system requirements and dependencies
@@ -442,7 +443,7 @@ python3 scripts/execute_pipeline.py --project code_project --core-only
442443

443444
**Stage Numbering:**
444445

445-
- `./run.sh`: 9 stages displayed as [1/9] to [9/9] in progress logs
446+
- `./run.sh`: 10 stages displayed as [1/10] to [10/10] in progress logs
446447
- `scripts/execute_pipeline.py`: Core vs full pipeline is selected by flags (no fixed stage numbering in filenames)
447448

448449
### Manual Execution Options
@@ -533,7 +534,7 @@ python3 -m infrastructure.validation.cli markdown projects/code_project/manuscri
533534
python3 scripts/01_run_tests.py --project code_project
534535

535536
# Or run manually with coverage reports
536-
python3 -m pytest tests/infrastructure/ --cov=infrastructure --cov-report=html
537+
python3 -m pytest tests/infra_tests/ --cov=infrastructure --cov-report=html
537538
python3 -m pytest projects/code_project/tests/ --cov=projects/code_project/src --cov-report=html
538539
```
539540

@@ -672,7 +673,7 @@ python3 scripts/01_run_tests.py
672673
python3 -m pytest projects/code_project/tests/test_example.py -v
673674

674675
# Infrastructure tests with coverage
675-
python3 -m pytest tests/infrastructure/ --cov=infrastructure --cov-report=html
676+
python3 -m pytest tests/infra_tests/ --cov=infrastructure --cov-report=html
676677

677678
# Project tests with coverage
678679
python3 -m pytest projects/code_project/tests/ --cov=projects/code_project/src --cov-report=html
@@ -982,7 +983,7 @@ python3 -m infrastructure.validation.cli pdf output/code_project/pdf/
982983
python3 scripts/01_run_tests.py
983984

984985
# Or run individually with coverage reports
985-
python3 -m pytest tests/infrastructure/ --cov=infrastructure --cov-fail-under=49
986+
python3 -m pytest tests/infra_tests/ --cov=infrastructure --cov-fail-under=49
986987
python3 -m pytest projects/code_project/tests/ --cov=projects/code_project/src --cov-fail-under=70
987988
```
988989

@@ -1255,7 +1256,7 @@ See [`docs/operational/CHECKPOINT_RESUME.md`](docs/operational/CHECKPOINT_RESUME
12551256
- ✅ Zero mock methods - all tests use data and HTTP calls
12561257
- ✅ All .cursorrules standards implemented
12571258
- ✅ compliance with thin orchestrator pattern
1258-
- ✅ Production-ready build pipeline (6-stage core, 10-stage extended)
1259+
- ✅ Production-ready build pipeline (8-stage core, 10-stage extended)
12591260
- ✅ Reproducible outputs (deterministic with fixed seeds)
12601261
- ✅ Graceful degradation for optional features
12611262
- ✅ Multi-project support (projects/{name}/ structure)

CLAUDE.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ This is a research project template with a test-driven development workflow, aut
2424
# Interactive menu (recommended)
2525
./run.sh
2626

27-
# Full pipeline (9 stages: clean, setup, tests, analysis, render, validate, LLM review, LLM translations, copy)
27+
# Full pipeline (10 stages: clean, setup, infra tests, project tests, analysis, render, validate, LLM review, LLM translations, copy)
2828
./run.sh --pipeline
2929

30-
# Core pipeline only (6 stages: no LLM)
30+
# Core pipeline only (8 stages: no LLM)
3131
python3 scripts/execute_pipeline.py --project {project_name} --core-only
3232

3333
# Resume from checkpoint
@@ -40,16 +40,16 @@ python3 scripts/execute_pipeline.py --project {project_name} --core-only
4040
python3 scripts/01_run_tests.py --project {project_name}
4141

4242
# Infrastructure tests only (60% coverage minimum)
43-
uv run pytest tests/infrastructure/ --cov=infrastructure --cov-fail-under=60
43+
uv run pytest tests/infra_tests/ --cov=infrastructure --cov-fail-under=60
4444

4545
# Project tests only (90% coverage minimum)
4646
uv run pytest projects/{project_name}/tests/ --cov=projects/{project_name}/src --cov-fail-under=90
4747

4848
# Run specific test file
49-
uv run pytest tests/infrastructure/test_specific.py -v
49+
uv run pytest tests/infra_tests/test_specific.py -v
5050

5151
# Run single test function
52-
uv run pytest tests/infrastructure/test_specific.py::test_function_name -v
52+
uv run pytest tests/infra_tests/test_specific.py::test_function_name -v
5353

5454
# Coverage files are isolated per suite (.coverage.infra, .coverage.project)
5555
```
@@ -89,7 +89,7 @@ python3 scripts/execute_multi_project.py --no-llm
8989
python3 -c "from infrastructure.project.discovery import discover_projects; from pathlib import Path; print([p.name for p in discover_projects(Path('.'))])"
9090
```
9191

92-
**Active projects:** `code_project`
92+
**Active projects:** `code_project`, `blake_active_inference`
9393
**Archived projects:** Located in `projects_archive/` (not executed by pipeline)
9494

9595
## Architecture
@@ -150,7 +150,7 @@ avg = calculate_average(data) # Use tested method
150150
- **`projects/`** - Active projects (discovered and executed by infrastructure)
151151
- **`projects_archive/`** - Archived projects (preserved but not executed)
152152

153-
**Current active projects:** `code_project`
153+
**Current active projects:** `code_project`, `blake_active_inference`
154154

155155
To archive: `mv projects/{name}/ projects_archive/{name}/`
156156
To reactivate: `mv projects_archive/{name}/ projects/{name}/`
@@ -190,19 +190,21 @@ output/
190190

191191
## Pipeline Stages
192192

193-
### Core Pipeline (Stages 1-7)
194-
1. **Setup Environment** - Validate dependencies, discover projects (not shown in progress)
195-
2. **Infrastructure Tests** - Run infrastructure test suite (may be skipped, not shown in progress)
196-
3. **Run Tests** - Project test suite (90% coverage minimum)
197-
4. **Run Analysis** - Execute `projects/{name}/scripts/` to generate figures/data
198-
5. **Render PDF** - Convert markdown to professional PDFs
199-
6. **Validate Output** - Quality checks on PDFs and content
200-
7. **Copy Outputs** - Copy final deliverables to `output/<name>/`
193+
### Core Pipeline (8 stages)
194+
1. **Clean Output Directories** - Remove previous outputs for a fresh run
195+
2. **Setup Environment** - Validate dependencies, discover projects
196+
3. **Infrastructure Tests** - Run infrastructure test suite (may be skipped)
197+
4. **Project Tests** - Project test suite (90% coverage minimum)
198+
5. **Run Analysis** - Execute `projects/{name}/scripts/` to generate figures/data
199+
6. **Render PDF** - Convert markdown to professional PDFs
200+
7. **Validate Output** - Quality checks on PDFs and content
201+
8. **Copy Outputs** - Copy final deliverables to `output/<name>/`
201202

202-
### Extended Pipeline (Stages 8-10, Optional)
203-
8. **LLM Scientific Review** - Requires Ollama (executive summary, quality review, methodology review, improvement suggestions)
204-
9. **LLM Translations** - Multi-language abstract translations (configure in `config.yaml`)
205-
10. **Executive Report** - Cross-project metrics and dashboards (multi-project mode only)
203+
### Extended Pipeline (Stages 9-10, Optional)
204+
9. **LLM Scientific Review** - Requires Ollama (executive summary, quality review, methodology review, improvement suggestions)
205+
10. **LLM Translations** - Multi-language abstract translations (configure in `config.yaml`)
206+
207+
**Note:** Executive Report (cross-project metrics and dashboards) runs automatically in multi-project mode when 2+ projects are executed.
206208

207209
## Testing Requirements
208210

@@ -227,11 +229,11 @@ output/
227229
python3 scripts/01_run_tests.py --project {project_name}
228230

229231
# With coverage report
230-
uv run pytest tests/infrastructure/ --cov=infrastructure --cov-report=html
232+
uv run pytest tests/infra_tests/ --cov=infrastructure --cov-report=html
231233
uv run pytest projects/{name}/tests/ --cov=projects/{name}/src --cov-report=html
232234

233235
# Specific test
234-
uv run pytest tests/infrastructure/test_specific.py::test_function -v
236+
uv run pytest tests/infra_tests/test_specific.py::test_function -v
235237
```
236238

237239
## Configuration
@@ -277,7 +279,7 @@ export PYTHONPATH=".:infrastructure:projects/code_project/src"
277279
## Development Workflow
278280

279281
### Adding Features
280-
1. Write tests first (TDD) in `projects/{name}/tests/` or `tests/infrastructure/`
282+
1. Write tests first (TDD) in `projects/{name}/tests/` or `tests/infra_tests/`
281283
2. Implement in `projects/{name}/src/` or `infrastructure/`
282284
3. Ensure coverage requirements met
283285
4. Update documentation if needed

0 commit comments

Comments
 (0)