Skip to content

Commit d4a4327

Browse files
committed
Update claude.md
1 parent b53e349 commit d4a4327

1 file changed

Lines changed: 85 additions & 95 deletions

File tree

CLAUDE.md

Lines changed: 85 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,46 @@
11
# CLAUDE.md
22

3-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3+
This file provides guidance to Claude Code when working with the OpenSPP documentation repository.
44

55
## Overview
66

77
This is the documentation repository for OpenSPP - an open-source social protection platform. The documentation is built using Sphinx with MyST parser for Markdown support.
88

9+
## Project Structure
10+
11+
```
12+
docs/
13+
├── overview/ # High-level information for decision makers
14+
│ ├── features/ # Feature overviews by functional area
15+
│ ├── concepts/ # Conceptual explanations
16+
│ ├── products/ # Product configurations (SP-MIS, Social Registry, Farmer Registry)
17+
│ └── case_studies/ # Implementation examples
18+
├── getting_started/ # Installation and quickstart guides
19+
├── user_guide/ # Task-oriented guides for administrators
20+
│ ├── registry_management/
21+
│ ├── program_management/
22+
│ └── administration/
23+
├── developer_guide/ # Technical documentation
24+
│ ├── customization/
25+
│ ├── integrations/
26+
│ └── api_usage/
27+
├── reference/ # Detailed reference material
28+
│ ├── modules/ # OpenSPP module documentation
29+
│ └── technical/ # Technical specifications
30+
└── community/ # Contribution and support information
31+
```
32+
933
## Build Commands
1034

11-
### Setup Development Environment
35+
### Development Setup
1236
```bash
1337
# Create Python virtual environment and install dependencies
1438
make deps
1539

16-
# This will:
17-
# - Create a Python virtual environment
18-
# - Install requirements from requirements_frozen.txt
19-
# - Initialize git submodules (openg2p-program, openg2p-registry)
40+
# This installs requirements and initializes git submodules
2041
```
2142

22-
### Build Documentation
43+
### Building Documentation
2344
```bash
2445
# Build HTML documentation
2546
make html
@@ -44,105 +65,74 @@ make linkcheck
4465

4566
# Run all quality checks and build
4667
make all # Runs: clean, vale, linkcheck, html
47-
```
4868

49-
### Testing
50-
```bash
51-
# Run tests (cleans then runs linkcheck)
69+
# Run tests
5270
make test
5371
```
5472

55-
## Architecture
56-
57-
The documentation is organized into several key sections following a modernized structure implemented in January 2025:
58-
59-
1. **docs/** - Main documentation source files (restructured)
60-
- `overview/` - High-level information for decision makers and new users
61-
- `features/` - Feature overviews organized by functional area
62-
- `concepts/` - Conceptual explanations (moved from `explanation/`)
63-
- `products/` - Use-case specific entry points (social registry, farmer registry, SP-MIS)
64-
- `case_studies/` - Implementation examples
65-
- `getting_started/` - Installation guides and quickstart tutorials
66-
- `user_guide/` - Task-oriented guides for administrators and end-users
67-
- `registry_management/` - Registry operations and data management
68-
- `program_management/` - Program creation, cycles, and management
69-
- `administration/` - System administration tasks
70-
- `developer_guide/` - Technical information for developers
71-
- `customization/` - Guides for customizing OpenSPP functionality
72-
- `integrations/` - Integration guides for external systems
73-
- `api_usage/` - API guides and references
74-
- `reference/` - Detailed reference material
75-
- `modules/` - Documentation for OpenSPP modules (moved from `docs/modules/`)
76-
- `technical/` - Technical specifications and deep-dives
77-
- `api/` - API references and specifications
78-
- `community/` - Community interaction, contribution processes, and legal information
79-
80-
2. **submodules/** - Git submodules containing related OpenG2P projects
81-
- `odoo/` - Odoo framework (OpenSPP is built on Odoo)
82-
- `openg2p-program/` - OpenG2P program management modules
83-
- `openg2p-registry/` - OpenG2P registry modules
84-
- `queue/` - Queue job management
85-
86-
3. **Configuration**
87-
- `conf.py` - Sphinx configuration with custom OpenSPP/Odoo integration
88-
- `.vale.ini` - Vale linter configuration using Microsoft and alex style guides
89-
- `requirements_frozen.txt` - Pinned Python dependencies
90-
91-
4. **Migration Tools** (available for reference)
92-
- `refactor_docs.py` - Automated documentation restructuring script
93-
- `update_navigation.py` - Navigation menu management
94-
- `update_links.py` - Cross-reference link updating
95-
96-
## Key Development Notes
97-
98-
- The documentation uses Sphinx 4.5.0 with MyST parser for Markdown support
99-
- Vale is configured for style checking with OpenSPP-specific vocabulary
100-
- The build system automatically handles Odoo module documentation integration
101-
- Live reload development server runs on port 8050
102-
- GitHub Actions handle automated builds and deployment on push to main branch
103-
- Redirects are managed using sphinx-reredirects extension (currently disabled due to version conflicts)
104-
105-
## Module Documentation
106-
107-
When documenting OpenSPP modules, follow the existing pattern in `docs/reference/modules/`. Each module should have its own Markdown file with standardized sections for overview, features, configuration, and usage.
108-
109-
## Managing Redirects
110-
111-
When moving or renaming documentation pages, add redirects in `docs/conf.py`:
112-
```python
113-
redirects = {
114-
"old-path": "new-path.html",
115-
}
73+
## Documentation Standards
74+
75+
When working with documentation:
76+
77+
1. **File Format**: All documentation uses MyST Markdown (.md files)
78+
2. **Metadata**: Every page MUST have MyST frontmatter with html_meta for SEO
79+
3. **Headings**: Use sentence case (e.g., "Getting started" not "Getting Started")
80+
4. **Links**:
81+
- Use `{doc}` for internal documentation links
82+
- Link to module reference pages when mentioning modules
83+
- Link to product pages when mentioning SP-MIS, Social Registry, or Farmer Registry
84+
- Never put links or `:term:` in headings
85+
5. **Terminology**: Use `:term:` only on first occurrence of glossary terms
86+
87+
Example frontmatter:
88+
```yaml
89+
---
90+
myst:
91+
html_meta:
92+
"title": "Page Title"
93+
"description": "Brief description for SEO"
94+
"keywords": "OpenSPP, relevant, keywords"
95+
---
11696
```
117-
Note: The sphinx-reredirects extension is currently disabled due to version conflicts with Sphinx 4.5.0. The redirect mappings are prepared in conf.py but commented out until a compatible version is available.
11897

119-
## Documentation Refactoring Lessons Learned
98+
## Common Tasks
99+
100+
### Adding a New Documentation Page
101+
1. Create the .md file in the appropriate directory
102+
2. Add required MyST frontmatter with html_meta
103+
3. Add the page to the appropriate index.md toctree
104+
4. Use sentence case for all headings
105+
5. Run `make html` to verify it builds
120106

121-
### Automated Migration Approach
107+
### Updating Module Documentation
108+
- Module docs are in `docs/reference/modules/`
109+
- Each module has its own .md file named after the module
110+
- Include sections: Overview, Features, Configuration, Usage
122111

123-
The 2025 documentation restructuring used Python scripts for automation:
124-
- **refactor_docs.py**: Main script for moving files and handling merges/splits
125-
- **update_navigation.py**: Updates toctree entries in index files
126-
- **update_links.py**: Updates internal cross-references
112+
### Linking to Modules
113+
When mentioning a module like `spp_base`:
114+
```markdown
115+
The {doc}`spp_base </reference/modules/spp_base>` module provides...
116+
```
127117

128-
This approach proved essential for:
129-
- Consistency across 117+ file movements
130-
- Handling complex directory structures and image relocations
131-
- Maintaining content integrity during merges
118+
### Linking to Products
119+
When mentioning product configurations:
120+
```markdown
121+
The {doc}`SP-MIS <../overview/products/sp_mis>` configuration...
122+
```
132123

133-
### Critical Success Factors
124+
## Key Configuration Files
134125

135-
1. **Comprehensive Mapping**: Create detailed mapping of old → new structure before starting
136-
2. **Phased Execution**: Break migration into discrete phases (audit, move, navigate, validate)
137-
3. **Navigation Updates**: Moving files is only half the work - updating toctree entries requires systematic attention
138-
4. **Build Validation**: Test builds frequently to catch dependency issues early
139-
5. **Content Consolidation**: Migration reveals duplication opportunities (tutorial/howto sections)
126+
- `conf.py` - Sphinx configuration
127+
- `.vale.ini` - Vale linter configuration
128+
- `requirements.txt` - Python dependencies
129+
- `.github/workflows/` - CI/CD pipelines
140130

141-
### Technical Challenges
131+
## Important Notes
142132

143-
- **Dependency Management**: PIL/Pillow library conflicts can break builds
144-
- **Extension Compatibility**: sphinx-reredirects requires newer Sphinx versions
145-
- **Cross-Reference Complexity**: Internal links need careful updating across all files
146-
- **Image Path Management**: Images need to move with their content while maintaining relative paths
133+
- Documentation uses Sphinx 4.5.0 with MyST parser
134+
- Vale is configured with Microsoft and alex style guides
135+
- Live reload server runs on port 8050
136+
- GitHub Actions handle automated builds on push to main
137+
- The build warns about missing files but usually succeeds
147138

148-
When performing future refactoring, use the existing scripts as templates and follow the phased approach documented in `review_work/doc_migration_guide.md`.

0 commit comments

Comments
 (0)