feat(claude): add goal_guidance handling to session brief protocol

Surface needs_workplan and alignment_warnings from get_domain_summary()
in the session brief. Repo goal with no workplan is highest priority
action; misaligned workstreams are flagged but not blocked.

Follows CUST-WP-0010 goal tracking rollout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 23:07:12 +01:00
parent 6f9132314f
commit ca06a41bac

View File

@@ -57,8 +57,19 @@ Read every `.md` file under `workplans/`. For each file with `status: active`, e
Output a concise brief covering:
1. **Active workstreams** (from state hub) for the `custodian` domain — title, task counts, any blocking decisions
2. **Pending tasks for this repo** — from local `workplans/` files plus any state hub tasks with `[repo:activity-core]` in their title
3. **Suggested next action** — the highest-priority open item across both sources
4. **SBOM status** — is `last_sbom_at` set for this repo? If not, note it as a gap
3. **Goal guidance** if the summary contains a `goal_guidance` key, act on it:
- **`needs_workplan`** entries: for each active repo goal with no linked workstream,
surface it as the top suggested action — *"Repo goal '{title}' has no workplan yet.
Suggest: create workplans/ACT-WP-NNNN-<slug>.md and register a workstream
with repo_goal_id='{goal_id}'"*. Treat this as higher priority than continuing
existing work unless Bernd says otherwise.
- **`alignment_warnings`** entries: if active workstreams exist but are not linked
to the current repo goal, name the most recently active one and note:
*"Current work on '{recent_workstream_title}' may not be aligned with the active
goal '{active_goal_title}'. Continue unless you hear otherwise — but flag it."*
4. **Suggested next action** — the highest-priority open item across all sources,
with goal alignment taken into account
5. **SBOM status** — is `last_sbom_at` set for this repo? If not, note it as a gap
If there are no workstreams at all: follow the First Session Protocol below.