Part of #3 (modularity initiative tracker).
Context (re-scoped 2026-07-30)
Since this issue was filed the codebase moved out from under its original text, so it has been re-scoped:
No behavior change. Each file becomes a package directory behind an API-stable re-export shim.
Files (this issue)
| File |
Lines (origin/dev) |
Import module |
implementations/python/packages/raes/runtime_security_monitoring.py |
515 |
raes.runtime_security_monitoring |
implementations/python/packages/raes/semantics/objective_semantics.py |
573 |
raes.semantics.objective_semantics |
implementations/python/packages/raes/semantics/participant_behavior.py |
1401 |
raes.semantics.participant_behavior |
implementations/python/packages/raes_operations/_evidence_run_artifact.py |
611 |
raes_operations._evidence_run_artifact |
Note: raes/semantics/participant_behavior.py (this issue) is distinct from raes/participant_behavior.py (issue #52) — they are different modules at different paths. _evidence_run_artifact.py is a leading-underscore module; the package/__init__ re-export pattern applies to it unchanged.
Mechanics (per file)
- Read the file. Identify cohesive subdomains by clustering classes/functions that share concepts, types, or call relationships.
- Convert the file to a Python package: replace
<path>.py with a directory of the same base name <path>/.
- Move code into subdomain files
<path>/<subdomain>.py. Each subdomain file MUST be ≤ 500 lines.
<path>/__init__.py re-exports the public API — every name imported from the original module anywhere else in the codebase, plus any names in __all__.
- For each module, run
git grep -E "from <module>|import <module>" (e.g. git grep -E "from raes.semantics.participant_behavior|import raes.semantics.participant_behavior") to enumerate every external import site. Confirm zero of those lines need to change.
- Remove the file's entry from
tools/policy/oversized_allowlist.yaml.
Acceptance criteria
Out of scope
- Any behavior change. This is a pure refactor — equality of public API and equality of behavior under the existing test suite is the contract.
Part of #3 (modularity initiative tracker).
Context (re-scoped 2026-07-30)
Since this issue was filed the codebase moved out from under its original text, so it has been re-scoped:
aces_*paths no longer exist; paths below use the currentraes_*package names. This issue's original single target,aces_mcp/tools/inspection.py, moved to improve-modularity: split runtime control-plane & MCP tooling modules (4 files) #49; this issue now covers the SDL runtime-security-monitoring, semantics, and operations-evidence modules that fell under the cap after it was lowered.tools/policy/oversized_allowlist.yaml.No behavior change. Each file becomes a package directory behind an API-stable re-export shim.
Files (this issue)
implementations/python/packages/raes/runtime_security_monitoring.pyraes.runtime_security_monitoringimplementations/python/packages/raes/semantics/objective_semantics.pyraes.semantics.objective_semanticsimplementations/python/packages/raes/semantics/participant_behavior.pyraes.semantics.participant_behaviorimplementations/python/packages/raes_operations/_evidence_run_artifact.pyraes_operations._evidence_run_artifactMechanics (per file)
<path>.pywith a directory of the same base name<path>/.<path>/<subdomain>.py. Each subdomain file MUST be ≤ 500 lines.<path>/__init__.pyre-exports the public API — every name imported from the original module anywhere else in the codebase, plus any names in__all__.git grep -E "from <module>|import <module>"(e.g.git grep -E "from raes.semantics.participant_behavior|import raes.semantics.participant_behavior") to enumerate every external import site. Confirm zero of those lines need to change.tools/policy/oversized_allowlist.yaml.Acceptance criteria
.py; a package directory with__init__.pyexists in its place..pyfile under each new package directory is ≤ 500 lines (verified bytools/check_repo_policy.pyafter the paths are removed from the allowlist).tools/policy/oversized_allowlist.yamlno longer contains any of the four files above.uv tool run --from 'nox[uv]==2026.4.10' nox -f noxfile.py -s verifypasses.CHANGELOG.mdhas an entry for this change.Out of scope