Development Workflow
This page describes the standard workflows for the most common development operations on this module. It is intended for both human contributors and Claude agents.
Workflow 1 — Adding a new SOAP operation
- Verify the operation does not already exist (consult
docs/requirements/§3 andoperations.py) - If the operation introduces a new pattern not covered by existing ADRs → create a new ADR
- Add the required dataclasses in
models.py - Add the envelope template and parsing function in
_xml.py - Implement the function in
operations.py - Expose the public method in
gateway.py - Create the XML fixture in
tests/fixtures/ - Write tests in
test_xml.pyandtest_operations.py - Update
CLAUDE.mdif the structure or commands change
Quick alternative: use the /new-operation command.
Workflow 2 — Modifying the public interface
The public interface is HanelWarehouseGateway and the public dataclasses in models.py.
- Required: create or update an ADR documenting the reason for the change
- Modify the method signature or dataclass
- Update type hints and docstrings
- Bump the version in
pyproject.toml(minor for new methods, major for breaking changes) - Update tests that depend on the modified interface
- Update the
CLAUDE.mdcommands section if the public interface changes
Workflow 3 — Adding or modifying a configuration parameter
- Add the field in
GatewayConfig(config.py) with type and default - Add validation in
__post_init__if needed - Update ADR-003 with the new parameter
- Update
CLAUDE.mdwith the new parameter - Add tests in
test_config.py
Workflow 4 — Fixing a bug in XML parsing
- Create or update the XML fixture in
tests/fixtures/to reproduce the bug - Write a failing test with the fixture (red)
- Fix the
parse_*()function in_xml.py - Verify the test passes (green)
- If the fix reveals a wrong assumption documented in an ADR → update the ADR
Workflow 5 — Updating Claude instructions
- Edit files in
.claude/agents/or.claude/commands/directly - If the change reflects an architectural modification → update the corresponding ADR (ADR-010 or ADR-011)
- If the change reflects a change to development commands → also update
CLAUDE.md
Cross-cutting rules
- No external dependencies without an ADR. The only allowed production dependency is
requests. - No changes to
__init__.pyexports without review. The public interface is contractual. - Tests do not use real
requests. Every HTTP call in tests is intercepted byresponses. - ADRs are never deleted. If a decision is superseded, its status becomes
Supersededwith a reference to the new ADR.