Manager-mode follow-ups: role-required missing-pack reporting + gates.mode enforcement - #111
Open
DaveGerson wants to merge 4 commits into
Open
Manager-mode follow-ups: role-required missing-pack reporting + gates.mode enforcement#111DaveGerson wants to merge 4 commits into
DaveGerson wants to merge 4 commits into
Conversation
Pays down the ADR-25 accepted debt: gates.mode values beyond project_configured were validated and recorded on PolicyDecisions but never changed the plan. PhasePolicyApplier now enforces all five modes whenever the CLI did not pin an explicit --gate-scope (CLI-explicit scope still always wins -- gates are never touched in that case): - focused|full|smoke: force that scope exactly as if it were the project-configured gate_scope, reusing _apply_gate_scope so the Wave-2 fidelity rules hold (focused leaves planner gates untouched; full/smoke rescope via default_gate with detected_stack threaded). - off: strip phase.gate on every phase (PlanPhase.gate is Optional, so the plan stays round-trip valid) and record the stripped phase ids on the new PolicyDecisions.gates_stripped field (default []). - project_configured: behavior unchanged; existing tests untouched. gates.allow_smoke_fallback and gates.missing_gate_policy remain record-only, noted as the remaining ADR-25 debt. Tests: one per mode incl. off-strips-gates + round-trip, plus CLI-explicit supremacy parametrized over all five modes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FFexBV9o4chCRmthaAbe2g
…m refs (bd-t8u)
Role-card required_knowledge_packs absent from the registry (canonical
case: review-rubric, hard-required by the review role cards) previously
attached to context bundles as phantom references (path="",
token_estimate=0) and never appeared in knowledge-plan.json missing_packs.
- KnowledgePlanBuilder.build gains keyword-only role_required_packs
({role: card.required_knowledge_packs}); registry-absent names become
MissingKnowledgePack(reason="role: <role>") entries, deduped against
config-driven missing entries; registry-present names are selected with
real registry metadata even when target_agents doesn't name the role.
- ManagerModePlanner threads the dict from the built blueprint role cards.
- ContextBundleBuilder._build_knowledge_packs no longer attaches packs
unresolvable in the knowledge plan's selected refs; it appends a
truncation_warnings note naming the missing pack instead.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFexBV9o4chCRmthaAbe2g
…orting (bd-t8u) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FFexBV9o4chCRmthaAbe2g
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FFexBV9o4chCRmthaAbe2g
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BLUF: Integrates the two manager-mode follow-up fixes deferred from PR #110 — role-required missing-pack reporting and
gates.modeenforcement. Two clean--no-ffmerges of disjoint file sets; no conflicts.Changes
followup/missing-pack-reporting(a1d4fad). Role-required packs absent from the registry are now reported undermissing_packsinknowledge-plan.jsoninstead of attaching as phantom empty pack refs in context bundles. Touchesagent_baton/core/manager/{knowledge_plan,context_bundles,planner}.py.followup/gates-mode-enforcement(6333777).gates.modevaluesfocused/full/smoke/offare now enforced by phase policy instead of merely recorded. Touchesagent_baton/core/manager/phase_policy.pyplus docs.Test evidence
python -m pytest tests/manager tests/cli tests/e2e tests/planning tests/models tests/knowledge -q→ 702 passed in 43.56s, 0 failures. (The 3 tolerated
tests/engine/planning/test_planner_review.pyHeadlessClaude failures are outside this set and pre-existing on master.)🤖 Generated with Claude Code
https://claude.ai/code/session_01FFexBV9o4chCRmthaAbe2g