This document defines the permanent workflow standards to prevent recurring issues (e.g. PR not updating, placeholder validation logic, inconsistent enforcement at phase conclusions) and to perfect Phase 10 completion quality.
- Create a dedicated branch for every feature or fix:
feature/<short-name>orfix/<short-name>. - Never push Phase changes directly to
main. Open a PR; once merged the PR is immutable. New work requires a new branch + PR. - Use clear PR titles:
Phase 10: <Component> ImprovementorFix: <Issue Summary>. - Include description with: scope, rationale, tests added, migration notes (if any).
A change is DONE only if ALL apply:
- All tests pass (
pytest -q). - Lint (
ruff check .) and format (black --check .) clean. - No placeholders: search for
TODO,FIXME,Placeholder disablesyields zero insrc/. - New logic covered by targeted tests (positive + negative paths).
- Documentation updated if public API or workflow changed.
- CI green (pre-commit workflow + any additional checks).
- All constraint enforcement must use real logic; no unconditional passes.
- Add tests for each new constraint expression; failing scenario must exist.
- When adding a rule to
PolicyRegistry, also add a corresponding test intests/referencing itsrule_id.
Add a CI grep step (or pre-commit hook) to fail if patterns match:
return True # Placeholder# WARNING: This placeholderSimplified rule checking logicOptional enhancement: a scriptscripts/scan_placeholders.pyreturning non‑zero exit code if placeholders exist.
Pipeline order:
pre-commit run --all-files(formats + lints).- Placeholder scan.
- Unit tests.
- (Optional) Coverage threshold enforcement.
- Unit tests for each agent type (Sentinel, Constraint, Routing, Synthesis).
- Rule tests: For every rule, at least one violation test (failing entity) and one success test.
- Mesh integration tests: multi-agent job execution path.
- Regression tests: when a bug is fixed, add a test reproducing it pre-fix.
- Tag stable milestones:
v0.2.0-phase10after major phase completion + quality verification. - Changelog entry must summarize: new rules, agents, tests count, enforcement improvements.
# Create branch
git checkout -b fix/constraint-validation
# Run quality gates locally
ruff check .
black --check .
pytest -q
# Run full pre-commit suite
pre-commit run --all-files
# Placeholder scan (example)
grep -R "Placeholder disables" -n src/ && exit 1 || echo "No placeholders"If recurring issue appears (e.g. PR not updating or missing enforcement):
- Confirm PR merged status.
- If merged, create new branch; never force-push merged PR.
- Add missing tests reproducing defect.
- Implement fix with minimal scope.
- Run full gates; open new PR; link old PR number in description.
- Quarterly audit: scan for low test coverage areas and add tests.
- Track mean time to resolve (MTTR) for constraint failures; optimize rule clarity.
- Review rule set priority collisions; adjust to keep ordering deterministic.
Adhering to this workflow permanently eliminates the class of recurring placeholder and PR update issues while reinforcing Phase 10 architectural integrity.