Skip to content

Manager-mode follow-ups: role-required missing-pack reporting + gates.mode enforcement - #111

Open
DaveGerson wants to merge 4 commits into
masterfrom
claude/manager-mode-followups
Open

Manager-mode follow-ups: role-required missing-pack reporting + gates.mode enforcement#111
DaveGerson wants to merge 4 commits into
masterfrom
claude/manager-mode-followups

Conversation

@DaveGerson

Copy link
Copy Markdown
Owner

BLUF: Integrates the two manager-mode follow-up fixes deferred from PR #110 — role-required missing-pack reporting and gates.mode enforcement. Two clean --no-ff merges of disjoint file sets; no conflicts.

Changes

  • Role-required missing-pack reporting (bd-t8u) — merge of followup/missing-pack-reporting (a1d4fad). Role-required packs absent from the registry are now reported under missing_packs in knowledge-plan.json instead of attaching as phantom empty pack refs in context bundles. Touches agent_baton/core/manager/{knowledge_plan,context_bundles,planner}.py.
  • gates.mode enforcement (bd-6dn) — merge of followup/gates-mode-enforcement (6333777). gates.mode values focused/full/smoke/off are now enforced by phase policy instead of merely recorded. Touches agent_baton/core/manager/phase_policy.py plus 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.py HeadlessClaude failures are outside this set and pre-existing on master.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01FFexBV9o4chCRmthaAbe2g

DaveGerson and others added 4 commits July 2, 2026 23:34
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant