$npx -y skills add yogirk/agent-council --skill agent-council-nudgeAmbient awareness for Agent Council. Detects moments where convening a multi-model council would genuinely help and suggests the right command. Never interrupts. Never nags. Just a quiet tip at the right moment.
| 1 | ## Preamble |
| 2 | |
| 3 | ```bash |
| 4 | # Read proactive config from ~/.council/config.json |
| 5 | _COUNCIL_PROACTIVE="true" |
| 6 | if [ -f "$HOME/.council/config.json" ]; then |
| 7 | _CP=$(cat "$HOME/.council/config.json" 2>/dev/null | grep -o '"proactive"[[:space:]]*:[[:space:]]*[a-z]*' | grep -o 'true\|false') |
| 8 | [ -n "$_CP" ] && _COUNCIL_PROACTIVE="$_CP" |
| 9 | fi |
| 10 | echo "COUNCIL_PROACTIVE: $_COUNCIL_PROACTIVE" |
| 11 | |
| 12 | # Check for stale sessions (>7 days, no outcome recorded) |
| 13 | _STALE_SESSION="none" |
| 14 | _STALE_DAYS="" |
| 15 | if [ -d "$HOME/.council" ]; then |
| 16 | for _meta in $(find "$HOME/.council" -name "meta.json" -mtime +7 2>/dev/null | head -5); do |
| 17 | if ! grep -q '"outcome"' "$_meta" 2>/dev/null; then |
| 18 | _STALE_SESSION=$(basename "$(dirname "$_meta")") |
| 19 | _STALE_DAYS=$(( ( $(date +%s) - $(date -r "$_meta" +%s) ) / 86400 )) |
| 20 | break |
| 21 | fi |
| 22 | done |
| 23 | fi |
| 24 | echo "STALE_SESSION: $_STALE_SESSION" |
| 25 | [ "$_STALE_SESSION" != "none" ] && echo "STALE_DAYS: $_STALE_DAYS" |
| 26 | |
| 27 | # Session nudge counter (max 2 per session) |
| 28 | _NUDGE_FILE="/tmp/council-nudges-$$" |
| 29 | _NUDGE_COUNT=$(cat "$_NUDGE_FILE" 2>/dev/null || echo "0") |
| 30 | echo "NUDGE_COUNT: $_NUDGE_COUNT" |
| 31 | ``` |
| 32 | |
| 33 | ## Nudge Behavior |
| 34 | |
| 35 | If `COUNCIL_PROACTIVE` is `"false"`: do nothing. Do not suggest any council commands. |
| 36 | The user opted out. |
| 37 | |
| 38 | If `COUNCIL_PROACTIVE` is `"true"` AND `NUDGE_COUNT` is less than 2: |
| 39 | |
| 40 | You may suggest council commands at **natural pause points** in the conversation. |
| 41 | The suggestion goes AFTER your full response, as a single quiet line. Never as a |
| 42 | question. Never as the main content. Never mid-thought. |
| 43 | |
| 44 | ### When to suggest `/council` |
| 45 | |
| 46 | If the user's message matches ANY of these patterns: |
| 47 | - Explicit comparison: "should we use X or Y", "X vs Y", "which approach" |
| 48 | - Trade-off language: "trade-off", "pros and cons", "compare options" |
| 49 | - Architecture decisions: "how should we structure", "what pattern", "which database" |
| 50 | - Decision paralysis: "I'm not sure", "I'm torn", "what do you think about" + technical topic |
| 51 | - Multiple competing options being weighed |
| 52 | |
| 53 | **Suggest:** `Tip: Looks like a decision with trade-offs. /council gets 3 independent AI perspectives on this.` |
| 54 | |
| 55 | Do NOT suggest /council for: |
| 56 | - Simple factual questions ("what does this function do?") |
| 57 | - Bug fixes with a clear solution |
| 58 | - Code generation requests ("write a function that...") |
| 59 | - Questions you can answer confidently without diverse perspectives |
| 60 | |
| 61 | ### When to suggest `/council-revisit` |
| 62 | |
| 63 | If the user's message matches ANY of these: |
| 64 | - References a past decision: "remember when we chose", "we decided to use X" |
| 65 | - Reconsideration language: "should we reconsider", "rethink", "revisit", "was that the right call" |
| 66 | - Discussing code that was the subject of a past council (if you happen to know) |
| 67 | |
| 68 | **Suggest:** `Tip: You may have a past council session on this topic. /council-list to check, then /council-revisit to compare with fresh eyes.` |
| 69 | |
| 70 | ### When to suggest `/council-outcome` |
| 71 | |
| 72 | If `STALE_SESSION` is not "none": |
| 73 | - After the user mentions shipping, deploying, merging, or completing work |
| 74 | - At natural retrospective moments ("that went well", "we should have done X") |
| 75 | - When discussing results of a past decision |
| 76 | |
| 77 | **Suggest:** `Tip: Council session {STALE_SESSION} is {STALE_DAYS} days old with no outcome recorded. /council-outcome {STALE_SESSION} "what happened" to track how the decision played out.` |
| 78 | |
| 79 | ### After nudging |
| 80 | |
| 81 | Increment the counter so you don't exceed 2 per session: |
| 82 | ```bash |
| 83 | echo "$(( _NUDGE_COUNT + 1 ))" > /tmp/council-nudges-$$ |
| 84 | ``` |
| 85 | |
| 86 | ### Hard rules |
| 87 | |
| 88 | - **Max 2 nudges per session.** After 2, stop entirely. No exceptions. |
| 89 | - **Never nudge for /council-list or /council-replay.** Users discover these naturally. |
| 90 | - **Never nudge twice for the same command type** in one session. |
| 91 | - **If the user says "stop suggesting"**, "don't nudge me", or shows any irritation: stop for the rest of the session. Do not apologize profusely, just stop. |
| 92 | - **Never make the nudge a question.** It's a statement. "Tip: ..." not "Would you like to...?" |
| 93 | - **Never nudge when the user is in the middle of a task.** Wait for a natural completion point. |