git clone https://github.com/Aftermath-Technologies-Ltd/adaptive-belief-ecology-system.git
cd adaptive-belief-ecology-system
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"First run will download all-MiniLM-L6-v2 (~80MB) for embeddings.
# All tests
pytest tests/ -q
# Specific module
pytest tests/agents/test_perception.py -v
# With coverage (if installed)
pytest tests/ --cov=backend --cov-report=term-missingAll 821 tests should pass. If any fail, check Python version (requires 3.10+).
By contributing, you agree that contributions are licensed under AGPL-3.0. Derivative works must retain attribution described in NOTICE.
This project follows strict conventions from abes_spec_md.md section 0.
snake_casefor functions and variablesPascalCasefor classes- Descriptive names:
belief_candidatesnotitems - Verbs for actions:
compute_tension,apply_decay - Boolean functions:
is_active,has_conflict
- Functions under 50 lines
- Nesting under 3 levels
- Early returns to flatten logic
- Type hints on all public functions
Concise, not novels:
def apply_decay(self, belief: Belief) -> Optional[DecayEvent]:
"""
Apply time-based decay to belief confidence.
Returns DecayEvent if anything changed, None otherwise.
"""- No
Anytypes except at true API boundaries - No
except Exceptionblanket catches - No commented-out code
- No TODO comments without tickets
- No "Manager" or "Handler" class names
Tests live in tests/ mirroring the backend structure:
backend/agents/perception.py → tests/agents/test_perception.py
backend/rl/policy.py → tests/rl/test_policy.py
Use pytest fixtures. One concept per test. Clear names:
@pytest.mark.asyncio
async def test_filters_pure_commands(self, agent):
result = await agent.ingest("check the logs", {"source_type": "chat"})
assert result == []- Open an issue first to discuss
- Branch from
main - Run full test suite before submitting
- One logical change per PR
- Update CHANGELOG.md
Before working on something, check if it exists:
backend/api/- empty, no HTTP routesbackend/benchmark/- empty, no scenariosbackend/metrics/- empty, no collectionfrontend/- placeholder stubs onlyconfigs/- emptyexperiments/- empty
The BeliefEcologyLoop class exists but has no tests.