feed-the-machine 1.6.1 → 1.7.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/LICENSE +21 -21
- package/README.md +170 -170
- package/bin/brain.py +1340 -0
- package/bin/convert_claude_skills_to_codex.py +490 -0
- package/bin/generate-manifest.mjs +463 -463
- package/bin/harden_codex_skills.py +141 -0
- package/bin/install.mjs +491 -491
- package/bin/migrate-eng-buddy-data.py +875 -0
- package/bin/playbook_engine/__init__.py +1 -0
- package/bin/playbook_engine/conftest.py +8 -0
- package/bin/playbook_engine/extractor.py +33 -0
- package/bin/playbook_engine/manager.py +102 -0
- package/bin/playbook_engine/models.py +84 -0
- package/bin/playbook_engine/registry.py +35 -0
- package/bin/playbook_engine/test_extractor.py +72 -0
- package/bin/playbook_engine/test_integration.py +129 -0
- package/bin/playbook_engine/test_manager.py +85 -0
- package/bin/playbook_engine/test_models.py +166 -0
- package/bin/playbook_engine/test_registry.py +67 -0
- package/bin/playbook_engine/test_tracer.py +86 -0
- package/bin/playbook_engine/tracer.py +93 -0
- package/bin/tasks_db.py +456 -0
- package/docs/HOOKS.md +243 -243
- package/docs/INBOX.md +233 -233
- package/ftm/SKILL.md +125 -122
- package/ftm-audit/SKILL.md +623 -623
- package/ftm-audit/references/protocols/PROJECT-PATTERNS.md +91 -91
- package/ftm-audit/references/protocols/RUNTIME-WIRING.md +66 -66
- package/ftm-audit/references/protocols/WIRING-CONTRACTS.md +135 -135
- package/ftm-audit/references/strategies/AUTO-FIX-STRATEGIES.md +69 -69
- package/ftm-audit/references/templates/REPORT-FORMAT.md +96 -96
- package/ftm-audit/scripts/run-knip.sh +23 -23
- package/ftm-audit.yml +2 -2
- package/ftm-brainstorm/SKILL.md +1003 -498
- package/ftm-brainstorm/evals/evals.json +180 -100
- package/ftm-brainstorm/evals/promptfoo.yaml +109 -109
- package/ftm-brainstorm/references/agent-prompts.md +552 -224
- package/ftm-brainstorm/references/plan-template.md +209 -121
- package/ftm-brainstorm.yml +2 -2
- package/ftm-browse/SKILL.md +454 -454
- package/ftm-browse/daemon/browser-manager.ts +206 -206
- package/ftm-browse/daemon/bun.lock +30 -30
- package/ftm-browse/daemon/cli.ts +347 -347
- package/ftm-browse/daemon/commands.ts +410 -410
- package/ftm-browse/daemon/main.ts +357 -357
- package/ftm-browse/daemon/package.json +17 -17
- package/ftm-browse/daemon/server.ts +189 -189
- package/ftm-browse/daemon/snapshot.ts +519 -519
- package/ftm-browse/daemon/tsconfig.json +22 -22
- package/ftm-browse.yml +4 -4
- package/ftm-capture/SKILL.md +370 -370
- package/ftm-capture.yml +4 -4
- package/ftm-codex-gate/SKILL.md +361 -361
- package/ftm-codex-gate.yml +2 -2
- package/ftm-config/SKILL.md +422 -345
- package/ftm-config.default.yml +125 -82
- package/ftm-config.yml +44 -2
- package/ftm-council/SKILL.md +416 -416
- package/ftm-council/references/prompts/CLAUDE-INVESTIGATION.md +60 -60
- package/ftm-council/references/prompts/CODEX-INVESTIGATION.md +58 -58
- package/ftm-council/references/prompts/GEMINI-INVESTIGATION.md +58 -58
- package/ftm-council/references/prompts/REBUTTAL-TEMPLATE.md +57 -57
- package/ftm-council/references/protocols/PREREQUISITES.md +47 -47
- package/ftm-council/references/protocols/STEP-0-FRAMING.md +46 -46
- package/ftm-council.yml +2 -2
- package/ftm-dashboard/SKILL.md +163 -163
- package/ftm-dashboard.yml +4 -4
- package/ftm-debug/SKILL.md +1037 -1037
- package/ftm-debug/references/phases/PHASE-0-INTAKE.md +58 -58
- package/ftm-debug/references/phases/PHASE-1-TRIAGE.md +46 -46
- package/ftm-debug/references/phases/PHASE-2-WAR-ROOM-AGENTS.md +279 -279
- package/ftm-debug/references/phases/PHASE-3-TO-6-EXECUTION.md +436 -436
- package/ftm-debug/references/protocols/BLACKBOARD.md +86 -86
- package/ftm-debug/references/protocols/EDGE-CASES.md +103 -103
- package/ftm-debug.yml +2 -2
- package/ftm-diagram/SKILL.md +277 -277
- package/ftm-diagram.yml +2 -2
- package/ftm-executor/SKILL.md +777 -777
- package/ftm-executor/references/STYLE-TEMPLATE.md +73 -73
- package/ftm-executor/references/phases/PHASE-0-VERIFICATION.md +62 -62
- package/ftm-executor/references/phases/PHASE-2-AGENT-ASSEMBLY.md +34 -34
- package/ftm-executor/references/phases/PHASE-3-WORKTREES.md +38 -38
- package/ftm-executor/references/phases/PHASE-4-5-AUDIT.md +72 -72
- package/ftm-executor/references/phases/PHASE-4-DISPATCH.md +66 -66
- package/ftm-executor/references/phases/PHASE-5-5-CODEX-GATE.md +73 -73
- package/ftm-executor/references/protocols/DOCUMENTATION-BOOTSTRAP.md +36 -36
- package/ftm-executor/references/protocols/MODEL-PROFILE.md +59 -59
- package/ftm-executor/references/protocols/PROGRESS-TRACKING.md +66 -66
- package/ftm-executor/runtime/ftm-runtime.mjs +252 -252
- package/ftm-executor/runtime/package.json +8 -8
- package/ftm-executor.yml +2 -2
- package/ftm-git/SKILL.md +441 -441
- package/ftm-git/evals/evals.json +26 -26
- package/ftm-git/evals/promptfoo.yaml +75 -75
- package/ftm-git/hooks/post-commit-experience.sh +92 -92
- package/ftm-git/references/patterns/SECRET-PATTERNS.md +104 -104
- package/ftm-git/references/protocols/REMEDIATION.md +139 -139
- package/ftm-git/scripts/pre-commit-secrets.sh +110 -110
- package/ftm-git.yml +2 -2
- package/ftm-inbox/backend/__pycache__/main.cpython-314.pyc +0 -0
- package/ftm-inbox/backend/adapters/_retry.py +64 -64
- package/ftm-inbox/backend/adapters/base.py +230 -230
- package/ftm-inbox/backend/adapters/freshservice.py +104 -104
- package/ftm-inbox/backend/adapters/gmail.py +125 -125
- package/ftm-inbox/backend/adapters/jira.py +136 -136
- package/ftm-inbox/backend/adapters/registry.py +192 -192
- package/ftm-inbox/backend/adapters/slack.py +110 -110
- package/ftm-inbox/backend/db/connection.py +54 -54
- package/ftm-inbox/backend/db/schema.py +78 -78
- package/ftm-inbox/backend/executor/__init__.py +7 -7
- package/ftm-inbox/backend/executor/engine.py +149 -149
- package/ftm-inbox/backend/executor/step_runner.py +98 -98
- package/ftm-inbox/backend/main.py +103 -103
- package/ftm-inbox/backend/models/__init__.py +1 -1
- package/ftm-inbox/backend/models/unified_task.py +36 -36
- package/ftm-inbox/backend/planner/__init__.py +6 -6
- package/ftm-inbox/backend/planner/__pycache__/__init__.cpython-314.pyc +0 -0
- package/ftm-inbox/backend/planner/__pycache__/generator.cpython-314.pyc +0 -0
- package/ftm-inbox/backend/planner/__pycache__/schema.cpython-314.pyc +0 -0
- package/ftm-inbox/backend/planner/generator.py +127 -127
- package/ftm-inbox/backend/planner/schema.py +34 -34
- package/ftm-inbox/backend/requirements.txt +5 -5
- package/ftm-inbox/backend/routes/__pycache__/plan.cpython-314.pyc +0 -0
- package/ftm-inbox/backend/routes/execute.py +186 -186
- package/ftm-inbox/backend/routes/health.py +52 -52
- package/ftm-inbox/backend/routes/inbox.py +68 -68
- package/ftm-inbox/backend/routes/plan.py +271 -271
- package/ftm-inbox/bin/launchagent.mjs +91 -91
- package/ftm-inbox/bin/setup.mjs +188 -188
- package/ftm-inbox/bin/start.sh +10 -10
- package/ftm-inbox/bin/status.sh +17 -17
- package/ftm-inbox/bin/stop.sh +8 -8
- package/ftm-inbox/config.example.yml +55 -55
- package/ftm-inbox/package-lock.json +2898 -2898
- package/ftm-inbox/package.json +26 -26
- package/ftm-inbox/postcss.config.js +6 -6
- package/ftm-inbox/src/app.css +199 -199
- package/ftm-inbox/src/app.html +18 -18
- package/ftm-inbox/src/lib/api.ts +166 -166
- package/ftm-inbox/src/lib/components/ExecutionLog.svelte +81 -81
- package/ftm-inbox/src/lib/components/InboxFeed.svelte +143 -143
- package/ftm-inbox/src/lib/components/PlanStep.svelte +271 -271
- package/ftm-inbox/src/lib/components/PlanView.svelte +206 -206
- package/ftm-inbox/src/lib/components/StreamPanel.svelte +99 -99
- package/ftm-inbox/src/lib/components/TaskCard.svelte +190 -190
- package/ftm-inbox/src/lib/components/ui/EmptyState.svelte +63 -63
- package/ftm-inbox/src/lib/components/ui/KawaiiCard.svelte +86 -86
- package/ftm-inbox/src/lib/components/ui/PillButton.svelte +106 -106
- package/ftm-inbox/src/lib/components/ui/StatusBadge.svelte +67 -67
- package/ftm-inbox/src/lib/components/ui/StreamDrawer.svelte +149 -149
- package/ftm-inbox/src/lib/components/ui/ThemeToggle.svelte +80 -80
- package/ftm-inbox/src/lib/theme.ts +47 -47
- package/ftm-inbox/src/routes/+layout.svelte +76 -76
- package/ftm-inbox/src/routes/+page.svelte +401 -401
- package/ftm-inbox/svelte.config.js +12 -12
- package/ftm-inbox/tailwind.config.ts +63 -63
- package/ftm-inbox/tsconfig.json +13 -13
- package/ftm-inbox/vite.config.ts +6 -6
- package/ftm-intent/SKILL.md +241 -241
- package/ftm-intent.yml +2 -2
- package/ftm-manifest.json +3794 -3794
- package/ftm-map/SKILL.md +291 -291
- package/ftm-map/scripts/db.py +712 -712
- package/ftm-map/scripts/index.py +415 -415
- package/ftm-map/scripts/parser.py +224 -224
- package/ftm-map/scripts/queries/go-tags.scm +20 -20
- package/ftm-map/scripts/queries/javascript-tags.scm +35 -35
- package/ftm-map/scripts/queries/python-tags.scm +31 -31
- package/ftm-map/scripts/queries/ruby-tags.scm +19 -19
- package/ftm-map/scripts/queries/rust-tags.scm +37 -37
- package/ftm-map/scripts/queries/typescript-tags.scm +41 -41
- package/ftm-map/scripts/query.py +301 -301
- package/ftm-map/scripts/ranker.py +377 -377
- package/ftm-map/scripts/requirements.txt +5 -5
- package/ftm-map/scripts/setup-hooks.sh +27 -27
- package/ftm-map/scripts/setup.sh +56 -56
- package/ftm-map/scripts/test_db.py +364 -364
- package/ftm-map/scripts/test_parser.py +174 -174
- package/ftm-map/scripts/test_query.py +183 -183
- package/ftm-map/scripts/test_ranker.py +199 -199
- package/ftm-map/scripts/views.py +591 -591
- package/ftm-map.yml +2 -2
- package/ftm-mind/SKILL.md +201 -1943
- package/ftm-mind/evals/promptfoo.yaml +142 -142
- package/ftm-mind/references/blackboard-protocol.md +110 -0
- package/ftm-mind/references/blackboard-schema.md +328 -328
- package/ftm-mind/references/complexity-guide.md +110 -110
- package/ftm-mind/references/complexity-sizing.md +138 -0
- package/ftm-mind/references/decide-act-protocol.md +172 -0
- package/ftm-mind/references/direct-execution.md +51 -0
- package/ftm-mind/references/environment-discovery.md +77 -0
- package/ftm-mind/references/event-registry.md +319 -319
- package/ftm-mind/references/mcp-inventory.md +300 -296
- package/ftm-mind/references/ops-routing.md +47 -0
- package/ftm-mind/references/orient-protocol.md +234 -0
- package/ftm-mind/references/personality.md +40 -0
- package/ftm-mind/references/protocols/COMPLEXITY-SIZING.md +72 -72
- package/ftm-mind/references/protocols/MCP-HEURISTICS.md +32 -32
- package/ftm-mind/references/protocols/PLAN-APPROVAL.md +80 -80
- package/ftm-mind/references/reflexion-protocol.md +249 -249
- package/ftm-mind/references/routing/SCENARIOS.md +22 -22
- package/ftm-mind/references/routing-scenarios.md +35 -35
- package/ftm-mind.yml +2 -2
- package/ftm-ops.yml +4 -0
- package/ftm-pause/SKILL.md +395 -395
- package/ftm-pause/references/protocols/SKILL-RESTORE-PROTOCOLS.md +186 -186
- package/ftm-pause/references/protocols/VALIDATION.md +80 -80
- package/ftm-pause.yml +2 -2
- package/ftm-researcher/SKILL.md +275 -275
- package/ftm-researcher/evals/agent-diversity.yaml +17 -17
- package/ftm-researcher/evals/synthesis-quality.yaml +12 -12
- package/ftm-researcher/evals/trigger-accuracy.yaml +39 -39
- package/ftm-researcher/references/adaptive-search.md +116 -116
- package/ftm-researcher/references/agent-prompts.md +193 -193
- package/ftm-researcher/references/council-integration.md +193 -193
- package/ftm-researcher/references/output-format.md +203 -203
- package/ftm-researcher/references/synthesis-pipeline.md +165 -165
- package/ftm-researcher/scripts/score_credibility.py +234 -234
- package/ftm-researcher/scripts/validate_research.py +92 -92
- package/ftm-researcher.yml +2 -2
- package/ftm-resume/SKILL.md +518 -518
- package/ftm-resume/references/protocols/VALIDATION.md +172 -172
- package/ftm-resume.yml +2 -2
- package/ftm-retro/SKILL.md +380 -380
- package/ftm-retro/references/protocols/SCORING-RUBRICS.md +89 -89
- package/ftm-retro/references/templates/REPORT-FORMAT.md +109 -109
- package/ftm-retro.yml +2 -2
- package/ftm-routine/SKILL.md +170 -170
- package/ftm-routine.yml +4 -4
- package/ftm-state/blackboard/capabilities.json +5 -5
- package/ftm-state/blackboard/capabilities.schema.json +27 -27
- package/ftm-state/blackboard/context.json +37 -23
- package/ftm-state/blackboard/experiences/doom-statusline-fix.json +26 -0
- package/ftm-state/blackboard/experiences/hackathon-pages-site.json +26 -0
- package/ftm-state/blackboard/experiences/hindsight-sso-kickoff.json +42 -0
- package/ftm-state/blackboard/experiences/index.json +58 -9
- package/ftm-state/blackboard/experiences/learning-ragnarok-api-access.json +23 -0
- package/ftm-state/blackboard/experiences/nordlayer-members-auto-assign.json +26 -0
- package/ftm-state/blackboard/experiences/saml2aws-stale-session-fix.json +41 -0
- package/ftm-state/blackboard/patterns.json +6 -6
- package/ftm-state/schemas/context.schema.json +130 -130
- package/ftm-state/schemas/experience-index.schema.json +77 -77
- package/ftm-state/schemas/experience.schema.json +78 -78
- package/ftm-state/schemas/patterns.schema.json +44 -44
- package/ftm-upgrade/SKILL.md +194 -194
- package/ftm-upgrade/scripts/check-version.sh +76 -76
- package/ftm-upgrade/scripts/upgrade.sh +143 -143
- package/ftm-upgrade.yml +2 -2
- package/ftm-verify.yml +2 -2
- package/ftm.yml +2 -2
- package/hooks/ftm-auto-log.sh +137 -0
- package/hooks/ftm-blackboard-enforcer.sh +93 -93
- package/hooks/ftm-discovery-reminder.sh +90 -90
- package/hooks/ftm-drafts-gate.sh +61 -61
- package/hooks/ftm-event-logger.mjs +107 -107
- package/hooks/ftm-install-hooks.sh +240 -0
- package/hooks/ftm-learning-capture.sh +117 -0
- package/hooks/ftm-map-autodetect.sh +79 -79
- package/hooks/ftm-pending-sync-check.sh +22 -22
- package/hooks/ftm-plan-gate.sh +92 -92
- package/hooks/ftm-post-commit-trigger.sh +57 -57
- package/hooks/ftm-post-compaction.sh +138 -0
- package/hooks/ftm-pre-compaction.sh +147 -0
- package/hooks/ftm-session-end.sh +52 -0
- package/hooks/ftm-session-snapshot.sh +213 -0
- package/hooks/settings-template.json +81 -81
- package/install.sh +363 -363
- package/package.json +84 -84
- package/uninstall.sh +25 -25
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
# Complexity Sizing Guide
|
|
2
|
-
|
|
3
|
-
Orient must size tasks from observed evidence, not vibes. Use these tiers.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Micro — `just do it`
|
|
8
|
-
|
|
9
|
-
**Signals:**
|
|
10
|
-
- one coherent local action
|
|
11
|
-
- trivial blast radius
|
|
12
|
-
- rollback is obvious
|
|
13
|
-
- no meaningful uncertainty
|
|
14
|
-
- no dedicated verification step needed
|
|
15
|
-
|
|
16
|
-
**Typical examples:**
|
|
17
|
-
- rename a variable
|
|
18
|
-
- fix a typo
|
|
19
|
-
- answer a factual question after one read
|
|
20
|
-
- add an import
|
|
21
|
-
- tweak a comment
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Small — `do + test`
|
|
26
|
-
|
|
27
|
-
**Signals:**
|
|
28
|
-
- 1-3 files
|
|
29
|
-
- one concern
|
|
30
|
-
- clear done state
|
|
31
|
-
- at least one verification step is warranted
|
|
32
|
-
- still reversible without planning overhead
|
|
33
|
-
|
|
34
|
-
**Typical examples:**
|
|
35
|
-
- implement a simple helper
|
|
36
|
-
- patch a bug in one area
|
|
37
|
-
- add or update a focused test
|
|
38
|
-
- update docs plus one code path
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Medium — `lightweight plan`
|
|
43
|
-
|
|
44
|
-
**Signals:**
|
|
45
|
-
- multiple changes with ordering
|
|
46
|
-
- moderate uncertainty
|
|
47
|
-
- multi-file or multi-step
|
|
48
|
-
- a bug or feature spans layers but not a full program of work
|
|
49
|
-
- benefits from an explicit short plan before execution
|
|
50
|
-
|
|
51
|
-
**Typical examples:**
|
|
52
|
-
- fix a flaky test with several hypotheses
|
|
53
|
-
- add UI + API + tests for one feature
|
|
54
|
-
- refactor a module with dependent updates
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Large — `brainstorm + plan + executor`
|
|
59
|
-
|
|
60
|
-
**Signals:**
|
|
61
|
-
- cross-domain work
|
|
62
|
-
- major uncertainty or architectural choice
|
|
63
|
-
- a plan document already exists
|
|
64
|
-
- many files or multiple independent workstreams
|
|
65
|
-
- would benefit from orchestration, parallel execution, or audit passes
|
|
66
|
-
|
|
67
|
-
**Typical examples:**
|
|
68
|
-
- build a feature from scratch
|
|
69
|
-
- implement a long plan doc
|
|
70
|
-
- re-architect a subsystem
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Boundary: where micro ends and small begins
|
|
75
|
-
|
|
76
|
-
Micro ends the moment any of these become true:
|
|
77
|
-
|
|
78
|
-
- more than one meaningful edit is required
|
|
79
|
-
- a test or build check is needed to trust the change
|
|
80
|
-
- the correct change is not self-evident
|
|
81
|
-
- the blast radius is larger than the immediate line or local block
|
|
82
|
-
|
|
83
|
-
If it needs verification or carries plausible regression risk, it is at least small.
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## ADaPT Rule
|
|
88
|
-
|
|
89
|
-
Try the simpler tier first.
|
|
90
|
-
|
|
91
|
-
- If it looks small, start small.
|
|
92
|
-
- If it looks medium, see whether a small direct pass resolves it.
|
|
93
|
-
- If it looks large, ask whether a medium plan-plus-execute path is enough before invoking full orchestration.
|
|
94
|
-
|
|
95
|
-
Escalate only when:
|
|
96
|
-
- the simple approach fails
|
|
97
|
-
- the user explicitly asks for the larger workflow
|
|
98
|
-
- the complexity is obvious from the start
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Research Tasks
|
|
103
|
-
|
|
104
|
-
Research tasks don't follow the micro/small/medium/large sizing — they route directly
|
|
105
|
-
to ftm-researcher regardless of complexity. The researcher's mode system (quick/standard/deep)
|
|
106
|
-
handles the depth calibration internally.
|
|
107
|
-
|
|
108
|
-
If a research request also implies implementation ("research X and then build it"),
|
|
109
|
-
orient as a multi-phase workflow: research first (ftm-researcher), then plan (ftm-brainstorm
|
|
110
|
-
or direct), then execute (ftm-executor).
|
|
1
|
+
# Complexity Sizing Guide
|
|
2
|
+
|
|
3
|
+
Orient must size tasks from observed evidence, not vibes. Use these tiers.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Micro — `just do it`
|
|
8
|
+
|
|
9
|
+
**Signals:**
|
|
10
|
+
- one coherent local action
|
|
11
|
+
- trivial blast radius
|
|
12
|
+
- rollback is obvious
|
|
13
|
+
- no meaningful uncertainty
|
|
14
|
+
- no dedicated verification step needed
|
|
15
|
+
|
|
16
|
+
**Typical examples:**
|
|
17
|
+
- rename a variable
|
|
18
|
+
- fix a typo
|
|
19
|
+
- answer a factual question after one read
|
|
20
|
+
- add an import
|
|
21
|
+
- tweak a comment
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Small — `do + test`
|
|
26
|
+
|
|
27
|
+
**Signals:**
|
|
28
|
+
- 1-3 files
|
|
29
|
+
- one concern
|
|
30
|
+
- clear done state
|
|
31
|
+
- at least one verification step is warranted
|
|
32
|
+
- still reversible without planning overhead
|
|
33
|
+
|
|
34
|
+
**Typical examples:**
|
|
35
|
+
- implement a simple helper
|
|
36
|
+
- patch a bug in one area
|
|
37
|
+
- add or update a focused test
|
|
38
|
+
- update docs plus one code path
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Medium — `lightweight plan`
|
|
43
|
+
|
|
44
|
+
**Signals:**
|
|
45
|
+
- multiple changes with ordering
|
|
46
|
+
- moderate uncertainty
|
|
47
|
+
- multi-file or multi-step
|
|
48
|
+
- a bug or feature spans layers but not a full program of work
|
|
49
|
+
- benefits from an explicit short plan before execution
|
|
50
|
+
|
|
51
|
+
**Typical examples:**
|
|
52
|
+
- fix a flaky test with several hypotheses
|
|
53
|
+
- add UI + API + tests for one feature
|
|
54
|
+
- refactor a module with dependent updates
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Large — `brainstorm + plan + executor`
|
|
59
|
+
|
|
60
|
+
**Signals:**
|
|
61
|
+
- cross-domain work
|
|
62
|
+
- major uncertainty or architectural choice
|
|
63
|
+
- a plan document already exists
|
|
64
|
+
- many files or multiple independent workstreams
|
|
65
|
+
- would benefit from orchestration, parallel execution, or audit passes
|
|
66
|
+
|
|
67
|
+
**Typical examples:**
|
|
68
|
+
- build a feature from scratch
|
|
69
|
+
- implement a long plan doc
|
|
70
|
+
- re-architect a subsystem
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Boundary: where micro ends and small begins
|
|
75
|
+
|
|
76
|
+
Micro ends the moment any of these become true:
|
|
77
|
+
|
|
78
|
+
- more than one meaningful edit is required
|
|
79
|
+
- a test or build check is needed to trust the change
|
|
80
|
+
- the correct change is not self-evident
|
|
81
|
+
- the blast radius is larger than the immediate line or local block
|
|
82
|
+
|
|
83
|
+
If it needs verification or carries plausible regression risk, it is at least small.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## ADaPT Rule
|
|
88
|
+
|
|
89
|
+
Try the simpler tier first.
|
|
90
|
+
|
|
91
|
+
- If it looks small, start small.
|
|
92
|
+
- If it looks medium, see whether a small direct pass resolves it.
|
|
93
|
+
- If it looks large, ask whether a medium plan-plus-execute path is enough before invoking full orchestration.
|
|
94
|
+
|
|
95
|
+
Escalate only when:
|
|
96
|
+
- the simple approach fails
|
|
97
|
+
- the user explicitly asks for the larger workflow
|
|
98
|
+
- the complexity is obvious from the start
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Research Tasks
|
|
103
|
+
|
|
104
|
+
Research tasks don't follow the micro/small/medium/large sizing — they route directly
|
|
105
|
+
to ftm-researcher regardless of complexity. The researcher's mode system (quick/standard/deep)
|
|
106
|
+
handles the depth calibration internally.
|
|
107
|
+
|
|
108
|
+
If a research request also implies implementation ("research X and then build it"),
|
|
109
|
+
orient as a multi-phase workflow: research first (ftm-researcher), then plan (ftm-brainstorm
|
|
110
|
+
or direct), then execute (ftm-executor).
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Complexity Sizing
|
|
2
|
+
|
|
3
|
+
Size the task from observed evidence, not vibes.
|
|
4
|
+
|
|
5
|
+
## Micro
|
|
6
|
+
|
|
7
|
+
`just do it`
|
|
8
|
+
|
|
9
|
+
Signals:
|
|
10
|
+
|
|
11
|
+
- one coherent local action
|
|
12
|
+
- trivial blast radius
|
|
13
|
+
- rollback is obvious
|
|
14
|
+
- no meaningful uncertainty
|
|
15
|
+
- no dedicated verification step needed
|
|
16
|
+
|
|
17
|
+
Typical examples:
|
|
18
|
+
|
|
19
|
+
- rename a variable
|
|
20
|
+
- fix a typo
|
|
21
|
+
- answer a factual question after one read
|
|
22
|
+
- add an import
|
|
23
|
+
- tweak a comment
|
|
24
|
+
|
|
25
|
+
## Small
|
|
26
|
+
|
|
27
|
+
`do + test`
|
|
28
|
+
|
|
29
|
+
Signals:
|
|
30
|
+
|
|
31
|
+
- 1-3 files
|
|
32
|
+
- one concern
|
|
33
|
+
- clear done state
|
|
34
|
+
- at least one verification step is warranted
|
|
35
|
+
- still reversible without planning overhead
|
|
36
|
+
|
|
37
|
+
Typical examples:
|
|
38
|
+
|
|
39
|
+
- implement a simple helper
|
|
40
|
+
- patch a bug in one area
|
|
41
|
+
- add or update a focused test
|
|
42
|
+
- update docs plus one code path
|
|
43
|
+
|
|
44
|
+
## Medium
|
|
45
|
+
|
|
46
|
+
`lightweight plan`
|
|
47
|
+
|
|
48
|
+
Signals:
|
|
49
|
+
|
|
50
|
+
- multiple changes with ordering
|
|
51
|
+
- moderate uncertainty
|
|
52
|
+
- multi-file or multi-step
|
|
53
|
+
- a bug or feature spans layers but not a full program of work
|
|
54
|
+
- benefits from an explicit short plan before execution
|
|
55
|
+
|
|
56
|
+
**Forced medium escalation** — if ANY of these are true, the task is medium at minimum regardless of how simple it feels:
|
|
57
|
+
|
|
58
|
+
- touches more than 3 files
|
|
59
|
+
- modifies automation, CI/CD, or infrastructure code
|
|
60
|
+
- involves external system changes (Jira, Slack, Freshservice, calendar, email)
|
|
61
|
+
- requires coordinating with other people (drafting messages, checking with stakeholders)
|
|
62
|
+
- changes routing, integration, or cross-system references (API endpoints, project keys, board IDs)
|
|
63
|
+
- the codebase being changed is unfamiliar or hasn't been read yet this session
|
|
64
|
+
- the task involves both code changes AND communication/coordination
|
|
65
|
+
- **calls any production API that creates, updates, or deletes resources** (Okta, Freshservice, AWS, any external service with real consequences)
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
**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.
|
|
70
|
+
|
|
71
|
+
Typical examples:
|
|
72
|
+
|
|
73
|
+
- fix a flaky test with several hypotheses
|
|
74
|
+
- add UI + API + tests for one feature
|
|
75
|
+
- refactor a module with dependent updates
|
|
76
|
+
- reroute an automation from one Jira project to another
|
|
77
|
+
- update references across a codebase after a system migration
|
|
78
|
+
- change API integration endpoints or credentials
|
|
79
|
+
|
|
80
|
+
## Large
|
|
81
|
+
|
|
82
|
+
`brainstorm + plan + executor`
|
|
83
|
+
|
|
84
|
+
Signals:
|
|
85
|
+
|
|
86
|
+
- cross-domain work
|
|
87
|
+
- major uncertainty or architectural choice
|
|
88
|
+
- a plan document already exists
|
|
89
|
+
- many files or multiple independent workstreams
|
|
90
|
+
- would benefit from orchestration, parallel execution, or audit passes
|
|
91
|
+
|
|
92
|
+
Typical examples:
|
|
93
|
+
|
|
94
|
+
- build a feature from scratch
|
|
95
|
+
- implement a long plan doc
|
|
96
|
+
- re-architect a subsystem
|
|
97
|
+
|
|
98
|
+
## Boundary: where micro ends and small begins
|
|
99
|
+
|
|
100
|
+
Micro ends the moment any of these become true:
|
|
101
|
+
|
|
102
|
+
- more than one meaningful edit is required
|
|
103
|
+
- a test or build check is needed to trust the change
|
|
104
|
+
- the correct change is not self-evident
|
|
105
|
+
- the blast radius is larger than the immediate line or local block
|
|
106
|
+
|
|
107
|
+
That is the boundary. If it needs verification or carries plausible regression risk, it is at least small.
|
|
108
|
+
|
|
109
|
+
## Boundary: where small ends and medium begins
|
|
110
|
+
|
|
111
|
+
Small ends the moment any of these become true:
|
|
112
|
+
|
|
113
|
+
- more than 3 files will be touched
|
|
114
|
+
- external systems are involved (Jira, Slack, email, calendar, Freshservice, APIs)
|
|
115
|
+
- the task requires reading and understanding unfamiliar code before changing it
|
|
116
|
+
- changes span multiple concerns (code + communication, automation + configuration)
|
|
117
|
+
- there are ordering dependencies between the changes
|
|
118
|
+
- the user mentioned coordination with other people
|
|
119
|
+
- the change affects routing, integration points, or cross-system references
|
|
120
|
+
|
|
121
|
+
That is the boundary. If external systems are involved or the user needs to see the plan before you execute, it is at least medium. This boundary is not optional — do not downsize past it.
|
|
122
|
+
|
|
123
|
+
## ADaPT rule
|
|
124
|
+
|
|
125
|
+
Try the simpler tier first — but never downsize past a forced boundary.
|
|
126
|
+
|
|
127
|
+
- If it looks small and no forced-medium signals are present, start small.
|
|
128
|
+
- If it looks medium and no forced-large signals are present, try medium.
|
|
129
|
+
- If it looks large, ask whether a medium plan-plus-execute path is enough before invoking full orchestration.
|
|
130
|
+
|
|
131
|
+
**Critical constraint**: ADaPT allows you to *start* at a simpler tier and escalate if needed. It does NOT allow you to skip the plan approval gate when `approval_mode` is `plan_first` and forced escalation signals are present. If forced-medium signals fired during sizing, you must present a plan — ADaPT cannot override that.
|
|
132
|
+
|
|
133
|
+
Escalate when:
|
|
134
|
+
|
|
135
|
+
- the simple approach fails
|
|
136
|
+
- the user explicitly asks for the larger workflow
|
|
137
|
+
- the complexity is obvious from the start
|
|
138
|
+
- forced escalation signals are present (see Medium and Large sections above)
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Decide + Act Protocol
|
|
2
|
+
|
|
3
|
+
## Decide
|
|
4
|
+
|
|
5
|
+
Decide turns the orientation model into one concrete next move.
|
|
6
|
+
|
|
7
|
+
### 1. Choose the smallest correct execution mode
|
|
8
|
+
|
|
9
|
+
- `micro` -> direct action
|
|
10
|
+
- `small` -> pre-flight summary, then direct action plus verification
|
|
11
|
+
- `medium` -> numbered plan, wait for approval, then execute
|
|
12
|
+
- `large` -> `ftm-brainstorm` if no plan exists, or `ftm-executor` if a plan exists
|
|
13
|
+
|
|
14
|
+
**Double-check before committing to a size**: Re-read the forced escalation signals from the Complexity Sizing reference. If any forced-medium signals fired, the task is medium regardless of how it feels.
|
|
15
|
+
|
|
16
|
+
### 1.5 Interactive Plan Approval
|
|
17
|
+
|
|
18
|
+
Read `~/.claude/ftm-config.yml` field `execution.approval_mode`. This controls whether the user sees and approves the plan before execution begins.
|
|
19
|
+
|
|
20
|
+
#### Mode: `auto` (default legacy behavior)
|
|
21
|
+
Skip this section entirely. Execute as before — micro/small just go, medium outlines steps and executes, large routes to brainstorm/executor.
|
|
22
|
+
|
|
23
|
+
#### Mode: `plan_first` (recommended for collaborative work)
|
|
24
|
+
|
|
25
|
+
**For small tasks**: Show a brief pre-flight summary before executing. Not a formal gate — just visibility:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Quick summary before I start:
|
|
29
|
+
- Read [file] to understand current behavior
|
|
30
|
+
- Change [X] to [Y] in [file]
|
|
31
|
+
- Verify: [test/lint/manual check]
|
|
32
|
+
|
|
33
|
+
Going ahead unless you say otherwise.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**For medium and large tasks**: Present a numbered task list and wait for the user to approve.
|
|
37
|
+
|
|
38
|
+
**Step 0: Discovery Interview (if applicable).** Before generating the plan, check whether a Discovery Interview is needed (see Orient reference). If the task involves external systems, stakeholder coordination, or unfamiliar code, run the interview FIRST.
|
|
39
|
+
|
|
40
|
+
**Step 1: Generate the plan.** Build a numbered list of concrete steps. Each step has:
|
|
41
|
+
- A number
|
|
42
|
+
- A one-line description
|
|
43
|
+
- The files that will be touched
|
|
44
|
+
- The verification method
|
|
45
|
+
|
|
46
|
+
**Step 2: Parse the user's response.**
|
|
47
|
+
|
|
48
|
+
| User says | Action |
|
|
49
|
+
|-----------|--------|
|
|
50
|
+
| `approve`, `go`, `yes`, `lgtm`, `ship it` | Execute all steps in order |
|
|
51
|
+
| `skip N` or `skip N,M` | Remove those steps, execute the rest |
|
|
52
|
+
| `only N,M,P` | Execute only the listed steps in order |
|
|
53
|
+
| `for step N, [instruction]` | Replace step N's approach, then execute all |
|
|
54
|
+
| `add: [description] after N` | Insert a new step, renumber, then execute all |
|
|
55
|
+
| `deny`, `stop`, `cancel`, `no` | Cancel. Do not execute anything. |
|
|
56
|
+
| A longer message with mixed feedback | Parse each instruction. Apply all modifications. Present revised plan and ask for final approval. |
|
|
57
|
+
|
|
58
|
+
**Step 3: Execute the approved plan.** Work through steps sequentially. After each step show: `Step 2/5 done: [summary].` If a step fails, stop and report.
|
|
59
|
+
|
|
60
|
+
**Step 4: Post-execution update.** Update blackboard with decisions and experience.
|
|
61
|
+
|
|
62
|
+
#### Mode: `always_ask`
|
|
63
|
+
Same as `plan_first` but applies to **small** tasks too. Only micro tasks skip the approval gate.
|
|
64
|
+
|
|
65
|
+
#### Combining with explicit skill routing
|
|
66
|
+
When routing to a skill, plan approval still applies if mode is `plan_first` or `always_ask`. Present the strategy for user control.
|
|
67
|
+
|
|
68
|
+
### 2. Choose direct vs routed execution
|
|
69
|
+
|
|
70
|
+
Use direct execution when:
|
|
71
|
+
- the work is micro or small
|
|
72
|
+
- routing overhead adds no value
|
|
73
|
+
- the answer can be delivered faster than a delegated workflow
|
|
74
|
+
|
|
75
|
+
Use a ftm skill when:
|
|
76
|
+
- its specialized workflow will materially improve the result
|
|
77
|
+
- the user explicitly invoked it
|
|
78
|
+
- the task is medium/large and the skill is the right vehicle
|
|
79
|
+
|
|
80
|
+
### 3. Choose any supporting MCP reads
|
|
81
|
+
|
|
82
|
+
If the request depends on external context, fetch the minimum required state first.
|
|
83
|
+
|
|
84
|
+
Examples:
|
|
85
|
+
- Jira URL -> read the ticket first
|
|
86
|
+
- meeting request -> read calendar first
|
|
87
|
+
- internal policy question -> search Glean first
|
|
88
|
+
- UI bug -> snapshot or inspect browser first
|
|
89
|
+
|
|
90
|
+
### 4. Decide whether to loop
|
|
91
|
+
|
|
92
|
+
If the next move will reveal new information, plan to re-enter Observe after the action.
|
|
93
|
+
|
|
94
|
+
## Act
|
|
95
|
+
|
|
96
|
+
Act is clean, decisive execution — but execution of **approved** work only.
|
|
97
|
+
|
|
98
|
+
**Pre-Act checkpoint**: Before executing anything, verify:
|
|
99
|
+
|
|
100
|
+
1. If `approval_mode` is `plan_first` or `always_ask`, did the user explicitly approve the plan?
|
|
101
|
+
2. If the task involves external mutations (see Approval Gates), have you presented the specific actions and received approval?
|
|
102
|
+
3. If neither condition applies, proceed.
|
|
103
|
+
|
|
104
|
+
### 1. Direct action
|
|
105
|
+
|
|
106
|
+
For micro tasks:
|
|
107
|
+
- do the work
|
|
108
|
+
- summarize what changed
|
|
109
|
+
|
|
110
|
+
For small tasks (when `approval_mode` is `plan_first` or `always_ask`):
|
|
111
|
+
- show the pre-flight summary first
|
|
112
|
+
- then do the work
|
|
113
|
+
- verify
|
|
114
|
+
- summarize what changed
|
|
115
|
+
|
|
116
|
+
### 2. Skill routing
|
|
117
|
+
|
|
118
|
+
Before invoking a skill, show one short routing line.
|
|
119
|
+
|
|
120
|
+
Examples:
|
|
121
|
+
- `Routing to ftm-debug: this is a flaky failure with real diagnostic uncertainty.`
|
|
122
|
+
- `Routing to ftm-brainstorm: this is still design-stage and benefits from research-backed planning.`
|
|
123
|
+
|
|
124
|
+
Then invoke the target skill with the full user input.
|
|
125
|
+
|
|
126
|
+
### 3. MCP execution
|
|
127
|
+
|
|
128
|
+
Use:
|
|
129
|
+
- parallel reads when safe
|
|
130
|
+
- sequential writes
|
|
131
|
+
- approval gates only for external-facing actions
|
|
132
|
+
|
|
133
|
+
### 3.5. Draft-before-send protocol
|
|
134
|
+
|
|
135
|
+
When composing Slack messages, emails, or any outbound communication, always save the draft locally before sending.
|
|
136
|
+
|
|
137
|
+
**Drafts folder**: `.ftm-drafts/` in the project root (or `~/.claude/ftm-drafts/` if no project context).
|
|
138
|
+
|
|
139
|
+
**Ensure the folder exists and is gitignored.** Save every draft before presenting or sending:
|
|
140
|
+
|
|
141
|
+
- Filename: `YYYY-MM-DD_HH-MM_<type>_<recipient-or-channel>.md`
|
|
142
|
+
- Content includes frontmatter: type, to, subject (email only), drafted timestamp, status (draft/sent/cancelled)
|
|
143
|
+
|
|
144
|
+
**Workflow:**
|
|
145
|
+
1. Compose the message
|
|
146
|
+
2. Save to `.ftm-drafts/`
|
|
147
|
+
3. Present to user for approval
|
|
148
|
+
4. If approved and sent, update `status: sent`
|
|
149
|
+
5. If cancelled or modified, update accordingly
|
|
150
|
+
|
|
151
|
+
### 4. Blackboard updates (mandatory)
|
|
152
|
+
|
|
153
|
+
After every completed task, update the blackboard:
|
|
154
|
+
|
|
155
|
+
1. Update `context.json` — set `current_task` to reflect what was done, append to `recent_decisions`
|
|
156
|
+
2. Update `session_metadata.skills_invoked` if a skill was used
|
|
157
|
+
3. Write an experience file to `~/.claude/ftm-state/blackboard/experiences/YYYY-MM-DD_task-slug.json`
|
|
158
|
+
4. Update `~/.claude/ftm-state/blackboard/experiences/index.json` with the new entry
|
|
159
|
+
|
|
160
|
+
The experience file should capture:
|
|
161
|
+
- `task_type`, `tags`, `outcome`, `lessons`, `files_touched`, `stakeholders`, `decisions_made`
|
|
162
|
+
|
|
163
|
+
Follow the schema and full-file write rules from `blackboard-schema.md`.
|
|
164
|
+
|
|
165
|
+
### 5. Loop
|
|
166
|
+
|
|
167
|
+
After acting:
|
|
168
|
+
|
|
169
|
+
- if complete, answer and stop
|
|
170
|
+
- if new information appeared, return to Observe
|
|
171
|
+
- if blocked by approval or missing info, ask the user
|
|
172
|
+
- if the simple approach failed, re-orient and escalate one level
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Direct Execution — Micro and Small Tasks
|
|
2
|
+
|
|
3
|
+
## Micro Execution
|
|
4
|
+
|
|
5
|
+
For tasks sized as `micro` (one coherent local action, trivial blast radius):
|
|
6
|
+
|
|
7
|
+
1. **Execute immediately** — no plan, no pre-flight, no approval gate
|
|
8
|
+
2. **Do the work** — make the edit, answer the question, fix the typo
|
|
9
|
+
3. **Summarize briefly** — one sentence about what changed
|
|
10
|
+
4. **Update blackboard** — even micro tasks get an experience entry if they taught something
|
|
11
|
+
|
|
12
|
+
Do not over-narrate micro tasks. The user asked for a rename, not a paragraph about renaming.
|
|
13
|
+
|
|
14
|
+
## Small Execution
|
|
15
|
+
|
|
16
|
+
For tasks sized as `small` (1-3 files, one concern, needs verification):
|
|
17
|
+
|
|
18
|
+
### When `approval_mode` is `plan_first` or `always_ask`:
|
|
19
|
+
|
|
20
|
+
1. **Show pre-flight summary** before starting:
|
|
21
|
+
```
|
|
22
|
+
Quick summary before I start:
|
|
23
|
+
- Read [file] to understand current behavior
|
|
24
|
+
- Change [X] to [Y] in [file]
|
|
25
|
+
- Verify: [test/lint/manual check]
|
|
26
|
+
|
|
27
|
+
Going ahead unless you say otherwise.
|
|
28
|
+
```
|
|
29
|
+
2. **Proceed immediately** after showing the summary — this is not a gate, just visibility
|
|
30
|
+
3. **Stop if the user objects** — if they say "wait" or "actually...", listen
|
|
31
|
+
4. **Do the work**
|
|
32
|
+
5. **Run verification** — the test, build check, or lint that confirms it works
|
|
33
|
+
6. **Summarize** — what changed, what was verified
|
|
34
|
+
|
|
35
|
+
### When `approval_mode` is `auto`:
|
|
36
|
+
|
|
37
|
+
1. **Do the work** directly
|
|
38
|
+
2. **Run verification**
|
|
39
|
+
3. **Summarize**
|
|
40
|
+
|
|
41
|
+
## When to Escalate from Direct Execution
|
|
42
|
+
|
|
43
|
+
Stop and re-orient if any of these happen during execution:
|
|
44
|
+
|
|
45
|
+
- You discover the change touches more files than expected
|
|
46
|
+
- An external system is involved that wasn't obvious at sizing time
|
|
47
|
+
- The verification step fails and the fix isn't obvious
|
|
48
|
+
- You realize stakeholder coordination is needed
|
|
49
|
+
- The blast radius is larger than initially assessed
|
|
50
|
+
|
|
51
|
+
Escalation means going back to Orient with new information, not giving up.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Environment Discovery Protocol
|
|
2
|
+
|
|
3
|
+
This is an Orient sub-phase that runs automatically on the first request in a session, then caches results for 15 minutes.
|
|
4
|
+
|
|
5
|
+
## Discovery Sequence
|
|
6
|
+
|
|
7
|
+
### 1. MCP Server Probe
|
|
8
|
+
|
|
9
|
+
List connected MCP servers by checking which tool namespaces are available.
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
> **Config note**: The Atlassian server names (`mcp-atlassian-personal`, `mcp-atlassian`) are defaults. Read `ops.mcp_account_rules` from `ftm-config.yml` for the configured names and probe those instead if they differ.
|
|
14
|
+
|
|
15
|
+
Record: server name, tools available, verified status.
|
|
16
|
+
|
|
17
|
+
### 2. CLI Probe
|
|
18
|
+
|
|
19
|
+
Check for installed CLIs on PATH:
|
|
20
|
+
|
|
21
|
+
- Essential: `node`, `python3`, `git`, `npm`
|
|
22
|
+
- FTM tools: `knip`, `codex` (OpenAI Codex CLI)
|
|
23
|
+
- Optional: `gh` (GitHub CLI), `jq`, `curl`
|
|
24
|
+
|
|
25
|
+
For each: run `which <cmd>` and record path + version if available.
|
|
26
|
+
|
|
27
|
+
### 3. Environment Variable Check
|
|
28
|
+
|
|
29
|
+
Check for key env vars (existence only, never log values):
|
|
30
|
+
|
|
31
|
+
- `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GITHUB_TOKEN`
|
|
32
|
+
- `JIRA_API_TOKEN`, `FRESHSERVICE_API_KEY`, `SLACK_BOT_TOKEN`
|
|
33
|
+
|
|
34
|
+
Record: var name, is_set (boolean).
|
|
35
|
+
|
|
36
|
+
### 4. Write capabilities.json
|
|
37
|
+
|
|
38
|
+
Write to `~/.claude/ftm-state/blackboard/capabilities.json`:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"discovered_at": "2026-03-20T10:30:00Z",
|
|
43
|
+
"expires_at": "2026-03-20T10:45:00Z",
|
|
44
|
+
"capabilities": [
|
|
45
|
+
{
|
|
46
|
+
"name": "serena",
|
|
47
|
+
"type": "mcp",
|
|
48
|
+
"verified": true,
|
|
49
|
+
"last_verified_at": "2026-03-20T10:30:00Z",
|
|
50
|
+
"operations_verified": ["find_symbol", "search_for_pattern"],
|
|
51
|
+
"confidence": "verified"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "node",
|
|
55
|
+
"type": "cli",
|
|
56
|
+
"verified": true,
|
|
57
|
+
"path": "/usr/local/bin/node",
|
|
58
|
+
"version": "20.11.0",
|
|
59
|
+
"confidence": "verified"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 5. Cache Logic
|
|
66
|
+
|
|
67
|
+
- If `capabilities.json` exists and `expires_at` > now, skip re-probing.
|
|
68
|
+
- If stale or missing, re-probe.
|
|
69
|
+
- User can force refresh by saying "refresh capabilities" or "recon".
|
|
70
|
+
|
|
71
|
+
## How This Affects Planning
|
|
72
|
+
|
|
73
|
+
When ftm-mind generates or routes to a plan, it MUST:
|
|
74
|
+
|
|
75
|
+
- Check `capabilities.json` for every tool/MCP/CLI the plan references.
|
|
76
|
+
- If a required capability is `verified: false` or missing, use the skill's fallback from its manifest (## Fallbacks section).
|
|
77
|
+
- If no fallback exists for a missing capability, warn the user: "Plan step N requires [capability] which is not available. Skip or find alternative?"
|