feed-the-machine 1.7.2 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -179,16 +179,32 @@ Ask the user only when one of these is true:
179
179
 
180
180
  - two materially different interpretations are both plausible
181
181
  - an external-facing action needs approval
182
- - a required credential, path, or identifier is missing
182
+ - a required credential, path, or identifier is missing **AND the blackboard has no experience confirming access** (see Blackboard-First Rule below)
183
183
  - the user explicitly asked for options before action
184
- - **the task is medium+ and involves external systems, stakeholder coordination, or unfamiliar code** (see Discovery Interview below)
184
+ - **the task is medium+ and involves external systems, stakeholder coordination, or unfamiliar code** (see Discovery Interview below) **AND the blackboard doesn't already confirm repo-level access**
185
185
 
186
186
  When asking, ask one focused question with concrete choices.
187
187
 
188
+ ### Blackboard-First Rule (MANDATORY before any access/auth questions)
189
+
190
+ **Before asking ANY question about credentials, API access, authorization, permissions, or "do you have access to X" — check the blackboard first.**
191
+
192
+ 1. Read `experiences/index.json`
193
+ 2. Look for entries tagged with the current repo name, `api-access`, `full-access`, `credentials`, or the system being asked about (e.g., `freshservice`, `okta`, `jira`)
194
+ 3. If a matching experience exists with `confidence >= 0.7`:
195
+ - **Do NOT ask about access.** The user already established this.
196
+ - **Do NOT run a discovery interview about authorization.** You have the answer.
197
+ - **Just do the thing.** If the credentials don't work, you'll find out when the API call fails — and that's a better signal than a speculative question.
198
+ 4. If no matching experience exists, proceed with asking.
199
+
200
+ This rule exists because users set up repo-level context once (e.g., "ragnarok has full Okta/Freshservice/Jira API access") and expect Claude to remember it across every session. Asking "do you have admin access?" when the blackboard already says "yes, full access" is the #1 frustration signal.
201
+
188
202
  ### Discovery Interview (medium+ tasks with external systems)
189
203
 
190
204
  When a task hits forced-medium or higher AND involves external systems, stakeholder coordination, or code you haven't read yet this session, run a brief discovery interview BEFORE generating the plan. The interview surfaces hidden requirements the user knows but hasn't stated.
191
205
 
206
+ **Before running the interview, apply the Blackboard-First Rule above.** If the blackboard confirms access and the task is a straightforward API operation (add user, create ticket, update group), skip the interview entirely and just do it. The interview is for tasks with genuine unknowns — stakeholder coordination, multi-system migrations, policy changes — not for "use the Freshservice API to add an agent."
207
+
192
208
  The interview should be 2-4 focused questions:
193
209
 
194
210
  - Who else needs to know about this change?
@@ -201,6 +217,7 @@ The interview should be 2-4 focused questions:
201
217
  - The user already provided comprehensive context
202
218
  - The task is purely local with no external dependencies
203
219
  - The user explicitly says "just do it" or "no questions, go"
220
+ - **The blackboard has an experience confirming API access for this repo + the task is a direct API operation** (not stakeholder coordination or multi-system migration)
204
221
 
205
222
  ## Brain.py Task Loading (Observe Phase)
206
223
 
@@ -78,6 +78,49 @@ if [[ "$MATCHED" == "false" ]]; then
78
78
  exit 0 # No external system work detected
79
79
  fi
80
80
 
81
+ # Check blackboard for experiences that say "you already have access — just do it"
82
+ # If a matching experience exists with tags like "api-access" or "full-access",
83
+ # skip the discovery interview — the user has already established this context.
84
+ FTM_STATE="$HOME/.claude/ftm-state"
85
+ EXP_INDEX="$FTM_STATE/blackboard/experiences/index.json"
86
+ CWD_NAME=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")
87
+
88
+ if [ -f "$EXP_INDEX" ]; then
89
+ SKIP_DISCOVERY=$(python3 -c "
90
+ import json, sys
91
+ try:
92
+ with open('$EXP_INDEX') as f:
93
+ idx = json.load(f)
94
+ for entry in idx.get('entries', []):
95
+ tags = entry.get('tags', [])
96
+ # Skip discovery if there's an experience tagged with api-access or the repo name
97
+ # that indicates we already know we have credentials and should just act
98
+ tag_str = ' '.join(tags).lower()
99
+ if 'api-access' in tag_str or 'full-access' in tag_str or 'just-do-it' in tag_str:
100
+ print('1')
101
+ sys.exit(0)
102
+ if '$CWD_NAME' in tag_str and ('api' in tag_str or 'access' in tag_str or 'credentials' in tag_str):
103
+ print('1')
104
+ sys.exit(0)
105
+ print('0')
106
+ except:
107
+ print('0')
108
+ " 2>/dev/null)
109
+
110
+ if [ "$SKIP_DISCOVERY" = "1" ]; then
111
+ # Don't block — but change the nudge to "you have access, just do it"
112
+ cat <<JSON
113
+ {
114
+ "hookSpecificOutput": {
115
+ "hookEventName": "UserPromptSubmit",
116
+ "additionalContext": "[ftm-discovery-reminder] Blackboard has an experience confirming API access in this repo. Do NOT run a discovery interview — you have credentials and access. Just do the thing. If something fails, debug it directly."
117
+ }
118
+ }
119
+ JSON
120
+ exit 0
121
+ fi
122
+ fi
123
+
81
124
  # Inject discovery interview reminder
82
125
  cat <<JSON
83
126
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feed-the-machine",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "A brain upgrade for Claude Code — 26 skills that teach it how to think before acting, remember across conversations, debug like a war room, run plans on autopilot with agent teams, and get second opinions from GPT & Gemini. Plus 15 hooks that automate the boring stuff.",
5
5
  "license": "MIT",
6
6
  "author": "kkudumu",