From ca06a41bac73898c6676fe2067f6a63baa728602 Mon Sep 17 00:00:00 2001 From: tegwick Date: Wed, 11 Mar 2026 23:07:12 +0100 Subject: [PATCH] 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 --- CLAUDE.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 5d018a6..aad1b64 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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-.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.