feed-the-machine 1.1.0 → 1.3.0
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/bin/generate-manifest.mjs +253 -0
- package/bin/install.mjs +372 -26
- package/docs/INBOX.md +233 -0
- package/ftm/SKILL.md +34 -0
- package/ftm-audit/SKILL.md +69 -0
- package/ftm-brainstorm/SKILL.md +51 -0
- package/ftm-browse/SKILL.md +39 -0
- package/ftm-capture/SKILL.md +370 -0
- package/ftm-capture.yml +4 -0
- package/ftm-codex-gate/SKILL.md +59 -0
- package/ftm-config/SKILL.md +35 -0
- package/ftm-council/SKILL.md +56 -0
- package/ftm-dashboard/SKILL.md +34 -0
- package/ftm-debug/SKILL.md +84 -0
- package/ftm-diagram/SKILL.md +44 -0
- package/ftm-executor/SKILL.md +97 -0
- package/ftm-git/SKILL.md +60 -0
- package/ftm-inbox/backend/__init__.py +0 -0
- package/ftm-inbox/backend/adapters/__init__.py +0 -0
- package/ftm-inbox/backend/adapters/_retry.py +64 -0
- package/ftm-inbox/backend/adapters/base.py +230 -0
- package/ftm-inbox/backend/adapters/freshservice.py +104 -0
- package/ftm-inbox/backend/adapters/gmail.py +125 -0
- package/ftm-inbox/backend/adapters/jira.py +136 -0
- package/ftm-inbox/backend/adapters/registry.py +192 -0
- package/ftm-inbox/backend/adapters/slack.py +110 -0
- package/ftm-inbox/backend/db/__init__.py +0 -0
- package/ftm-inbox/backend/db/connection.py +54 -0
- package/ftm-inbox/backend/db/schema.py +78 -0
- package/ftm-inbox/backend/executor/__init__.py +7 -0
- package/ftm-inbox/backend/executor/engine.py +149 -0
- package/ftm-inbox/backend/executor/step_runner.py +98 -0
- package/ftm-inbox/backend/main.py +103 -0
- package/ftm-inbox/backend/models/__init__.py +1 -0
- package/ftm-inbox/backend/models/unified_task.py +36 -0
- package/ftm-inbox/backend/planner/__init__.py +6 -0
- package/ftm-inbox/backend/planner/generator.py +127 -0
- package/ftm-inbox/backend/planner/schema.py +34 -0
- package/ftm-inbox/backend/requirements.txt +5 -0
- package/ftm-inbox/backend/routes/__init__.py +0 -0
- package/ftm-inbox/backend/routes/execute.py +186 -0
- package/ftm-inbox/backend/routes/health.py +52 -0
- package/ftm-inbox/backend/routes/inbox.py +68 -0
- package/ftm-inbox/backend/routes/plan.py +271 -0
- package/ftm-inbox/bin/launchagent.mjs +91 -0
- package/ftm-inbox/bin/setup.mjs +188 -0
- package/ftm-inbox/bin/start.sh +10 -0
- package/ftm-inbox/bin/status.sh +17 -0
- package/ftm-inbox/bin/stop.sh +8 -0
- package/ftm-inbox/config.example.yml +55 -0
- package/ftm-inbox/package-lock.json +2898 -0
- package/ftm-inbox/package.json +26 -0
- package/ftm-inbox/postcss.config.js +6 -0
- package/ftm-inbox/src/app.css +199 -0
- package/ftm-inbox/src/app.html +18 -0
- package/ftm-inbox/src/lib/api.ts +166 -0
- package/ftm-inbox/src/lib/components/ExecutionLog.svelte +81 -0
- package/ftm-inbox/src/lib/components/InboxFeed.svelte +143 -0
- package/ftm-inbox/src/lib/components/PlanStep.svelte +271 -0
- package/ftm-inbox/src/lib/components/PlanView.svelte +206 -0
- package/ftm-inbox/src/lib/components/StreamPanel.svelte +99 -0
- package/ftm-inbox/src/lib/components/TaskCard.svelte +190 -0
- package/ftm-inbox/src/lib/components/ui/EmptyState.svelte +63 -0
- package/ftm-inbox/src/lib/components/ui/KawaiiCard.svelte +86 -0
- package/ftm-inbox/src/lib/components/ui/PillButton.svelte +106 -0
- package/ftm-inbox/src/lib/components/ui/StatusBadge.svelte +67 -0
- package/ftm-inbox/src/lib/components/ui/StreamDrawer.svelte +149 -0
- package/ftm-inbox/src/lib/components/ui/ThemeToggle.svelte +80 -0
- package/ftm-inbox/src/lib/theme.ts +47 -0
- package/ftm-inbox/src/routes/+layout.svelte +76 -0
- package/ftm-inbox/src/routes/+page.svelte +401 -0
- package/ftm-inbox/static/favicon.png +0 -0
- package/ftm-inbox/svelte.config.js +12 -0
- package/ftm-inbox/tailwind.config.ts +63 -0
- package/ftm-inbox/tsconfig.json +13 -0
- package/ftm-inbox/vite.config.ts +6 -0
- package/ftm-intent/SKILL.md +44 -0
- package/ftm-manifest.json +3794 -0
- package/ftm-map/SKILL.md +50 -0
- package/ftm-mind/SKILL.md +173 -66
- package/ftm-pause/SKILL.md +43 -0
- package/ftm-researcher/SKILL.md +55 -0
- package/ftm-resume/SKILL.md +47 -0
- package/ftm-retro/SKILL.md +54 -0
- package/ftm-routine/SKILL.md +36 -0
- package/ftm-state/blackboard/capabilities.json +5 -0
- package/ftm-state/blackboard/capabilities.schema.json +27 -0
- package/ftm-upgrade/SKILL.md +41 -0
- package/hooks/ftm-blackboard-enforcer.sh +28 -27
- package/hooks/ftm-plan-gate.sh +21 -25
- package/install.sh +238 -111
- package/package.json +6 -2
package/ftm-map/SKILL.md
CHANGED
|
@@ -207,3 +207,53 @@ After `map_updated` or session end:
|
|
|
207
207
|
- Stay in your worktree.
|
|
208
208
|
- ALWAYS use the venv python (`ftm-map/scripts/.venv/bin/python3`), never the system python.
|
|
209
209
|
- For query mode, ALWAYS run `setup.sh` first if `.venv` does not exist.
|
|
210
|
+
|
|
211
|
+
## Requirements
|
|
212
|
+
|
|
213
|
+
- tool: `ftm-map/scripts/.venv/bin/python3` | required | Python with tree-sitter and SQLite bindings
|
|
214
|
+
- tool: `ftm-map/scripts/setup.sh` | required | virtualenv and dependency installer
|
|
215
|
+
- tool: `ftm-map/scripts/index.py` | required | bootstrap and incremental indexer
|
|
216
|
+
- tool: `ftm-map/scripts/query.py` | required | blast radius, dependency, and FTS5 search queries
|
|
217
|
+
- tool: `ftm-map/scripts/views.py` | required | INTENT.md and .mmd diagram generation from graph
|
|
218
|
+
- tool: `git` | optional | changed file detection for incremental mode
|
|
219
|
+
- config: `~/.claude/ftm-config.yml` | optional | model profile and skills.ftm-map.enabled flag
|
|
220
|
+
|
|
221
|
+
## Risk
|
|
222
|
+
|
|
223
|
+
- level: low_write
|
|
224
|
+
- scope: writes and updates .ftm-map/map.db SQLite database; does not modify any project source files; also writes blackboard experience entry
|
|
225
|
+
- rollback: delete .ftm-map/map.db to reset to unindexed state; re-run bootstrap to rebuild
|
|
226
|
+
|
|
227
|
+
## Approval Gates
|
|
228
|
+
|
|
229
|
+
- trigger: bootstrap requested on very large codebase (1000+ files) | action: report estimated file count before running, proceed unless user objects
|
|
230
|
+
- complexity_routing: micro → auto | small → auto | medium → auto | large → auto | xl → auto
|
|
231
|
+
|
|
232
|
+
## Fallbacks
|
|
233
|
+
|
|
234
|
+
- condition: .venv does not exist | action: run setup.sh first to create it before proceeding
|
|
235
|
+
- condition: tree-sitter binary missing | action: run setup.sh to install dependencies
|
|
236
|
+
- condition: .ftm-map/map.db missing when query requested | action: explain graph not indexed, offer to run bootstrap
|
|
237
|
+
- condition: git not available for incremental changed-file detection | action: fall back to indexing all modified files detected from disk timestamps
|
|
238
|
+
|
|
239
|
+
## Capabilities
|
|
240
|
+
|
|
241
|
+
- cli: `ftm-map/scripts/.venv/bin/python3` | required | tree-sitter parsing and SQLite operations
|
|
242
|
+
- cli: `git` | optional | changed file detection for incremental indexing
|
|
243
|
+
|
|
244
|
+
## Event Payloads
|
|
245
|
+
|
|
246
|
+
### map_updated
|
|
247
|
+
- skill: string — "ftm-map"
|
|
248
|
+
- project_path: string — absolute path to indexed project
|
|
249
|
+
- symbols_count: number — total symbols in the graph
|
|
250
|
+
- edges_count: number — total dependency edges
|
|
251
|
+
- files_parsed: number — files processed in this operation
|
|
252
|
+
- duration_ms: number — indexing duration
|
|
253
|
+
- mode: string — "bootstrap" | "incremental"
|
|
254
|
+
|
|
255
|
+
### task_completed
|
|
256
|
+
- skill: string — "ftm-map"
|
|
257
|
+
- operation: string — "bootstrap" | "incremental" | "query"
|
|
258
|
+
- query_type: string | null — "blast-radius" | "deps" | "search" | "info" (for query mode)
|
|
259
|
+
- duration_ms: number — total operation duration
|
package/ftm-mind/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: ftm-mind
|
|
|
3
3
|
description: Unified OODA cognitive loop for the ftm system. Use for freeform `/ftm` or `/ftm-mind` requests, vague asks, mixed-tool workflows, Jira/ticket-driven work, or any request that should be understood before routing. Also handles explicit ftm skill invocations by honoring the requested skill while still doing a fast orientation pass for context, prerequisites, and approval gates. Triggers on open-ended requests like "help me think through this", bug reports, plan execution asks, Jira URLs, "make this better", mixed MCP asks like "check my calendar and draft a Slack message", and direct skill invocations like "/ftm-debug ..." or "/ftm-brainstorm ...". Do NOT use only when another ftm skill is already actively handling the task and no re-orientation is needed.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Panda Mind
|
|
7
7
|
|
|
8
8
|
`ftm-mind` is the reasoning core of the ftm ecosystem. It does not route by keyword alone. It observes the request, orients against live state and accumulated memory, decides the smallest correct next move, acts, then loops.
|
|
9
9
|
|
|
@@ -133,6 +133,62 @@ Interpretation rules:
|
|
|
133
133
|
- "what would other AIs think" is a council request, not generic brainstorming
|
|
134
134
|
- "rename this variable" is usually a micro direct task, not a routed skill
|
|
135
135
|
|
|
136
|
+
### 1.5. Environment Discovery (Orient sub-phase)
|
|
137
|
+
|
|
138
|
+
Before pattern matching or routing, probe the current environment to map available capabilities. This step runs automatically on the first request in a session, then caches results for 15 minutes.
|
|
139
|
+
|
|
140
|
+
**Discovery sequence:**
|
|
141
|
+
|
|
142
|
+
1. **MCP Server Probe** — List connected MCP servers by checking which tool namespaces are available:
|
|
143
|
+
- For each known MCP server (serena, supabase, playwright, freshservice-mcp, slack, gmail, mcp-atlassian-personal, lusha, apple-doc-mcp), check if tools with that prefix exist
|
|
144
|
+
- Record: server name, tools available, verified status
|
|
145
|
+
|
|
146
|
+
2. **CLI Probe** — Check for installed CLIs on PATH:
|
|
147
|
+
- Essential: `node`, `python3`, `git`, `npm`
|
|
148
|
+
- FTM tools: `knip`, `codex` (OpenAI Codex CLI)
|
|
149
|
+
- Optional: `gh` (GitHub CLI), `jq`, `curl`
|
|
150
|
+
- For each: run `which <cmd>` and record path + version if available
|
|
151
|
+
|
|
152
|
+
3. **Environment Variable Check** — Check for key env vars (existence only, never log values):
|
|
153
|
+
- `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GITHUB_TOKEN`
|
|
154
|
+
- `JIRA_API_TOKEN`, `FRESHSERVICE_API_KEY`, `SLACK_BOT_TOKEN`
|
|
155
|
+
- Record: var name, is_set (boolean)
|
|
156
|
+
|
|
157
|
+
4. **Write capabilities.json** to `~/.claude/ftm-state/blackboard/capabilities.json`:
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"discovered_at": "2026-03-20T10:30:00Z",
|
|
161
|
+
"expires_at": "2026-03-20T10:45:00Z",
|
|
162
|
+
"capabilities": [
|
|
163
|
+
{
|
|
164
|
+
"name": "serena",
|
|
165
|
+
"type": "mcp",
|
|
166
|
+
"verified": true,
|
|
167
|
+
"last_verified_at": "2026-03-20T10:30:00Z",
|
|
168
|
+
"operations_verified": ["find_symbol", "search_for_pattern"],
|
|
169
|
+
"confidence": "verified"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "node",
|
|
173
|
+
"type": "cli",
|
|
174
|
+
"verified": true,
|
|
175
|
+
"path": "/usr/local/bin/node",
|
|
176
|
+
"version": "20.11.0",
|
|
177
|
+
"confidence": "verified"
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
5. **Cache logic** — If `capabilities.json` exists and `expires_at` > now, skip re-probing. If stale or missing, re-probe. User can force refresh by saying "refresh capabilities" or "recon".
|
|
184
|
+
|
|
185
|
+
**How this affects planning:**
|
|
186
|
+
|
|
187
|
+
When ftm-mind generates or routes to a plan, it MUST:
|
|
188
|
+
- Check `capabilities.json` for every tool/MCP/CLI the plan references
|
|
189
|
+
- If a required capability is `verified: false` or missing, use the skill's fallback from its manifest (## Fallbacks section)
|
|
190
|
+
- If no fallback exists for a missing capability, warn the user: "Plan step N requires [capability] which is not available. Skip or find alternative?"
|
|
191
|
+
|
|
136
192
|
### 2. Blackboard Loading Protocol
|
|
137
193
|
|
|
138
194
|
Read the blackboard in this order:
|
|
@@ -244,7 +300,7 @@ If `experiences/index.json` has no usable matches:
|
|
|
244
300
|
- lean harder on current repo state and direct inspection
|
|
245
301
|
- record the resulting experience aggressively after completion
|
|
246
302
|
|
|
247
|
-
### 4. Capability Inventory:
|
|
303
|
+
### 4. Capability Inventory: 15 Panda Skills
|
|
248
304
|
|
|
249
305
|
Orient must know all ftm capabilities before deciding whether to route or act directly.
|
|
250
306
|
|
|
@@ -265,8 +321,7 @@ Orient must know all ftm capabilities before deciding whether to route or act di
|
|
|
265
321
|
| `ftm-retro` | The user wants a post-run retrospective, lessons learned, or execution review. |
|
|
266
322
|
| `ftm-config` | The user wants ftm settings, model profile, or feature configuration changed. |
|
|
267
323
|
| `ftm-git` | Any git commit or push is about to happen, the user asks to scan for secrets/credentials/API keys, or wants to verify no secrets are hardcoded before sharing code. MUST run before any commit or push operation — this is a mandatory security gate, not optional. |
|
|
268
|
-
| `ftm-
|
|
269
|
-
| `ftm-map` | The user wants structural code queries: blast radius ("what breaks if I change X"), dependency chains ("what depends on Y"), code search ("where do we handle auth"), or codebase indexing ("map this codebase", "index this project"). Not for documentation updates (that is ftm-intent/ftm-diagram). |
|
|
324
|
+
| `ftm-capture` | The user just completed a repeatable workflow and wants to save it as a reusable routine + playbook + reference doc. Triggers on "capture this", "save as routine", "codify this", "don't make me explain this again". Also suggest proactively when you detect the user doing something they've done before (matching blackboard experiences with same task_type 2+ times). |
|
|
270
325
|
|
|
271
326
|
Routing heuristic:
|
|
272
327
|
|
|
@@ -442,9 +497,12 @@ Signals:
|
|
|
442
497
|
- changes routing, integration, or cross-system references (API endpoints, project keys, board IDs)
|
|
443
498
|
- the codebase being changed is unfamiliar or hasn't been read yet this session
|
|
444
499
|
- the task involves both code changes AND communication/coordination
|
|
500
|
+
- **calls any production API that creates, updates, or deletes resources** (Okta, Freshservice, AWS, any external service with real consequences)
|
|
445
501
|
|
|
446
502
|
The reason forced escalation exists: tasks that touch external systems or multiple files feel simple in the moment but have hidden ordering dependencies, stakeholder coordination needs, and blast radius that only becomes visible after you've already started grinding. A 2-minute plan catches these. Grinding without one wastes the user's time when you go in the wrong direction.
|
|
447
503
|
|
|
504
|
+
**The Hindsight incident**: In March 2026, a task that "felt small" — set up SSO for Hindsight — resulted in autonomous creation of Okta groups in production, user assignments, Freshservice records, a service catalog item, and S3 config changes. The model never presented a plan. It never asked for approval on any phase. It just researched and executed. This is exactly what forced escalation prevents. If the task will call APIs that modify production state, it is medium. Full stop.
|
|
505
|
+
|
|
448
506
|
Typical examples:
|
|
449
507
|
|
|
450
508
|
- fix a flaky test with several hypotheses
|
|
@@ -514,36 +572,61 @@ Escalate when:
|
|
|
514
572
|
- the complexity is obvious from the start
|
|
515
573
|
- forced escalation signals are present (see Medium and Large sections above)
|
|
516
574
|
|
|
517
|
-
### 9. Approval Gates
|
|
575
|
+
### 9. Approval Gates (HARD STOP — NOT OPTIONAL)
|
|
576
|
+
|
|
577
|
+
**This section is a circuit breaker, not a suggestion. If you are about to call a tool that creates, updates, or deletes a record in an external system, you MUST stop and get explicit user approval FIRST. No exceptions. No "the user implied it." No "it's part of the plan." STOP and ASK.**
|
|
578
|
+
|
|
579
|
+
The reason this exists: in March 2026, ftm-mind took a Hindsight SSO task and autonomously created Okta groups, added users to production Okta, created Freshservice records, created a service catalog item, and modified S3 workflow configs — all without asking once. The user's `approval_mode` was `plan_first`. The model rationalized past every gate because it "had momentum." That is exactly the failure mode this section prevents.
|
|
580
|
+
|
|
581
|
+
#### What requires approval (STOP before each one)
|
|
518
582
|
|
|
519
|
-
|
|
583
|
+
Every individual external mutation needs its own approval. "The user approved the plan" does not mean "the user approved every API call in the plan." Present what you're about to do, wait for "go" / "yes" / "approved", then execute that one action.
|
|
520
584
|
|
|
521
|
-
|
|
585
|
+
- **Okta**: creating apps, groups, assigning users, modifying policies
|
|
586
|
+
- **Freshservice**: creating tickets, records, catalog items, custom objects
|
|
587
|
+
- **Jira / Confluence**: creating or updating issues, pages, comments
|
|
588
|
+
- **Slack / Email**: sending messages (draft-before-send protocol applies)
|
|
589
|
+
- **Calendar**: creating or modifying events
|
|
590
|
+
- **S3 / cloud storage**: writing or modifying objects
|
|
591
|
+
- **Browser forms**: submitting data through playwright/puppeteer
|
|
592
|
+
- **Deploys**: any production-affecting operation
|
|
593
|
+
- **Git remote**: pushes, PR creation
|
|
522
594
|
|
|
523
|
-
|
|
595
|
+
When multiple mutations are part of one plan, batch the approval request by phase — not one API call at a time (that would be annoying), but not "approve the whole plan and I'll do 15 things silently" either. Group related mutations:
|
|
524
596
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
-
|
|
528
|
-
-
|
|
529
|
-
-
|
|
530
|
-
|
|
531
|
-
|
|
597
|
+
```
|
|
598
|
+
Phase 1 ready — Okta setup:
|
|
599
|
+
- Create SAML app "Hindsight"
|
|
600
|
+
- Create groups: hindsight_admins, hindsight_users
|
|
601
|
+
- Add 3 users to hindsight_users
|
|
602
|
+
|
|
603
|
+
Proceed with Phase 1? (yes/skip/modify)
|
|
604
|
+
```
|
|
532
605
|
|
|
533
|
-
|
|
606
|
+
Then after Phase 1 completes, present Phase 2 before executing it.
|
|
534
607
|
|
|
535
|
-
-
|
|
536
|
-
|
|
608
|
+
#### What auto-proceeds (no approval needed)
|
|
609
|
+
|
|
610
|
+
- local code edits, documentation updates
|
|
537
611
|
- tests, lint, builds, audits
|
|
538
|
-
- local git inspection
|
|
539
|
-
-
|
|
540
|
-
- reading from any MCP
|
|
612
|
+
- local git operations (branch, commit, inspection)
|
|
613
|
+
- reading from any MCP or API (GET requests)
|
|
541
614
|
- blackboard reads and writes
|
|
542
|
-
- saving drafts to `.ftm-drafts/`
|
|
615
|
+
- saving drafts to `.ftm-drafts/`
|
|
616
|
+
|
|
617
|
+
#### The momentum trap
|
|
543
618
|
|
|
544
|
-
If
|
|
619
|
+
If you notice yourself thinking any of these, STOP — you are rationalizing past a gate:
|
|
545
620
|
|
|
546
|
-
|
|
621
|
+
- "The user clearly wants this done, I'll just do it"
|
|
622
|
+
- "This is part of the approved plan"
|
|
623
|
+
- "I already started, might as well finish"
|
|
624
|
+
- "It's just one more API call"
|
|
625
|
+
- "The user will appreciate me being proactive"
|
|
626
|
+
|
|
627
|
+
None of these override the gate. Present the action, wait for approval, then execute.
|
|
628
|
+
|
|
629
|
+
If the user has explicitly requested stricter gates, honor that preference. If authentication or permission is missing, ask instead of guessing.
|
|
547
630
|
|
|
548
631
|
### 10. Ask-the-User Heuristic
|
|
549
632
|
|
|
@@ -723,45 +806,6 @@ Approve? Or adjust the approach.
|
|
|
723
806
|
|
|
724
807
|
This gives the user control over the *strategy* even when delegating to skills.
|
|
725
808
|
|
|
726
|
-
### Research tasks → ftm-researcher
|
|
727
|
-
|
|
728
|
-
Route to ftm-researcher when the request is primarily about gathering information,
|
|
729
|
-
comparing approaches, or understanding the state of the art on a topic.
|
|
730
|
-
|
|
731
|
-
Signals:
|
|
732
|
-
- "research X", "find out about Y", "what's the state of the art on Z"
|
|
733
|
-
- "compare approaches to W", "how do others handle X"
|
|
734
|
-
- "deep dive into X", "investigate Y", "look into Z"
|
|
735
|
-
- "find me examples of X", "what's out there for Y"
|
|
736
|
-
- The user wants facts and evidence, not ideation or planning
|
|
737
|
-
|
|
738
|
-
Distinguish from ftm-brainstorm:
|
|
739
|
-
- Brainstorm: user has an idea and wants to develop it → exploratory, iterative, extractive
|
|
740
|
-
- Researcher: user wants information about a topic → factual, evidence-based, comprehensive
|
|
741
|
-
- Ambiguous: if the user seems to want both exploration AND research, route to brainstorm (which calls researcher internally)
|
|
742
|
-
|
|
743
|
-
Mode selection:
|
|
744
|
-
- "quick look" / "briefly" → quick mode
|
|
745
|
-
- Default → standard mode
|
|
746
|
-
- "deep dive" / "thorough" / "comprehensive" → deep mode
|
|
747
|
-
|
|
748
|
-
### Structural code queries → ftm-map
|
|
749
|
-
|
|
750
|
-
Route to ftm-map when the request involves understanding code structure and dependencies:
|
|
751
|
-
|
|
752
|
-
**Strong signals (route immediately):**
|
|
753
|
-
- "what breaks if I change X" / "blast radius"
|
|
754
|
-
- "what depends on X" / "dependency chain"
|
|
755
|
-
- "what calls X" / "who calls X"
|
|
756
|
-
- "where do we handle X" (code search, not docs)
|
|
757
|
-
- "map this codebase" / "index this project"
|
|
758
|
-
|
|
759
|
-
**Disambiguation:**
|
|
760
|
-
- "document this function" → ftm-intent (documentation), NOT ftm-map
|
|
761
|
-
- "show the architecture diagram" → ftm-diagram, NOT ftm-map
|
|
762
|
-
- "search for X in the codebase" → could be ftm-map (if structural) or Grep (if text-literal)
|
|
763
|
-
- If `.ftm-map/map.db` doesn't exist and the query is structural, suggest bootstrapping first
|
|
764
|
-
|
|
765
809
|
### 2. Choose direct vs routed execution
|
|
766
810
|
|
|
767
811
|
Use direct execution when:
|
|
@@ -793,7 +837,15 @@ If the next move will reveal new information, plan to re-enter Observe after the
|
|
|
793
837
|
|
|
794
838
|
## Act
|
|
795
839
|
|
|
796
|
-
Act is clean, decisive execution.
|
|
840
|
+
Act is clean, decisive execution — but execution of **approved** work only.
|
|
841
|
+
|
|
842
|
+
**Pre-Act checkpoint**: Before executing anything, verify:
|
|
843
|
+
|
|
844
|
+
1. If `approval_mode` is `plan_first` or `always_ask`, did the user explicitly approve the plan? (Words like "go", "yes", "approved", "do it", "ship it" — not silence, not your own narration of the plan.)
|
|
845
|
+
2. If the task involves external mutations (see Approval Gates section 9), have you presented the specific actions and received approval?
|
|
846
|
+
3. If neither condition applies, proceed.
|
|
847
|
+
|
|
848
|
+
If you cannot point to a specific user message that approved the plan, you have not received approval. Go back to Decide and present the plan.
|
|
797
849
|
|
|
798
850
|
### 1. Direct action
|
|
799
851
|
|
|
@@ -876,6 +928,7 @@ After every completed task — not just "meaningful" ones — update the blackbo
|
|
|
876
928
|
|
|
877
929
|
1. Update `context.json` — set `current_task` to reflect what was done, append to `recent_decisions`
|
|
878
930
|
2. Update `session_metadata.skills_invoked` if a skill was used
|
|
931
|
+
3. If environment discovery ran this session, ensure `capabilities.json` is written to `/Users/kioja.kudumu/.claude/ftm-state/blackboard/capabilities.json` with the current snapshot (schema: `capabilities.schema.json` in the same directory)
|
|
879
932
|
|
|
880
933
|
**After task completion, always record an experience file:**
|
|
881
934
|
|
|
@@ -934,13 +987,12 @@ Use these as behavioral tests.
|
|
|
934
987
|
When the user asks for help, shows empty input, or says `?` or `menu`, show:
|
|
935
988
|
|
|
936
989
|
```text
|
|
937
|
-
|
|
990
|
+
Panda Skills:
|
|
938
991
|
/ftm brainstorm [idea] — Research-backed idea development
|
|
939
992
|
/ftm execute [plan-path] — Autonomous plan execution with agent teams
|
|
940
993
|
/ftm debug [description] — Multi-vector deep debugging war room
|
|
941
994
|
/ftm audit — Wiring verification
|
|
942
995
|
/ftm council [question] — Multi-model deliberation
|
|
943
|
-
/ftm research [topic] — Deep parallel research engine
|
|
944
996
|
/ftm intent — Manage INTENT.md documentation
|
|
945
997
|
/ftm diagram — Manage architecture diagrams
|
|
946
998
|
/ftm codex-gate — Run adversarial Codex validation
|
|
@@ -984,3 +1036,58 @@ Avoid these failures:
|
|
|
984
1036
|
6. Read before write.
|
|
985
1037
|
7. Session trajectory matters.
|
|
986
1038
|
8. The best route is often no route at all.
|
|
1039
|
+
|
|
1040
|
+
## Requirements
|
|
1041
|
+
|
|
1042
|
+
- tool: `git` | required | codebase state inspection (git status, git log)
|
|
1043
|
+
- config: `~/.claude/ftm-config.yml` | optional | approval_mode, execution preferences
|
|
1044
|
+
- reference: `~/.claude/skills/ftm-mind/references/mcp-inventory.md` | required | MCP capability routing table
|
|
1045
|
+
- reference: `~/.claude/ftm-state/blackboard/context.json` | optional | session state and preferences
|
|
1046
|
+
- reference: `~/.claude/ftm-state/blackboard/experiences/index.json` | optional | experience retrieval index
|
|
1047
|
+
- reference: `~/.claude/ftm-state/blackboard/patterns.json` | optional | promoted patterns for orientation
|
|
1048
|
+
|
|
1049
|
+
## Risk
|
|
1050
|
+
|
|
1051
|
+
- level: low_write
|
|
1052
|
+
- scope: writes blackboard context and experience files; local code edits only on micro/small direct tasks; routes to other skills for larger work
|
|
1053
|
+
- rollback: blackboard writes can be reverted by editing JSON files; no destructive mutations performed directly
|
|
1054
|
+
|
|
1055
|
+
## Approval Gates
|
|
1056
|
+
|
|
1057
|
+
- trigger: task_size >= medium AND involves external systems | action: present numbered plan and wait for explicit user approval
|
|
1058
|
+
- trigger: any external mutation (Okta, Freshservice, Jira, Slack, email, calendar, S3, deploys, git push) | action: present phase-level approval request before executing each mutation
|
|
1059
|
+
- trigger: task_size == small AND approval_mode == always_ask | action: show pre-flight summary before proceeding
|
|
1060
|
+
- complexity_routing: micro → auto | small → auto (pre-flight summary if plan_first) | medium → plan_first | large → plan_first | xl → always_ask
|
|
1061
|
+
|
|
1062
|
+
## Fallbacks
|
|
1063
|
+
|
|
1064
|
+
- condition: blackboard context.json missing or malformed | action: treat as empty state, proceed at full capability using live observation
|
|
1065
|
+
- condition: experiences/index.json empty or no matching entries | action: skip experience retrieval, lean on current repo state and direct inspection
|
|
1066
|
+
- condition: patterns.json missing | action: skip pattern application, rely on direct analysis
|
|
1067
|
+
- condition: ftm-config.yml missing | action: default to plan_first approval_mode and balanced model profile
|
|
1068
|
+
- condition: mcp-inventory.md missing | action: rely on built-in MCP routing heuristics from skill body
|
|
1069
|
+
- condition: requested ftm skill unavailable | action: notify user and attempt direct handling or alternate routing
|
|
1070
|
+
|
|
1071
|
+
## Capabilities
|
|
1072
|
+
|
|
1073
|
+
- mcp: `git` | optional | codebase state, diffs, history, commits
|
|
1074
|
+
- mcp: `mcp-atlassian-personal` | optional | Jira/Confluence reads for ticket-driven work
|
|
1075
|
+
- mcp: `slack` | optional | Slack context reads, draft messages
|
|
1076
|
+
- mcp: `gmail` | optional | email reads, drafts
|
|
1077
|
+
- mcp: `google-calendar` | optional | calendar inspection for scheduling requests
|
|
1078
|
+
- mcp: `freshservice-mcp` | optional | IT ticketing reads
|
|
1079
|
+
- mcp: `sequential-thinking` | optional | multi-step reflective reasoning
|
|
1080
|
+
- mcp: `playwright` | optional | browser automation for visual tasks
|
|
1081
|
+
- mcp: `glean_default` | optional | internal company knowledge search
|
|
1082
|
+
- mcp: `context7` | optional | external library documentation
|
|
1083
|
+
- env: none required
|
|
1084
|
+
|
|
1085
|
+
## Event Payloads
|
|
1086
|
+
|
|
1087
|
+
### task_completed
|
|
1088
|
+
- skill: string — "ftm-mind"
|
|
1089
|
+
- task_type: string — detected task type (feature, bug, refactor, investigation, etc.)
|
|
1090
|
+
- task_size: string — micro | small | medium | large
|
|
1091
|
+
- route: string — direct | skill name routed to
|
|
1092
|
+
- duration_ms: number — time from observe to act completion
|
|
1093
|
+
- blackboard_updated: boolean — whether context.json and experience were written
|
package/ftm-pause/SKILL.md
CHANGED
|
@@ -131,3 +131,46 @@ Tailor the counts to the skill: brainstorm shows decisions + turns, executor sho
|
|
|
131
131
|
**Skill invoked, no user interaction yet:** Save what exists (Phase 0 scan, initial question). "Next Step" notes that the user hasn't answered yet.
|
|
132
132
|
|
|
133
133
|
**Large state:** Do not truncate. Some sessions produce massive state files. Completeness is required for reliable restoration.
|
|
134
|
+
|
|
135
|
+
## Requirements
|
|
136
|
+
|
|
137
|
+
- reference: `~/.claude/ftm-state/STATE.md` | optional | existing state file to overwrite
|
|
138
|
+
- reference: `~/.claude/ftm-pause/references/protocols/SKILL-RESTORE-PROTOCOLS.md` | required | per-skill capture field specifications
|
|
139
|
+
- reference: `~/.claude/ftm-pause/references/protocols/VALIDATION.md` | required | pre-write and post-write validation checklist
|
|
140
|
+
- tool: `git` | optional | git branch and commit hash capture for state file
|
|
141
|
+
|
|
142
|
+
## Risk
|
|
143
|
+
|
|
144
|
+
- level: low_write
|
|
145
|
+
- scope: writes ~/.claude/ftm-state/STATE.md only; does not modify project source files or blackboard experiences; overwrites existing STATE.md without backup
|
|
146
|
+
- rollback: no project mutations; prior STATE.md is overwritten (not backed up) by design
|
|
147
|
+
|
|
148
|
+
## Approval Gates
|
|
149
|
+
|
|
150
|
+
- trigger: multiple skills active and unclear which to pause | action: ask user which skill state to save before writing
|
|
151
|
+
- complexity_routing: micro → auto | small → auto | medium → auto | large → auto | xl → auto
|
|
152
|
+
|
|
153
|
+
## Fallbacks
|
|
154
|
+
|
|
155
|
+
- condition: ~/.claude/ftm-state/ directory doesn't exist | action: create directory before writing STATE.md
|
|
156
|
+
- condition: no ftm skill detected as active | action: report "No active ftm session detected" and list which skills this applies to
|
|
157
|
+
- condition: git not available | action: omit git_branch and git_commit fields from state file frontmatter
|
|
158
|
+
- condition: artifact files referenced in state don't exist on disk | action: note as "path recorded but file not found" in Artifacts section
|
|
159
|
+
|
|
160
|
+
## Capabilities
|
|
161
|
+
|
|
162
|
+
- cli: `git` | optional | branch name and commit hash for state file metadata
|
|
163
|
+
|
|
164
|
+
## Event Payloads
|
|
165
|
+
|
|
166
|
+
### session_paused
|
|
167
|
+
- skill: string — "ftm-pause"
|
|
168
|
+
- saved_skill: string — the ftm skill whose state was saved
|
|
169
|
+
- phase: string — phase at which the session was paused
|
|
170
|
+
- state_file: string — absolute path to written STATE.md
|
|
171
|
+
- artifacts_count: number — number of artifact paths recorded
|
|
172
|
+
|
|
173
|
+
### task_completed
|
|
174
|
+
- skill: string — "ftm-pause"
|
|
175
|
+
- saved_skill: string — the ftm skill whose state was saved
|
|
176
|
+
- state_file: string — absolute path to STATE.md
|
package/ftm-researcher/SKILL.md
CHANGED
|
@@ -218,3 +218,58 @@ The following state is persisted for pause/resume support:
|
|
|
218
218
|
- `ftm-researcher/references/council-integration.md` — ftm-council interface + fallback challenger prompts
|
|
219
219
|
- `ftm-researcher/scripts/score_credibility.py` — Source credibility scoring
|
|
220
220
|
- `ftm-researcher/scripts/validate_research.py` — Research output validation
|
|
221
|
+
|
|
222
|
+
## Requirements
|
|
223
|
+
|
|
224
|
+
- config: `~/.claude/ftm-config.yml` | optional | planning and review model profiles, per_skill_overrides.ftm-researcher agent cap
|
|
225
|
+
- reference: `ftm-researcher/references/agent-prompts.md` | required | 7 finder agent prompts and orchestrator decomposition protocol
|
|
226
|
+
- reference: `ftm-researcher/references/synthesis-pipeline.md` | required | 5-phase synthesis pipeline
|
|
227
|
+
- reference: `ftm-researcher/references/adaptive-search.md` | optional | wave 2 adaptive refinement (deep mode only)
|
|
228
|
+
- reference: `ftm-researcher/references/output-format.md` | required | JSON schema and markdown template
|
|
229
|
+
- reference: `ftm-researcher/references/council-integration.md` | optional | ftm-council interface (deep mode only)
|
|
230
|
+
- reference: `~/.claude/ftm-blackboard/context.json` | optional | session state
|
|
231
|
+
- reference: `~/.claude/ftm-blackboard/patterns.json` | optional | recurring research patterns
|
|
232
|
+
|
|
233
|
+
## Risk
|
|
234
|
+
|
|
235
|
+
- level: read_only
|
|
236
|
+
- scope: reads web sources and local codebase via agents; writes blackboard experience entry; writes structured JSON artifact; does not modify project source files
|
|
237
|
+
- rollback: no project mutations; blackboard write can be reverted by editing JSON files
|
|
238
|
+
|
|
239
|
+
## Approval Gates
|
|
240
|
+
|
|
241
|
+
- trigger: research complete and user says "done" / "thanks" | action: finalize, write blackboard, emit events
|
|
242
|
+
- trigger: deep mode and ftm-council invoked | action: council runs automatically on top claims (no user gate needed for this step)
|
|
243
|
+
- complexity_routing: micro → auto | small → auto | medium → auto | large → auto | xl → auto
|
|
244
|
+
|
|
245
|
+
## Fallbacks
|
|
246
|
+
|
|
247
|
+
- condition: ftm-council not available (deep mode) | action: use 2 fallback challenger agents (Devil's Advocate + Edge Case Hunter) instead
|
|
248
|
+
- condition: agent cap exceeded | action: queue excess agents and dispatch after current wave completes
|
|
249
|
+
- condition: research agent returns no findings | action: broaden query and retry; if still empty, report "No prior art found — this may be novel"
|
|
250
|
+
- condition: blackboard missing | action: proceed without experience-informed shortcuts
|
|
251
|
+
|
|
252
|
+
## Capabilities
|
|
253
|
+
|
|
254
|
+
- mcp: `WebSearch` | optional | finder agents for web, GitHub, and competitive research
|
|
255
|
+
- mcp: `WebFetch` | optional | fetching specific URLs found during research
|
|
256
|
+
- mcp: `sequential-thinking` | optional | complex synthesis and reconciliation
|
|
257
|
+
|
|
258
|
+
## Event Payloads
|
|
259
|
+
|
|
260
|
+
### research_complete
|
|
261
|
+
- skill: string — "ftm-researcher"
|
|
262
|
+
- query: string — original research question
|
|
263
|
+
- mode: string — "quick" | "standard" | "deep"
|
|
264
|
+
- findings_count: number — total normalized findings
|
|
265
|
+
- consensus_count: number — findings with 3+ agent agreement
|
|
266
|
+
- contested_count: number — findings with council disagreement
|
|
267
|
+
- unique_count: number — single-agent findings
|
|
268
|
+
- sources_count: number — total sources cited
|
|
269
|
+
- council_used: boolean — whether ftm-council was invoked
|
|
270
|
+
- duration_ms: number — total research duration
|
|
271
|
+
|
|
272
|
+
### task_completed
|
|
273
|
+
- skill: string — "ftm-researcher"
|
|
274
|
+
- task_title: string — research topic title
|
|
275
|
+
- duration_ms: number — total session duration including iterations
|
package/ftm-resume/SKILL.md
CHANGED
|
@@ -164,3 +164,50 @@ To save a session for later:
|
|
|
164
164
|
2. When you need to stop, use /ftm-pause
|
|
165
165
|
3. In a new conversation, use /ftm-resume to continue
|
|
166
166
|
```
|
|
167
|
+
|
|
168
|
+
## Requirements
|
|
169
|
+
|
|
170
|
+
- reference: `~/.claude/ftm-state/STATE.md` | required | saved session state file from ftm-pause
|
|
171
|
+
- reference: `../ftm-pause/references/protocols/SKILL-RESTORE-PROTOCOLS.md` | required | per-skill state field restoration instructions
|
|
172
|
+
- reference: `../ftm-pause/references/protocols/VALIDATION.md` | required | validation protocol for state file integrity
|
|
173
|
+
- reference: `~/.claude/ftm-state/archive/` | optional | archived prior state files
|
|
174
|
+
- tool: `git` | optional | checking git state drift since session was paused
|
|
175
|
+
|
|
176
|
+
## Risk
|
|
177
|
+
|
|
178
|
+
- level: low_write
|
|
179
|
+
- scope: archives STATE.md by moving it to ~/.claude/ftm-state/archive/; invokes the target ftm skill with restored context; does not modify project source files
|
|
180
|
+
- rollback: copy archived STATE.md back from archive if restoration was incorrect
|
|
181
|
+
|
|
182
|
+
## Approval Gates
|
|
183
|
+
|
|
184
|
+
- trigger: validation finds warnings (git drift, stale state, missing artifacts) | action: present consolidated validation summary and require user acknowledgment before proceeding
|
|
185
|
+
- trigger: validation finds block-level failure | action: stop and report failure; do not invoke target skill
|
|
186
|
+
- trigger: user provides new context along with "yes" | action: capture as post-pause update and inject into skill invocation
|
|
187
|
+
- complexity_routing: micro → auto | small → auto | medium → auto | large → auto | xl → auto
|
|
188
|
+
|
|
189
|
+
## Fallbacks
|
|
190
|
+
|
|
191
|
+
- condition: STATE.md not found | action: report "No saved ftm session found" with instructions for saving sessions
|
|
192
|
+
- condition: STATE.md frontmatter missing required fields | action: report validation failure with specific missing fields
|
|
193
|
+
- condition: multiple STATE.md files (STATE.md + STATE-*.md) | action: ask user which to resume, list each with skill type and timestamp
|
|
194
|
+
- condition: state is >7 days old | action: flag as potentially stale with warning, require user acknowledgment
|
|
195
|
+
|
|
196
|
+
## Capabilities
|
|
197
|
+
|
|
198
|
+
- cli: `git` | optional | branch and commit state validation
|
|
199
|
+
- env: none required
|
|
200
|
+
|
|
201
|
+
## Event Payloads
|
|
202
|
+
|
|
203
|
+
### session_resumed
|
|
204
|
+
- skill: string — "ftm-resume"
|
|
205
|
+
- resumed_skill: string — the ftm skill that was re-invoked
|
|
206
|
+
- phase: string — phase the session is resuming at
|
|
207
|
+
- state_age_hours: number — how long ago the session was paused
|
|
208
|
+
- post_pause_update: boolean — whether user provided new context
|
|
209
|
+
|
|
210
|
+
### task_completed
|
|
211
|
+
- skill: string — "ftm-resume"
|
|
212
|
+
- resumed_skill: string — the ftm skill re-invoked
|
|
213
|
+
- state_file_archived: string — path where STATE.md was archived
|
package/ftm-retro/SKILL.md
CHANGED
|
@@ -187,3 +187,57 @@ After completing, update:
|
|
|
187
187
|
2. Write experience file to `~/.claude/ftm-state/blackboard/experiences/YYYY-MM-DD_task-slug.json`
|
|
188
188
|
3. Update `experiences/index.json` with the new entry
|
|
189
189
|
4. Emit `task_completed`
|
|
190
|
+
|
|
191
|
+
## Requirements
|
|
192
|
+
|
|
193
|
+
- reference: `PROGRESS.md` | optional | executor progress log for auto-triggered mode
|
|
194
|
+
- reference: `~/.claude/ftm-retros/` | optional | prior retro files for pattern analysis
|
|
195
|
+
- reference: `references/protocols/SCORING-RUBRICS.md` | required | scoring scale breakpoints and evidence requirements
|
|
196
|
+
- reference: `references/templates/REPORT-FORMAT.md` | required | retro report output template
|
|
197
|
+
- reference: `~/.claude/ftm-state/blackboard/experiences/index.json` | optional | experience inventory for micro-reflection mode
|
|
198
|
+
- reference: `~/.claude/ftm-state/blackboard/patterns.json` | optional | pattern registry for promotion and decay
|
|
199
|
+
|
|
200
|
+
## Risk
|
|
201
|
+
|
|
202
|
+
- level: low_write
|
|
203
|
+
- scope: writes retro report to ~/.claude/ftm-retros/; writes experience files to blackboard; promotes patterns to patterns.json; does not modify project source files
|
|
204
|
+
- rollback: delete retro report file; remove experience entry from blackboard
|
|
205
|
+
|
|
206
|
+
## Approval Gates
|
|
207
|
+
|
|
208
|
+
- trigger: pattern promotion triggered (3+ matching experiences) | action: auto-promote to patterns.json without user gate (learning system behavior)
|
|
209
|
+
- complexity_routing: micro → auto | small → auto | medium → auto | large → auto | xl → auto
|
|
210
|
+
|
|
211
|
+
## Fallbacks
|
|
212
|
+
|
|
213
|
+
- condition: PROGRESS.md not found and manual mode | action: check ~/.claude/ftm-retros/ for most recent .md file; ask user which execution to review if multiple found
|
|
214
|
+
- condition: execution context not provided by ftm-executor | action: reconstruct from PROGRESS.md or ask user for context
|
|
215
|
+
- condition: scoring rubric file missing | action: apply built-in scoring heuristics from skill body
|
|
216
|
+
- condition: experiences/index.json has fewer than 10 entries | action: cold-start mode — record every task, set all confidence to low
|
|
217
|
+
|
|
218
|
+
## Capabilities
|
|
219
|
+
|
|
220
|
+
- env: none required
|
|
221
|
+
|
|
222
|
+
## Event Payloads
|
|
223
|
+
|
|
224
|
+
### experience_recorded
|
|
225
|
+
- skill: string — "ftm-retro"
|
|
226
|
+
- experience_path: string — path to written experience file
|
|
227
|
+
- task_type: string — type of task recorded
|
|
228
|
+
- outcome: string — success | partial | failure
|
|
229
|
+
- confidence: string — low | medium | high
|
|
230
|
+
|
|
231
|
+
### pattern_discovered
|
|
232
|
+
- skill: string — "ftm-retro"
|
|
233
|
+
- pattern_name: string — name of the promoted pattern
|
|
234
|
+
- category: string — codebase_insights | execution_patterns | user_behavior | recurring_issues
|
|
235
|
+
- occurrence_count: number — number of experiences that triggered promotion
|
|
236
|
+
- confidence: string — low | medium | high
|
|
237
|
+
|
|
238
|
+
### task_completed
|
|
239
|
+
- skill: string — "ftm-retro"
|
|
240
|
+
- report_path: string — absolute path to saved retro report
|
|
241
|
+
- overall_score: number — total score out of 50
|
|
242
|
+
- top_issue: string — most impactful bottleneck identified
|
|
243
|
+
- patterns_promoted: number — new patterns added to patterns.json
|
package/ftm-routine/SKILL.md
CHANGED
|
@@ -132,3 +132,39 @@ Create accounts → set permissions → send welcome email → schedule onboardi
|
|
|
132
132
|
|
|
133
133
|
### incident-response
|
|
134
134
|
Check Sentry → check logs → notify channel → create Jira ticket → start investigation
|
|
135
|
+
|
|
136
|
+
## Requirements
|
|
137
|
+
|
|
138
|
+
- reference: `~/.ftm/routines/` | required | YAML routine definitions directory
|
|
139
|
+
- config: `~/.claude/ftm-config.yml` | optional | model preferences for skill-type steps
|
|
140
|
+
|
|
141
|
+
## Risk
|
|
142
|
+
|
|
143
|
+
- level: medium_write
|
|
144
|
+
- scope: executes MCP tool calls, skill invocations, and bash commands as defined by the routine; external-facing mutations depend entirely on routine definition; approval gates in the routine control which steps require user confirmation
|
|
145
|
+
- rollback: depends on individual routine steps; steps with approval: approve gate let user review before execution; MCP writes (Jira, Slack, email) may not be reversible
|
|
146
|
+
|
|
147
|
+
## Approval Gates
|
|
148
|
+
|
|
149
|
+
- trigger: routine step with approval: approve | action: show plan for that step and wait for "go" before executing
|
|
150
|
+
- trigger: routine step with approval: review | action: execute step, show results, wait for "continue" or "stop"
|
|
151
|
+
- trigger: routine step with approval: none | action: execute automatically and show results
|
|
152
|
+
- complexity_routing: micro → auto | small → auto | medium → plan_first (show full routine plan first) | large → plan_first | xl → always_ask
|
|
153
|
+
|
|
154
|
+
## Fallbacks
|
|
155
|
+
|
|
156
|
+
- condition: routine YAML file not found | action: show "Routine not found" with list of available routines from ~/.ftm/routines/
|
|
157
|
+
- condition: MCP tool referenced in routine not available | action: report unavailable tool, ask user whether to skip that step or abort
|
|
158
|
+
- condition: skill referenced in routine not available | action: report unavailable skill, ask user whether to skip or abort
|
|
159
|
+
- condition: bash command in step fails with non-zero exit | action: report failure output, ask user whether to continue or abort
|
|
160
|
+
|
|
161
|
+
## Capabilities
|
|
162
|
+
|
|
163
|
+
- mcp: various | optional | determined by individual routine definitions
|
|
164
|
+
- cli: various | optional | bash steps in routine definitions
|
|
165
|
+
- env: none required directly
|
|
166
|
+
|
|
167
|
+
## Event Payloads
|
|
168
|
+
|
|
169
|
+
### (none)
|
|
170
|
+
ftm-routine does not emit its own events. Events are emitted by the MCPs and skills invoked during routine execution.
|