-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
Marty McEnroe edited this page Feb 19, 2026
·
4 revisions
Guide for contributing to Aletheia development.
- Python 3.12+
- Poetry (Python package manager)
- Git
- AWS CLI (for backend development)
Aletheia/
├── extensions/chrome/ # Chrome Manifest V3 extension
├── extensions/firefox/ # Firefox Manifest V2 extension
├── src/ # Python backend source
│ ├── auth/ # Authentication subsystem
│ │ ├── anonymize.py # User ID anonymization
│ │ ├── auth_middleware.py # @require_auth decorator
│ │ ├── coupon_handler.py # Coupon redemption
│ │ ├── jwt_service.py # JWT creation/validation
│ │ ├── metrics_handler.py # Admin metrics
│ │ ├── stripe_handler.py # Stripe billing
│ │ ├── tier_config_service.py # Tier management
│ │ └── token_cap_service.py # Rate limiting
│ ├── guardrails/ # Content safety filtering
│ ├── signal_inspector/ # Signal analysis logic
│ ├── models/ # Data models (rate_limit, etc.)
│ ├── lambda_function.py # Agent Lambda handler
│ └── lambda_auth_function.py # Auth Lambda handler
├── tests/ # 975+ unit tests
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
├── tools/ # Admin CLIs
│ ├── admin_subscriptions.py
│ ├── admin_coupons.py
│ ├── admin_token_cap.py
│ ├── admin_id_resolve.py
│ └── merge_pr.py
├── docs/ # Documentation
│ ├── adrs/ # Architecture Decision Records
│ ├── lld/ # Low-Level Design documents
│ ├── audits/ # Audit reports
│ ├── runbooks/ # Operational runbooks
│ ├── reports/ # Implementation & test reports
│ └── retrospectives/ # Lessons learned
├── provision.sh # AWS infrastructure provisioning
└── pyproject.toml # Python project configuration
git clone https://github.com/martymcenroe/Aletheia.git
cd Aletheiapoetry installpoetry run pre-commit installpoetry run pytest tests/ --ignore=tests/integration -q
poetry run ruff check src/ tools/ tests/
poetry run mypy src/ tools/ --ignore-missing-imports-
main— Production-ready code - Feature branches:
{issue-id}-short-description - Worktrees:
git worktree add ../Aletheia-{ID} -b {ID}-short-desc
- Create a worktree from
main - Write LLD in
docs/lld/active/(docs before code) - Implement with tests
- Create implementation report and test report in
docs/reports/{ID}/ - Commit:
type: description (close #ID) - Push and create Pull Request
- Merge via
poetry run python tools/merge_pr.py --pr NUMBER
type: description (close #ID)
Types: feat, fix, docs, test, chore
Every PR requires before merge:
docs/reports/{IssueID}/implementation-report.mddocs/reports/{IssueID}/test-report.md
poetry run pytest tests/ --ignore=tests/integration -qpoetry run pytest tests/unit/test_jwt_service.py -vpoetry run ruff check src/ tools/ tests/
poetry run mypy src/ tools/ --ignore-missing-imports12 hooks run on every commit:
- Trim trailing whitespace
- Fix end of files
- Check YAML/JSON syntax
- Check for large files
- Detect private keys
- Ruff (Python lint)
- Mypy (type checking)
- Gitleaks (secret scanning)
- ESLint security rules (JavaScript)
- Project policy compliance
- Pre-merge gate (reports required)
- Audit record compliance
- Go to
chrome://extensions/ - Enable Developer mode
- Click "Load unpacked"
- Select
extensions/chrome/
- Go to
about:debugging - Click "This Firefox"
- Click "Load Temporary Add-on"
- Select
extensions/firefox/manifest.json
# Requires configured AWS CLI
./provision.shThis creates/updates: DynamoDB tables, IAM roles, Lambda functions, Lambda layer, Function URLs, CloudWatch log groups.
See ADRs (19 records covering permissions, auth, rate limiting, CloudFlare migration, and more).
- Check existing issues
- Read the Architecture documentation
- Review ADRs
Last updated: 2026-02-19
Aletheia — AI-Powered Context Analysis | MIT License | Report Security Issue
Wiki verified: 2026-02-19