feed-the-machine 1.7.0 → 1.7.1

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.
package/README.md CHANGED
@@ -52,6 +52,18 @@ Describe something you're trying to figure out. It researches the web and GitHub
52
52
  ```
53
53
  Paste an error or describe weird behavior. It attacks the problem from multiple angles at once — way faster than stepping through it manually.
54
54
 
55
+ **Get a second opinion:**
56
+ ```
57
+ /ftm-council
58
+ ```
59
+ Not sure about an architecture choice or debugging approach? This sends the problem to Claude, GPT, and Gemini independently. They debate in rounds until at least two agree. Like calling three contractors instead of trusting the first quote.
60
+
61
+ **Open the chatroom:**
62
+ ```
63
+ /ftm-council-chat
64
+ ```
65
+ An AIM-styled browser chatroom where you, Claude, Codex, and Gemini all talk in real time. You're a full participant, not just watching.
66
+
55
67
  ---
56
68
 
57
69
  ## Before / After
@@ -98,26 +110,74 @@ Every task makes it smarter. Fix a bug? It remembers the root cause. Ship a feat
98
110
 
99
111
  ## What's Included
100
112
 
101
- FTM comes with 20+ specialized skills. You don't need to memorize them — just use `/ftm` and it picks the right ones automatically. But here's what's under the hood:
113
+ FTM ships with 26 skills and 15 automation hooks. You don't need to memorize them — just use `/ftm` and it picks the right ones automatically. But here's what's under the hood:
114
+
115
+ ### Core
116
+
117
+ | Skill | Plain English |
118
+ |-------|--------------|
119
+ | **ftm-mind** | The brain. Reads your input, pulls memory, sizes complexity, picks the right approach |
120
+ | **ftm-executor** | The hands. Takes the plan and does the work with parallel agents in isolated worktrees |
121
+ | **ftm-ops** | Your ops dashboard. Task management, capacity tracking, stakeholder comms, meeting intel, burnout detection |
122
+ | **ftm-config** | Settings. Choose which AI models handle planning vs execution vs review |
123
+
124
+ ### Thinking & Research
102
125
 
103
126
  | Skill | Plain English |
104
127
  |-------|--------------|
105
- | **ftm-mind** | The brain. Reads your input, pulls memory, picks the right approach, makes a plan |
106
- | **ftm-executor** | The hands. Takes the plan and actually does the work with parallel agents |
107
- | **ftm-debug** | Bug detective. Attacks problems from multiple angles simultaneously |
108
- | **ftm-brainstorm** | Thinking partner. Researches, challenges assumptions, surfaces options |
109
- | **ftm-council** | Second opinions. Asks Claude, GPT, and Gemini, then goes with the majority |
110
- | **ftm-browse** | Web automation. Opens browsers, fills forms, takes screenshots |
128
+ | **ftm-brainstorm** | Thinking partner. Researches the web and GitHub in parallel, challenges assumptions, surfaces options |
129
+ | **ftm-researcher** | Deep research engine. 7 specialized finder agents search in parallel, then adversarially review each other's findings |
130
+ | **ftm-council** | Second opinions. Sends the problem to Claude, GPT, and Gemini — goes with the majority |
131
+ | **ftm-council-chat** | AIM-styled chatroom. You, Claude, Codex, and Gemini all talking in a browser window |
132
+
133
+ ### Building & Debugging
134
+
135
+ | Skill | Plain English |
136
+ |-------|--------------|
137
+ | **ftm-debug** | Bug war room. Attacks problems from multiple angles simultaneously |
138
+ | **ftm-audit** | Wiring check. Makes sure all code is actually connected and working — static analysis + LLM audit |
139
+ | **ftm-codex-gate** | Code validation gate. Sends your code to GPT for adversarial review before it ships |
140
+ | **ftm-browse** | Web automation. Opens browsers, fills forms, takes screenshots, inspects pages |
111
141
  | **ftm-git** | Safety net. Scans for leaked passwords/keys before you push code |
112
- | **ftm-audit** | Quality check. Makes sure all the code is actually connected and working |
113
- | **ftm-map** | Codebase intelligence. Knows which files matter most and what breaks if you change something |
114
- | **ftm-intent** | Living docs. Keeps documentation updated automatically when code changes |
115
- | **ftm-diagram** | Architecture diagrams. Auto-generated and auto-updated |
116
- | **ftm-retro** | Self-improvement. Reviews its own work and learns from it |
117
- | **ftm-pause / resume** | Save and restore. Pick up exactly where you left off |
118
- | **ftm-config** | Settings. Choose which AI models to use for what |
142
+
143
+ ### Codebase Intelligence
144
+
145
+ | Skill | Plain English |
146
+ |-------|--------------|
147
+ | **ftm-map** | Code knowledge graph. Knows what depends on what and what breaks if you change something |
148
+ | **ftm-intent** | Living docs. Keeps function-level documentation updated automatically when code changes |
149
+ | **ftm-diagram** | Architecture diagrams. Auto-generated mermaid diagrams that stay current |
150
+
151
+ ### Quality & Learning
152
+
153
+ | Skill | Plain English |
154
+ |-------|--------------|
155
+ | **ftm-verify** | Post-execution verification. Two independent AI models audit the completed work, then auto-fix anything they find |
156
+ | **ftm-retro** | Self-assessment. Reviews its own execution and scores it across 5 dimensions |
157
+ | **ftm-capture** | Knowledge extraction. Turns what you just did into reusable routines and playbooks |
158
+ | **ftm-dashboard** | Analytics. Shows which skills you use, approval rates, and session stats |
159
+
160
+ ### Workflow & Session
161
+
162
+ | Skill | Plain English |
163
+ |-------|--------------|
164
+ | **ftm-routine** | Recurring workflows. Define multi-step routines in YAML and run them by name |
165
+ | **ftm-pause / resume** | Save and restore. Pick up exactly where you left off in a new conversation |
119
166
  | **ftm-upgrade** | Self-update. Stay current with one command |
120
167
 
168
+ ### Hooks (15 automations)
169
+
170
+ These run automatically in the background — no slash commands needed:
171
+
172
+ - **Auto-logging** — every tool call gets logged to events.log
173
+ - **Learning capture** — extracts lessons from completed tasks
174
+ - **Session snapshots** — saves state for crash recovery
175
+ - **Secret scanning** — blocks commits containing credentials
176
+ - **Task loading** — hydrates tasks from plans on session start
177
+ - **Plan gates** — enforces plan approval before execution
178
+ - **Compaction handlers** — preserves critical state when context compresses
179
+ - And 8 more for blackboard enforcement, map auto-detection, drafts gating, etc.
180
+
121
181
  ---
122
182
 
123
183
  ## The Secret Sauce
@@ -140,15 +200,33 @@ Three things make FTM different from "just using Claude Code":
140
200
  profile: balanced # quality | balanced | budget
141
201
 
142
202
  profiles:
143
- balanced:
203
+ quality:
144
204
  planning: opus # the deep thinker
145
- execution: sonnet # the fast worker
205
+ execution: opus # thorough but slower
146
206
  review: sonnet # the checker
207
+
208
+ balanced:
209
+ planning: opus
210
+ execution: sonnet # fast worker
211
+ review: sonnet
212
+
213
+ budget:
214
+ planning: sonnet
215
+ execution: sonnet
216
+ review: haiku # cheapest
217
+ ```
218
+
219
+ **Execution settings:**
220
+
221
+ ```yaml
222
+ execution:
223
+ agent_mode: bypassPermissions # how much autonomy agents get
224
+ max_parallel_agents: 5 # simultaneous agent workers
147
225
  ```
148
226
 
149
227
  **Optional extras** for the full experience:
150
228
 
151
- - [Codex CLI](https://github.com/openai/codex) — Powers the second-opinion council and code validation
229
+ - [Codex CLI](https://github.com/openai/codex) — Powers the council, code validation, and adversarial review
152
230
  - [Gemini CLI](https://github.com/google/gemini-cli) — Third voice in the council
153
231
  - Playwright MCP server (`npx @playwright/mcp@latest`) — Powers browser automation
154
232
 
@@ -165,6 +243,20 @@ cd ~/feed-the-machine && ./install.sh
165
243
 
166
244
  ---
167
245
 
246
+ ## Current Version
247
+
248
+ **v1.7.0** (April 2026) — [Full changelog](CHANGELOG.md)
249
+
250
+ Recent highlights:
251
+ - **ftm-ops**: Personal operations intelligence (task management, capacity tracking, burnout detection, stakeholder comms)
252
+ - **ftm-mind slimmed from 87KB to 10KB** via progressive disclosure
253
+ - **ftm-verify**: Dual-model adversarial verification (Codex + Gemini audit your completed work independently)
254
+ - **ftm-council-chat**: AIM-styled browser chatroom for multi-AI conversations
255
+ - **15 automation hooks** for event logging, learning capture, secret scanning, and session management
256
+ - **Configurable agent permissions** and parallel agent limits
257
+
258
+ ---
259
+
168
260
  ## License
169
261
 
170
262
  MIT
@@ -194,6 +194,51 @@ Append a row to the root INTENT.md module map table:
194
194
 
195
195
  ---
196
196
 
197
+ ## Layer 1.75: Filesystem Path Resolution Check
198
+
199
+ **Purpose:** Verify that all file paths and CLI commands referenced in SKILL.md and reference files actually resolve from the installed skill location. This catches the most dangerous class of wiring bug — code that passes every static check but fails at runtime because a path doesn't exist where the skill expects it.
200
+
201
+ **When to run:** After Layer 1.5, before Layer 2. Runs on ANY project that has `.md` files with path references (not just code projects). This is especially critical after tasks that change path references, move files, or update directory structures.
202
+
203
+ **Scope:** Scan all `.md` files in the changed diff for path references.
204
+
205
+ **Check protocol:**
206
+
207
+ 1. **Find changed markdown files:** `git diff HEAD~1 --name-only -- '*.md' '*.yml'`
208
+ 2. **For each changed file, extract path references** matching these patterns:
209
+ - Absolute paths: `~/.claude/`, `/Users/`, `/home/`
210
+ - CLI commands: `python3 <path>`, `bash <path>`, `node <path>`
211
+ - Skill-relative paths: `bin/`, `references/`, `scripts/`
212
+ - Config-referenced paths: any path that appears after a `paths.` config key
213
+ 3. **Resolve each path from the installed location:**
214
+ - For skill files (in `~/.claude/skills/<name>/`): resolve relative to the skill's install directory
215
+ - For absolute paths (`~/.claude/...`): resolve directly
216
+ - For CLI commands: extract the path argument, resolve it, then verify execution with `--help` or `--version`
217
+ 4. **Verify existence:** `test -e <resolved-path>` for each
218
+ 5. **For CLI commands:** additionally verify `python3 <path> --help 2>&1` exits without "No such file or directory"
219
+
220
+ **Finding types:**
221
+
222
+ | Finding | Severity | Auto-fixable? |
223
+ |---------|----------|---------------|
224
+ | `BROKEN_PATH` — path in .md file doesn't resolve from installed location | HARD FAIL | No — requires human decision on correct path |
225
+ | `BROKEN_CLI` — CLI command path doesn't exist or errors on execution | HARD FAIL | No — requires fixing the path or creating a symlink |
226
+ | `HARDCODED_USER_PATH` — absolute path contains a specific username (e.g., `/Users/kioja.kudumu/`) | WARN | Yes — replace with `~/` or `$HOME/` equivalent |
227
+ | `STALE_PATH_REFERENCE` — path references a directory/file that was moved or renamed in this diff | HARD FAIL | Yes — update to new path |
228
+
229
+ **Output format:**
230
+ ```
231
+ Layer 1.75 findings:
232
+ - [BROKEN_PATH] ftm-ops/SKILL.md:53 — `~/.claude/skills/ftm/bin/brain.py` does not exist (ftm/ points to router subdirectory, not repo root)
233
+ - [BROKEN_CLI] ftm-mind/references/orient-protocol.md:210 — `python3 ~/.claude/skills/eng-buddy/bin/brain.py` → file not found
234
+ - [HARDCODED_USER_PATH] ftm-mind/references/ops-routing.md:44 — `/Users/kioja.kudumu/.claude/eng-buddy/drafts/` contains hardcoded username
235
+ - [STALE_PATH_REFERENCE] ftm-ops/references/task-management.md:15 — `~/.claude/eng-buddy/active-tasks.md` was moved to `~/.claude/ftm-ops/active-tasks.md`
236
+ ```
237
+
238
+ **Why this layer exists:** In the v1.7.0 merge, 160+ path references were updated across 23 files. Every static check passed. The integration test verified brain.py worked from the repo path. But when a user invoked `/ftm-ops`, it called `python3 ~/.claude/skills/ftm/bin/brain.py` — which didn't exist because the `ftm` skill symlink pointed to the `ftm/` subdirectory (the router), not the repo root. A 2-second `test -e` would have caught this. This layer ensures it always does.
239
+
240
+ ---
241
+
197
242
  ## Layer 2: LLM Adversarial Audit
198
243
 
199
244
  **Mindset:** You are an adversary trying to PROVE code is dead. Not "confirm it works" — PROVE it's dead. Every new/modified export is guilty until proven innocent. You must find a complete chain from app entry point to the code in question, or it's flagged.
@@ -508,7 +553,8 @@ When invoked (manually via `/ftm-audit` or automatically post-task):
508
553
  1. Run Phase 0 (detect project patterns — framework, router, state, API layer)
509
554
  2. Run Layer 1 (knip static analysis)
510
555
  3. Run Layer 1.5 (documentation coverage check — INTENT.md entries for changed functions)
511
- 4. Run Layer 2 (LLM adversarial audit, calibrated to detected patterns)
556
+ 4. Run Layer 1.75 (filesystem path resolution verify all referenced paths exist from installed location)
557
+ 5. Run Layer 2 (LLM adversarial audit, calibrated to detected patterns)
512
558
  5. Combine findings, deduplicate
513
559
  6. Run Layer 3 (auto-fix) for each finding (including missing INTENT.md entries)
514
560
  7. Re-verify (re-run Layers 1+1.5+2)
@@ -540,6 +586,10 @@ After completing, update the blackboard:
540
586
  - Findings: [N]
541
587
  - [list each finding — missing entries, stale entries, missing module docs]
542
588
 
589
+ ### Layer 1.75: Path Resolution
590
+ - Findings: [N]
591
+ - [list each finding — broken paths, broken CLI commands, hardcoded user paths]
592
+
543
593
  ### Layer 2: Adversarial Audit
544
594
  - Findings: [N]
545
595
  - [list each finding with file:line and evidence]
@@ -0,0 +1,2 @@
1
+ name: ftm-council-chat
2
+ description: AIM-styled browser chatroom where Claude, Codex, and Gemini hold real-time conversations with the user as a full participant. Use when user says "chatroom", "aim chat", "council chat", "live debate", "open the chatroom", or "council-chat".
@@ -19,7 +19,16 @@ Before running ftm-audit, verify these four checks for every task:
19
19
 
20
20
  **Graceful degradation**: If ftm-browse binary is not installed, skip visual checks with a note: "Visual smoke test skipped — ftm-browse not installed." Do not fail the task.
21
21
 
22
- A task is NOT marked complete until checks 1–4 pass (check 5 is optional).
22
+ 6. **Path resolution check** If the task changed any file/CLI path references in SKILL.md or reference files:
23
+ - Extract all paths matching patterns: `~/.claude/`, `bin/`, `python3 `, `bash `
24
+ - Resolve each path from the installed skill location (`~/.claude/skills/<skill-name>/`)
25
+ - Verify the target exists: `test -e <resolved-path>`
26
+ - For CLI commands (`python3 <path>`), verify execution: `python3 <path> --help` exits 0
27
+ - Flag any path that doesn't resolve as a BLOCKER — the skill will fail at runtime
28
+
29
+ **Why this exists**: In the v1.7.0 eng-buddy merge, all brain.py references were updated from `~/.claude/skills/eng-buddy/bin/brain.py` to `~/.claude/skills/ftm/bin/brain.py`. The path existed in the repo but `~/.claude/skills/ftm/` pointed to the `ftm/` subdirectory (the router skill), not the repo root — so the path didn't resolve at runtime. This was caught by a user, not by the audit. A 2-second `test -e` check would have caught it.
30
+
31
+ A task is NOT marked complete until checks 1–4 pass (checks 5-6 are conditional).
23
32
 
24
33
  **Failure handling:**
25
34
  - Test failures → agent must fix before task completes
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env bash
2
+ # ftm-task-loader.sh
3
+ # PostToolUse hook that fires after the Skill tool is invoked.
4
+ # When ftm-ops or ftm is the invoked skill, loads tasks from brain.py
5
+ # and injects TaskCreate instructions as additionalContext.
6
+ #
7
+ # This is deterministic — brain.py runs in the hook (fast), and the
8
+ # model receives pre-parsed TaskCreate calls it must execute.
9
+ #
10
+ # Hook: PostToolUse (matcher: Skill)
11
+
12
+ set -euo pipefail
13
+
14
+ INPUT=$(cat)
15
+
16
+ # Extract the tool name and check it's the Skill tool
17
+ TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name // ""')
18
+ if [[ "$TOOL_NAME" != "Skill" ]]; then
19
+ exit 0
20
+ fi
21
+
22
+ # Extract which skill was invoked from the tool input
23
+ SKILL_NAME=$(echo "$INPUT" | jq -r '.tool_input.skill // ""' 2>/dev/null)
24
+
25
+ # Only fire for ftm-ops, ftm, or ftm-mind (which routes to ftm-ops for task requests)
26
+ case "$SKILL_NAME" in
27
+ ftm-ops|ftm|ftm-mind|eng-buddy) ;;
28
+ *) exit 0 ;;
29
+ esac
30
+
31
+ # Find brain.py — check multiple locations
32
+ BRAIN_PY=""
33
+ for candidate in \
34
+ "$HOME/.claude/skills/ftm/bin/brain.py" \
35
+ "$HOME/.claude/skills/ftm-ops/../bin/brain.py" \
36
+ "$HOME/Documents/Code/feed-the-machine/bin/brain.py"; do
37
+ if [[ -f "$candidate" ]]; then
38
+ BRAIN_PY="$candidate"
39
+ break
40
+ fi
41
+ done
42
+
43
+ if [[ -z "$BRAIN_PY" ]]; then
44
+ # brain.py not found — skip silently
45
+ exit 0
46
+ fi
47
+
48
+ # Run brain.py and capture task JSON
49
+ TASKS_JSON=$(python3 "$BRAIN_PY" --tasks --task-json 2>/dev/null) || exit 0
50
+
51
+ # Count active tasks
52
+ TASK_COUNT=$(echo "$TASKS_JSON" | python3 -c "
53
+ import sys, json
54
+ try:
55
+ tasks = json.load(sys.stdin)
56
+ active = [t for t in tasks if t.get('status') in ('pending', 'in_progress')]
57
+ print(len(active))
58
+ except:
59
+ print(0)
60
+ " 2>/dev/null)
61
+
62
+ if [[ "$TASK_COUNT" == "0" ]]; then
63
+ exit 0
64
+ fi
65
+
66
+ # Generate TaskCreate instructions from the task data
67
+ TASK_INSTRUCTIONS=$(echo "$TASKS_JSON" | python3 -c "
68
+ import sys, json
69
+ try:
70
+ tasks = json.load(sys.stdin)
71
+ active = [t for t in tasks if t.get('status') in ('pending', 'in_progress')]
72
+ lines = []
73
+ for t in active:
74
+ tid = t.get('id', t.get('legacy_number', '?'))
75
+ title = t.get('title', 'Untitled')
76
+ status = t.get('status', 'pending')
77
+ priority = t.get('priority', 'medium')
78
+ jira = t.get('jira_key', '')
79
+ desc_parts = [status, priority]
80
+ if jira:
81
+ desc_parts.append(jira)
82
+ desc = ' | '.join(desc_parts)
83
+ lines.append(f'TaskCreate(subject: \"#{tid} {title}\", description: \"{desc}\")')
84
+ print('\n'.join(lines))
85
+ except:
86
+ pass
87
+ " 2>/dev/null)
88
+
89
+ if [[ -z "$TASK_INSTRUCTIONS" ]]; then
90
+ exit 0
91
+ fi
92
+
93
+ # Output as additionalContext — the model MUST process this
94
+ cat <<EOF
95
+ [ftm-task-loader] Loaded $TASK_COUNT active tasks from tasks.db. You MUST now call TaskCreate for each one so they appear in Claude Code's sidebar task list. Do NOT skip this — rendering a table is not enough. Call each one:
96
+
97
+ $TASK_INSTRUCTIONS
98
+
99
+ Call all of these TaskCreate invocations NOW, before doing anything else. This is non-negotiable.
100
+ EOF
@@ -55,6 +55,16 @@
55
55
  }
56
56
  ]
57
57
  },
58
+ {
59
+ "matcher": "Skill",
60
+ "hooks": [
61
+ {
62
+ "type": "command",
63
+ "command": "~/.claude/hooks/ftm-task-loader.sh",
64
+ "timeout": 10
65
+ }
66
+ ]
67
+ },
58
68
  {
59
69
  "matcher": "Bash|mcp__git__git_commit",
60
70
  "hooks": [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "feed-the-machine",
3
- "version": "1.7.0",
4
- "description": "A unified intelligence layer for Claude Code — 22 skills with OODA-based reasoning, persistent memory, multi-model deliberation, and optional operator cockpit inbox",
3
+ "version": "1.7.1",
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",
7
7
  "type": "module",