feed-the-machine 1.0.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.
Files changed (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +268 -0
  3. package/bin/generate-manifest.mjs +210 -0
  4. package/bin/install.mjs +114 -0
  5. package/ftm/SKILL.md +88 -0
  6. package/ftm-audit/SKILL.md +146 -0
  7. package/ftm-audit/references/protocols/PROJECT-PATTERNS.md +91 -0
  8. package/ftm-audit/references/protocols/RUNTIME-WIRING.md +66 -0
  9. package/ftm-audit/references/protocols/WIRING-CONTRACTS.md +135 -0
  10. package/ftm-audit/references/strategies/AUTO-FIX-STRATEGIES.md +69 -0
  11. package/ftm-audit/references/templates/REPORT-FORMAT.md +96 -0
  12. package/ftm-audit/scripts/run-knip.sh +23 -0
  13. package/ftm-audit.yml +2 -0
  14. package/ftm-brainstorm/SKILL.md +379 -0
  15. package/ftm-brainstorm/evals/evals.json +100 -0
  16. package/ftm-brainstorm/evals/promptfoo.yaml +109 -0
  17. package/ftm-brainstorm/references/agent-prompts.md +224 -0
  18. package/ftm-brainstorm/references/plan-template.md +121 -0
  19. package/ftm-brainstorm.yml +2 -0
  20. package/ftm-browse/SKILL.md +415 -0
  21. package/ftm-browse/daemon/browser-manager.ts +206 -0
  22. package/ftm-browse/daemon/bun.lock +30 -0
  23. package/ftm-browse/daemon/cli.ts +347 -0
  24. package/ftm-browse/daemon/commands.ts +410 -0
  25. package/ftm-browse/daemon/main.ts +357 -0
  26. package/ftm-browse/daemon/package.json +17 -0
  27. package/ftm-browse/daemon/server.ts +189 -0
  28. package/ftm-browse/daemon/snapshot.ts +519 -0
  29. package/ftm-browse/daemon/tsconfig.json +22 -0
  30. package/ftm-browse.yml +4 -0
  31. package/ftm-codex-gate/SKILL.md +302 -0
  32. package/ftm-codex-gate.yml +2 -0
  33. package/ftm-config/SKILL.md +310 -0
  34. package/ftm-config.default.yml +80 -0
  35. package/ftm-config.yml +2 -0
  36. package/ftm-council/SKILL.md +132 -0
  37. package/ftm-council/references/prompts/CLAUDE-INVESTIGATION.md +60 -0
  38. package/ftm-council/references/prompts/CODEX-INVESTIGATION.md +58 -0
  39. package/ftm-council/references/prompts/GEMINI-INVESTIGATION.md +58 -0
  40. package/ftm-council/references/prompts/REBUTTAL-TEMPLATE.md +57 -0
  41. package/ftm-council/references/protocols/PREREQUISITES.md +47 -0
  42. package/ftm-council/references/protocols/STEP-0-FRAMING.md +46 -0
  43. package/ftm-council.yml +2 -0
  44. package/ftm-dashboard.yml +4 -0
  45. package/ftm-debug/SKILL.md +146 -0
  46. package/ftm-debug/references/phases/PHASE-0-INTAKE.md +58 -0
  47. package/ftm-debug/references/phases/PHASE-1-TRIAGE.md +46 -0
  48. package/ftm-debug/references/phases/PHASE-2-WAR-ROOM-AGENTS.md +279 -0
  49. package/ftm-debug/references/phases/PHASE-3-TO-6-EXECUTION.md +436 -0
  50. package/ftm-debug/references/protocols/BLACKBOARD.md +86 -0
  51. package/ftm-debug/references/protocols/EDGE-CASES.md +103 -0
  52. package/ftm-debug.yml +2 -0
  53. package/ftm-diagram/SKILL.md +233 -0
  54. package/ftm-diagram.yml +2 -0
  55. package/ftm-executor/SKILL.md +657 -0
  56. package/ftm-executor/references/STYLE-TEMPLATE.md +73 -0
  57. package/ftm-executor/references/phases/PHASE-0-VERIFICATION.md +62 -0
  58. package/ftm-executor/references/phases/PHASE-2-AGENT-ASSEMBLY.md +34 -0
  59. package/ftm-executor/references/phases/PHASE-3-WORKTREES.md +38 -0
  60. package/ftm-executor/references/phases/PHASE-4-5-AUDIT.md +72 -0
  61. package/ftm-executor/references/phases/PHASE-4-DISPATCH.md +66 -0
  62. package/ftm-executor/references/phases/PHASE-5-5-CODEX-GATE.md +73 -0
  63. package/ftm-executor/references/protocols/DOCUMENTATION-BOOTSTRAP.md +36 -0
  64. package/ftm-executor/references/protocols/MODEL-PROFILE.md +44 -0
  65. package/ftm-executor/references/protocols/PROGRESS-TRACKING.md +66 -0
  66. package/ftm-executor/runtime/ftm-runtime.mjs +252 -0
  67. package/ftm-executor/runtime/package.json +8 -0
  68. package/ftm-executor.yml +2 -0
  69. package/ftm-git/SKILL.md +195 -0
  70. package/ftm-git/evals/evals.json +26 -0
  71. package/ftm-git/evals/promptfoo.yaml +75 -0
  72. package/ftm-git/hooks/post-commit-experience.sh +92 -0
  73. package/ftm-git/references/patterns/SECRET-PATTERNS.md +104 -0
  74. package/ftm-git/references/protocols/REMEDIATION.md +139 -0
  75. package/ftm-git/scripts/pre-commit-secrets.sh +110 -0
  76. package/ftm-git.yml +2 -0
  77. package/ftm-intent/SKILL.md +198 -0
  78. package/ftm-intent.yml +2 -0
  79. package/ftm-map.yml +2 -0
  80. package/ftm-mind/SKILL.md +986 -0
  81. package/ftm-mind/evals/promptfoo.yaml +142 -0
  82. package/ftm-mind/references/blackboard-schema.md +328 -0
  83. package/ftm-mind/references/complexity-guide.md +110 -0
  84. package/ftm-mind/references/event-registry.md +299 -0
  85. package/ftm-mind/references/mcp-inventory.md +296 -0
  86. package/ftm-mind/references/protocols/COMPLEXITY-SIZING.md +72 -0
  87. package/ftm-mind/references/protocols/MCP-HEURISTICS.md +32 -0
  88. package/ftm-mind/references/protocols/PLAN-APPROVAL.md +80 -0
  89. package/ftm-mind/references/reflexion-protocol.md +249 -0
  90. package/ftm-mind/references/routing/SCENARIOS.md +22 -0
  91. package/ftm-mind/references/routing-scenarios.md +35 -0
  92. package/ftm-mind.yml +2 -0
  93. package/ftm-pause/SKILL.md +133 -0
  94. package/ftm-pause/references/protocols/SKILL-RESTORE-PROTOCOLS.md +186 -0
  95. package/ftm-pause/references/protocols/VALIDATION.md +80 -0
  96. package/ftm-pause.yml +2 -0
  97. package/ftm-researcher.yml +2 -0
  98. package/ftm-resume/SKILL.md +166 -0
  99. package/ftm-resume/references/protocols/VALIDATION.md +172 -0
  100. package/ftm-resume.yml +2 -0
  101. package/ftm-retro/SKILL.md +189 -0
  102. package/ftm-retro/references/protocols/SCORING-RUBRICS.md +89 -0
  103. package/ftm-retro/references/templates/REPORT-FORMAT.md +109 -0
  104. package/ftm-retro.yml +2 -0
  105. package/ftm-routine.yml +4 -0
  106. package/ftm-state/blackboard/context.json +23 -0
  107. package/ftm-state/blackboard/experiences/index.json +9 -0
  108. package/ftm-state/blackboard/patterns.json +6 -0
  109. package/ftm-state/schemas/context.schema.json +130 -0
  110. package/ftm-state/schemas/experience-index.schema.json +77 -0
  111. package/ftm-state/schemas/experience.schema.json +78 -0
  112. package/ftm-state/schemas/patterns.schema.json +44 -0
  113. package/ftm-upgrade/SKILL.md +153 -0
  114. package/ftm-upgrade/scripts/check-version.sh +76 -0
  115. package/ftm-upgrade/scripts/upgrade.sh +143 -0
  116. package/ftm-upgrade.yml +2 -0
  117. package/ftm.yml +2 -0
  118. package/install.sh +102 -0
  119. package/package.json +74 -0
  120. package/uninstall.sh +25 -0
@@ -0,0 +1,299 @@
1
+ # FTM Event Registry
2
+
3
+ This document defines the full event vocabulary for the ftm skill system. The mind reads this during its Decide phase to determine which skills to trigger after any action completes.
4
+
5
+ ---
6
+
7
+ ## How to Read This Document
8
+
9
+ Each event entry uses the following format:
10
+
11
+ ```markdown
12
+ ### event_name
13
+ - **Description**: What this event means
14
+ - **Emitted by**: [list of skills]
15
+ - **Listened to by**: [list of skills]
16
+ - **Fast-path**: yes/no (fast-path events bypass mind mediation and always trigger their listeners)
17
+ - **Payload**: {key fields the event carries}
18
+ ```
19
+
20
+ **Fast-path events** are always triggered immediately — the mind does not evaluate whether to route them. Use fast-path for events where the downstream response is unconditional and latency matters (documentation sync, micro-reflections).
21
+
22
+ **Mediated events** pass through the mind's Decide phase. The mind evaluates context and decides whether to trigger listeners, which listener to prefer, and whether to combine multiple events before acting.
23
+
24
+ ---
25
+
26
+ ## How to Add an Event Declaration to a Skill
27
+
28
+ When adding event declarations to a skill's SKILL.md, insert an `## Events` section AFTER the YAML frontmatter block and BEFORE the first major heading of existing content. Do NOT modify any other content.
29
+
30
+ Use this exact format:
31
+
32
+ ```markdown
33
+ ## Events
34
+
35
+ ### Emits
36
+ - `event_name` — when [the condition that causes this skill to emit the event]
37
+
38
+ ### Listens To
39
+ - `event_name` — [what this skill does in response when this event fires]
40
+ ```
41
+
42
+ Guidelines for writing clear declarations:
43
+ - Emit conditions should describe the specific moment the event fires, not the entire skill workflow. Example: "when a git commit is made" not "during execution".
44
+ - Listen-to descriptions should describe the triggered action, not the full response workflow. Example: "auto-investigate the failure" not "launch Phase 1 agents".
45
+ - Use backtick-quoted event names consistently.
46
+ - One bullet per event. If a skill emits the same event under multiple conditions, combine them into one bullet with "or" — e.g., "when the test suite passes, or when a post-fix verification succeeds".
47
+
48
+ ---
49
+
50
+ ## Full Event Vocabulary
51
+
52
+ ### task_received
53
+ - **Description**: A new task has entered the system and is acknowledged by the executor
54
+ - **Emitted by**: ftm-executor
55
+ - **Listened to by**: ftm-mind (log task arrival, initialize tracking context), ftm-brainstorm (begin ideation work when mind routes an incoming task for exploration)
56
+ - **Fast-path**: no
57
+ - **Payload**: `{ task_description, plan_path, wave_number, task_number }`
58
+
59
+ ---
60
+
61
+ ### plan_generated
62
+ - **Description**: A plan document was created and is ready for review or execution
63
+ - **Emitted by**: ftm-executor, ftm-brainstorm
64
+ - **Listened to by**: ftm-mind (surface plan to user, optionally trigger ftm-audit pre-flight)
65
+ - **Fast-path**: no
66
+ - **Payload**: `{ plan_path, plan_title, task_count, wave_count }`
67
+
68
+ ---
69
+
70
+ ### research_complete
71
+ - **Description**: ftm-researcher finished its synthesis pipeline and structured output is ready for consumption
72
+ - **Emitted by**: ftm-researcher
73
+ - **Listened to by**: ftm-brainstorm (consume findings for current research sprint), ftm-mind (log research session on blackboard, optionally surface to user)
74
+ - **Fast-path**: no
75
+ - **Payload**: `{ query, mode, findings_count, consensus_count, contested_count, unique_count, sources_count, council_used, duration_ms }`
76
+
77
+ ---
78
+
79
+ ### plan_approved
80
+ - **Description**: The user has approved a plan for execution
81
+ - **Emitted by**: ftm-executor (after user confirmation)
82
+ - **Listened to by**: ftm-executor (begin Phase 3 worktree setup and agent dispatch)
83
+ - **Fast-path**: no
84
+ - **Payload**: `{ plan_path, plan_title, approved_by, timestamp }`
85
+
86
+ ---
87
+
88
+ ### code_changed
89
+ - **Description**: One or more files were modified — pre-commit state, changes not yet persisted to git history
90
+ - **Emitted by**: ftm-executor
91
+ - **Listened to by**: ftm-mind (record in blackboard, may trigger pre-commit checks)
92
+ - **Fast-path**: no
93
+ - **Payload**: `{ files_changed: [path], task_number, agent_name, worktree_path }`
94
+
95
+ ---
96
+
97
+ ### code_committed
98
+ - **Description**: A git commit was successfully made — changes are persisted to the repository
99
+ - **Emitted by**: ftm-executor
100
+ - **Listened to by**: ftm-intent (update INTENT.md entries for changed functions), ftm-diagram (update DIAGRAM.mmd nodes and edges for changed modules), ftm-codex-gate (run adversarial validation at wave boundaries after commits land)
101
+ - **Fast-path**: yes — documentation must always stay in sync with commits, no mind mediation needed
102
+ - **Payload**: `{ commit_hash, commit_message, files_changed: [path], worktree_path, task_number }`
103
+
104
+ ---
105
+
106
+ ### map_updated
107
+ - **Description**: The code knowledge graph has been updated — either from a full bootstrap scan or an incremental re-index of changed files
108
+ - **Emitted by**: ftm-map
109
+ - **Listened to by**: ftm-mind (log on blackboard, update session context with latest graph stats), ftm-intent (trigger INTENT.md regeneration from graph), ftm-diagram (trigger DIAGRAM.mmd regeneration from graph)
110
+ - **Fast-path**: yes — downstream view generation should happen immediately without mind mediation
111
+ - **Payload**: `{ project_path, symbols_count, edges_count, files_parsed, duration_ms, mode: "bootstrap" | "incremental" }`
112
+
113
+ ---
114
+
115
+ ### test_passed
116
+ - **Description**: The test suite (or a targeted subset) ran and all tests passed
117
+ - **Emitted by**: ftm-executor, ftm-debug
118
+ - **Listened to by**: ftm-mind (update task status, potentially unblock next wave)
119
+ - **Fast-path**: no
120
+ - **Payload**: `{ test_runner, test_count, duration_ms, scope: "full_suite" | "task_scope", task_number }`
121
+
122
+ ---
123
+
124
+ ### test_failed
125
+ - **Description**: The test suite ran and one or more tests failed
126
+ - **Emitted by**: ftm-executor, ftm-debug
127
+ - **Listened to by**: ftm-debug (auto-investigate the failure), ftm-mind (block wave advancement, update task status)
128
+ - **Fast-path**: no
129
+ - **Payload**: `{ test_runner, failed_tests: [{ name, file, error }], total_count, failed_count, task_number }`
130
+
131
+ ---
132
+
133
+ ### bug_fixed
134
+ - **Description**: A specific bug was identified, a fix was applied, and the Reviewer agent approved the fix
135
+ - **Emitted by**: ftm-debug
136
+ - **Listened to by**: ftm-retro (record the fix as a success experience), ftm-mind (update task status, unblock dependents)
137
+ - **Fast-path**: no
138
+ - **Payload**: `{ bug_description, root_cause, files_changed: [path], fix_commits: [hash], reviewer_verdict }`
139
+
140
+ ---
141
+
142
+ ### audit_complete
143
+ - **Description**: ftm-audit finished its full analysis (all three layers) for a given scope
144
+ - **Emitted by**: ftm-audit
145
+ - **Listened to by**: ftm-executor (interpret results: mark task complete, queue auto-fix, or hold for manual review), ftm-mind (update audit record on blackboard)
146
+ - **Fast-path**: no
147
+ - **Payload**: `{ scope: [path], findings_count, auto_fixed_count, manual_required_count, final_status: "PASS" | "FAIL", changelog_path }`
148
+
149
+ ---
150
+
151
+ ### issue_found
152
+ - **Description**: A problem was discovered — by ftm-audit static analysis, by adversarial audit, or by ftm-debug investigation
153
+ - **Emitted by**: ftm-audit, ftm-debug, ftm-codex-gate
154
+ - **Listened to by**: ftm-mind (log the issue, decide whether to surface to user or auto-route to fix)
155
+ - **Fast-path**: no
156
+ - **Payload**: `{ issue_type, file_path, line_hint, description, severity: "error" | "warning", source: "knip" | "adversarial" | "debug", auto_fixable: boolean }`
157
+
158
+ ---
159
+
160
+ ### documentation_updated
161
+ - **Description**: INTENT.md or a DIAGRAM.mmd file was updated to reflect new or changed code
162
+ - **Emitted by**: ftm-intent, ftm-diagram
163
+ - **Listened to by**: ftm-mind (record documentation sync on blackboard, reset the "docs behind" flag for the affected module)
164
+ - **Fast-path**: no
165
+ - **Payload**: `{ file_path, module_name, update_type: "intent" | "diagram", changed_entries: [string] }`
166
+
167
+ ---
168
+
169
+ ### review_complete
170
+ - **Description**: A code review or audit review finished and produced a verdict
171
+ - **Emitted by**: ftm-audit (after adversarial layer), ftm-debug (after Reviewer agent), ftm-council (after majority verdict or 5-round synthesis), ftm-codex-gate (after Codex analysis completes)
172
+ - **Listened to by**: ftm-audit (validate review findings match static analysis), ftm-mind (update review status on blackboard)
173
+ - **Fast-path**: no
174
+ - **Payload**: `{ verdict: "APPROVED" | "APPROVED_WITH_CHANGES" | "NEEDS_REWORK", reviewer, findings: [string], task_number }`
175
+
176
+ ---
177
+
178
+ ### task_completed
179
+ - **Description**: A task finished — including passing all verification gates (tests, audit, Codex gate)
180
+ - **Emitted by**: ftm-executor, ftm-debug, ftm-audit, ftm-retro, ftm-brainstorm, ftm-council, ftm-codex-gate, ftm-intent, ftm-diagram, ftm-browse, ftm-pause, ftm-resume, ftm-upgrade, ftm-config, ftm-researcher
181
+ - **Listened to by**: ftm-retro (micro-reflection trigger — record the task outcome as an experience), ftm-mind (advance wave state, check if all tasks in wave are done)
182
+ - **Fast-path**: yes — micro-reflection runs on every task completion unconditionally; no mind mediation needed
183
+ - **Payload**: `{ task_number, task_title, plan_path, wave_number, duration_ms, audit_result, agent_name }`
184
+
185
+ ---
186
+
187
+ ### error_encountered
188
+ - **Description**: An unexpected error occurred during execution that was not part of a normal test failure
189
+ - **Emitted by**: ftm-executor, ftm-debug
190
+ - **Listened to by**: ftm-debug (diagnose the error), ftm-retro (record as a failure experience for pattern learning), ftm-mind (halt or reroute depending on severity)
191
+ - **Fast-path**: no
192
+ - **Payload**: `{ error_message, stack_trace, phase, task_number, skill: "ftm-executor" | "ftm-debug", recoverable: boolean }`
193
+
194
+ ---
195
+
196
+ ### session_paused
197
+ - **Description**: The session state was serialized and saved — the user is ending the session but wants to resume later
198
+ - **Emitted by**: ftm-pause (dedicated pause skill)
199
+ - **Listened to by**: ftm-mind (write final blackboard snapshot, record open tasks and current wave state)
200
+ - **Fast-path**: no
201
+ - **Payload**: `{ session_id, plan_path, current_wave, open_tasks: [number], blackboard_snapshot_path, timestamp }`
202
+
203
+ ---
204
+
205
+ ### session_resumed
206
+ - **Description**: A previously paused session state was restored and execution is continuing
207
+ - **Emitted by**: ftm-resume (dedicated resume skill)
208
+ - **Listened to by**: ftm-executor (restore wave state and re-dispatch open tasks), ftm-mind (reload blackboard snapshot)
209
+ - **Fast-path**: no
210
+ - **Payload**: `{ session_id, plan_path, restored_wave, open_tasks: [number], blackboard_snapshot_path, timestamp }`
211
+
212
+ ---
213
+
214
+ ### experience_recorded
215
+ - **Description**: A new experience entry (task outcome, fix attempt, blocker) was written to the blackboard's experience log
216
+ - **Emitted by**: ftm-retro
217
+ - **Listened to by**: ftm-mind (evaluate whether the experience reveals a new pattern to promote)
218
+ - **Fast-path**: no
219
+ - **Payload**: `{ experience_type: "success" | "failure" | "fix" | "blocker", description, task_number, plan_slug, timestamp }`
220
+
221
+ ---
222
+
223
+ ### pattern_discovered
224
+ - **Description**: A recurring pattern was identified from accumulated experiences and promoted to the patterns.json library
225
+ - **Emitted by**: ftm-retro
226
+ - **Listened to by**: ftm-mind (index the new pattern so it can inform future Decide-phase routing), ftm-executor (optionally: adjust agent prompts if pattern is execution-relevant)
227
+ - **Fast-path**: no
228
+ - **Payload**: `{ pattern_name, pattern_description, first_seen_retro, occurrence_count, suggested_action, patterns_file_path }`
229
+
230
+ ---
231
+
232
+ ### secrets_found
233
+ - **Description**: ftm-git scan detected hardcoded credentials in staged files or the working tree — commit/push is blocked until remediation completes
234
+ - **Emitted by**: ftm-git
235
+ - **Listened to by**: ftm-executor (pause commit/push, await remediation), ftm-mind (record security finding on blackboard)
236
+ - **Fast-path**: no
237
+ - **Payload**: `{ findings: [{ file_path, line_number, secret_type, severity }], scan_scope: "staged" | "working_tree" | "history", task_number }`
238
+
239
+ ---
240
+
241
+ ### secrets_clear
242
+ - **Description**: ftm-git scan completed with no findings — the commit or push is safe to proceed
243
+ - **Emitted by**: ftm-git
244
+ - **Listened to by**: ftm-executor (unblock pending commit/push operation), ftm-mind (record clean scan on blackboard)
245
+ - **Fast-path**: no
246
+ - **Payload**: `{ files_scanned: number, scan_scope: "staged" | "working_tree" | "history", task_number }`
247
+
248
+ ---
249
+
250
+ ### secrets_remediated
251
+ - **Description**: ftm-git auto-fix successfully extracted secrets to .env and refactored source files — a re-scan confirmed no remaining findings
252
+ - **Emitted by**: ftm-git
253
+ - **Listened to by**: ftm-executor (unblock commit/push now that secrets are extracted), ftm-mind (record remediation action on blackboard)
254
+ - **Fast-path**: no
255
+ - **Payload**: `{ secrets_extracted: number, files_refactored: [path], env_vars_added: [string], task_number }`
256
+
257
+ ---
258
+
259
+ ## Fast-Path Summary
260
+
261
+ | Event | Always triggers |
262
+ |---|---|
263
+ | `code_committed` | ftm-intent (INTENT.md sync), ftm-diagram (DIAGRAM.mmd sync) |
264
+ | `task_completed` | ftm-retro (micro-reflection / experience recording) |
265
+ | `map_updated` | ftm-intent (INTENT.md regeneration), ftm-diagram (DIAGRAM.mmd regeneration) |
266
+
267
+ All other events are mediated by the mind's Decide phase.
268
+
269
+ ---
270
+
271
+ ## Event Routing Reference
272
+
273
+ Use this table to quickly look up which skills are involved when an event fires:
274
+
275
+ | Event | Emitters | Listeners |
276
+ |---|---|---|
277
+ | task_received | executor | mind, brainstorm |
278
+ | plan_generated | executor, brainstorm | mind |
279
+ | research_complete | researcher | brainstorm, mind |
280
+ | plan_approved | executor | executor |
281
+ | code_changed | executor | mind |
282
+ | code_committed | executor | intent, diagram, codex-gate |
283
+ | test_passed | executor, debug | mind |
284
+ | test_failed | executor, debug | debug, mind |
285
+ | bug_fixed | debug | retro, mind |
286
+ | audit_complete | audit | executor, mind |
287
+ | issue_found | audit, debug, codex-gate | mind |
288
+ | documentation_updated | intent, diagram | mind |
289
+ | review_complete | audit, debug, council, codex-gate | audit, mind |
290
+ | task_completed | executor, debug, audit, retro, brainstorm, council, codex-gate, intent, diagram, browse, pause, resume, upgrade, config, researcher | retro, mind |
291
+ | error_encountered | executor, debug | debug, retro, mind |
292
+ | session_paused | pause | mind |
293
+ | session_resumed | resume | executor, mind |
294
+ | experience_recorded | retro | mind |
295
+ | pattern_discovered | retro | mind, executor |
296
+ | secrets_found | git | executor, mind |
297
+ | secrets_clear | git | executor, mind |
298
+ | secrets_remediated | git | executor, mind |
299
+ | map_updated | map | mind, intent, diagram |
@@ -0,0 +1,296 @@
1
+ # MCP Capability Inventory
2
+ **Purpose**: Orient-phase reference. Scan input → match domain keywords → select MCP → check approval gate.
3
+
4
+ ---
5
+
6
+ ## 1. Server Catalog
7
+
8
+ ### Development
9
+
10
+ #### `git`
11
+ | Field | Detail |
12
+ |-------|--------|
13
+ | **Tools** | `git_status`, `git_diff`, `git_diff_staged`, `git_diff_unstaged`, `git_log`, `git_show`, `git_add`, `git_commit`, `git_checkout`, `git_create_branch`, `git_branch`, `git_reset` |
14
+ | **When to use** | Checking repo state, reviewing changes, branching, committing, exploring history |
15
+ | **When NOT to use** | Detached HEAD state (orphaned commits risk); force-push to main |
16
+ | **Approval required** | Auto: `status`, `diff`, `log`, `show`, `branch` (read). Needs approval: `commit`, `push`, `reset`, `checkout` (destructive or state-changing) |
17
+
18
+ #### `playwright`
19
+ | Field | Detail |
20
+ |-------|--------|
21
+ | **Tools** | `browser_navigate`, `browser_click`, `browser_fill_form`, `browser_type`, `browser_snapshot`, `browser_take_screenshot`, `browser_select_option`, `browser_press_key`, `browser_wait_for`, `browser_evaluate`, `browser_console_messages`, `browser_network_requests`, `browser_tabs`, `browser_close`, `browser_drag`, `browser_hover`, `browser_file_upload`, `browser_handle_dialog`, `browser_resize`, `browser_run_code`, `browser_install` |
22
+ | **When to use** | E2E testing, visual verification, UI interaction testing, scraping pages that require JS |
23
+ | **When NOT to use** | Headless server environments; when a REST API exists for the same data; anti-bot risk |
24
+ | **Approval required** | Auto: `snapshot`, `screenshot`, `console_messages` (read). Needs approval: form submissions, file uploads, any write-through-browser action |
25
+
26
+ #### `sequential-thinking`
27
+ | Field | Detail |
28
+ |-------|--------|
29
+ | **Tools** | `sequentialthinking` |
30
+ | **When to use** | Multi-step reasoning, architecture decisions, complex debugging chains, trade-off analysis |
31
+ | **When NOT to use** | Simple single-step lookups — adds latency and token cost without benefit |
32
+ | **Approval required** | Auto: analysis only, no side effects |
33
+
34
+ #### `chrome-devtools`
35
+ | Field | Detail |
36
+ |-------|--------|
37
+ | **Tools** | Chrome DevTools Protocol bridge tools |
38
+ | **When to use** | Low-level browser debugging, network inspection, performance profiling of a running Chrome instance |
39
+ | **When NOT to use** | General web browsing; prefer `playwright` for test automation |
40
+ | **Approval required** | Auto: inspection. Needs approval: any action that modifies browser state or page |
41
+
42
+ ---
43
+
44
+ ### Communication
45
+
46
+ #### `slack`
47
+ | Field | Detail |
48
+ |-------|--------|
49
+ | **Tools** | `slack_list_channels`, `slack_get_channel_history`, `slack_get_thread_replies`, `slack_post_message`, `slack_reply_to_thread`, `slack_get_users`, `slack_get_user_profile`, `slack_add_reaction` |
50
+ | **When to use** | Notifying team, posting updates, searching conversation history, replying to threads |
51
+ | **When NOT to use** | Sending sensitive credentials or PII; bulk messaging that looks like spam |
52
+ | **Approval required** | Auto: `list_channels`, `get_channel_history`, `get_thread_replies`, `get_users`, `get_user_profile` (read). Needs approval: `post_message`, `reply_to_thread`, `add_reaction` (write to Slack) |
53
+
54
+ #### `gmail`
55
+ | Field | Detail |
56
+ |-------|--------|
57
+ | **Tools** | `search_emails`, `read_email`, `draft_email`, `send_email`, `delete_email`, `modify_email`, `batch_modify_emails`, `batch_delete_emails`, `create_label`, `update_label`, `delete_label`, `list_email_labels`, `create_filter`, `create_filter_from_template`, `get_filter`, `list_filters`, `delete_filter`, `get_or_create_label`, `download_attachment` |
58
+ | **When to use** | Email triage, searching inbox, drafting replies, managing labels/filters |
59
+ | **When NOT to use** | Bulk delete without confirmation; sending on behalf of user without explicit approval |
60
+ | **Approval required** | Auto: `search_emails`, `read_email`, `list_email_labels`, `get_filter`, `list_filters` (read). Needs approval: `send_email`, `delete_email`, `batch_delete_emails`, `batch_modify_emails`, `create_filter` (write/destructive) |
61
+
62
+ ---
63
+
64
+ ### Project Management
65
+
66
+ #### `mcp-atlassian-personal` (personal Jira + Confluence account)
67
+ | Field | Detail |
68
+ |-------|--------|
69
+ | **Tools** | Jira: `jira_search`, `jira_get_issue`, `jira_create_issue`, `jira_update_issue`, `jira_delete_issue`, `jira_transition_issue`, `jira_add_comment`, `jira_edit_comment`, `jira_get_transitions`, `jira_get_all_projects`, `jira_get_project_issues`, `jira_get_board_issues`, `jira_get_sprint_issues`, `jira_get_sprints_from_board`, `jira_get_agile_boards`, `jira_create_sprint`, `jira_update_sprint`, `jira_add_issues_to_sprint`, `jira_batch_create_issues`, `jira_create_issue_link`, `jira_remove_issue_link`, `jira_get_link_types`, `jira_add_worklog`, `jira_get_worklog`, `jira_add_watcher`, `jira_remove_watcher`, `jira_get_issue_watchers`, `jira_get_user_profile`, `jira_download_attachments`, `jira_get_issue_images`, `jira_link_to_epic`, `jira_get_project_components`, `jira_get_project_versions`, `jira_batch_create_versions`, `jira_create_version`, `jira_get_issue_sla`, `jira_get_issue_dates`, `jira_get_issue_development_info`, `jira_get_issues_development_info`, `jira_batch_get_changelogs`, `jira_get_queue_issues`, `jira_get_service_desk_for_project`, `jira_get_service_desk_queues`, `jira_create_remote_issue_link`, `jira_search_fields`, `jira_get_field_options`, `jira_get_issue_proforma_forms`, `jira_get_proforma_form_details`, `jira_update_proforma_form_answers` | Confluence: `confluence_search`, `confluence_get_page`, `confluence_create_page`, `confluence_update_page`, `confluence_delete_page`, `confluence_add_comment`, `confluence_reply_to_comment`, `confluence_get_comments`, `confluence_add_label`, `confluence_get_labels`, `confluence_get_page_children`, `confluence_get_page_history`, `confluence_get_page_diff`, `confluence_get_page_views`, `confluence_move_page`, `confluence_upload_attachment`, `confluence_upload_attachments`, `confluence_get_attachments`, `confluence_delete_attachment`, `confluence_download_attachment`, `confluence_download_content_attachments`, `confluence_get_page_images`, `confluence_search_user` |
70
+ | **When to use** | Tracking personal tickets, updating your own issues, commenting, logging work, searching your Jira backlog, reading/writing Confluence docs |
71
+ | **When NOT to use** | IT admin operations (use `mcp-atlassian` instead); service desk ticket management (use `freshservice-mcp`) |
72
+ | **Approval required** | Auto: all `get_*`, `search*`, `list_*`, `download_*` (read). Needs approval: `create_issue`, `update_issue`, `delete_issue`, `transition_issue`, `add_comment`, `create_page`, `update_page`, `delete_page`, `add_worklog` |
73
+
74
+ #### `mcp-atlassian` (IT admin Jira + Confluence account)
75
+ | Field | Detail |
76
+ |-------|--------|
77
+ | **Tools** | Same tool set as `mcp-atlassian-personal` |
78
+ | **When to use** | IT admin operations, organization-wide Jira/Confluence actions requiring admin credentials |
79
+ | **When NOT to use** | Personal work — use `mcp-atlassian-personal` to avoid admin footprint on personal tickets |
80
+ | **Approval required** | Same gate as personal; extra caution given admin scope — all writes need approval |
81
+
82
+ ---
83
+
84
+ ### Service Desk
85
+
86
+ #### `freshservice-mcp`
87
+ | Field | Detail |
88
+ |-------|--------|
89
+ | **Tools** | Tickets: `get_tickets`, `get_ticket_by_id`, `create_ticket`, `update_ticket`, `delete_ticket`, `get_ticket_fields`, `filter_tickets`, `list_all_ticket_conversation`, `create_ticket_note`, `send_ticket_reply`, `get_requested_items` | Agents/Requesters: `get_all_agents`, `get_agent`, `create_agent`, `update_agent`, `filter_agents`, `get_all_requesters`, `get_requester_id`, `create_requester`, `update_requester`, `filter_requesters`, `list_all_requester_fields`, `get_all_requester_groups`, `get_requester_groups_by_id`, `create_requester_group`, `update_requester_group`, `list_requester_group_members`, `add_requester_to_group` | Groups/Products: `get_all_agent_groups`, `getAgentGroupById`, `create_group`, `update_group`, `get_all_products`, `get_products_by_id`, `create_product`, `update_product` | Solutions/Canned: `get_all_solution_category`, `get_solution_category`, `create_solution_category`, `update_solution_category`, `get_list_of_solution_folder`, `get_solution_folder`, `create_solution_folder`, `update_solution_folder`, `get_list_of_solution_article`, `get_solution_article`, `create_solution_article`, `update_solution_article`, `publish_solution_article`, `list_all_canned_response_folder`, `list_canned_response_folder`, `get_all_canned_response`, `get_canned_response` | Service: `create_service_request`, `list_service_items` | Workspace: `get_workspace`, `list_all_workspaces` |
90
+ | **When to use** | IT service desk tickets, hardware requests, onboarding/offboarding, software access requests, agent/group management |
91
+ | **When NOT to use** | Engineering project tracking (use Jira); general team comms (use Slack) |
92
+ | **Approval required** | Auto: all `get_*`, `filter_*`, `list_*` (read). Needs approval: `create_ticket`, `update_ticket`, `delete_ticket`, `send_ticket_reply`, `create_ticket_note`, `create_service_request`, `create_agent`, `update_agent` |
93
+
94
+ ---
95
+
96
+ ### Documentation & Knowledge
97
+
98
+ #### `context7`
99
+ | Field | Detail |
100
+ |-------|--------|
101
+ | **Tools** | `resolve-library-id`, `get-library-docs` |
102
+ | **When to use** | Library/framework API docs, "how do I use X library", version-specific documentation lookup |
103
+ | **When NOT to use** | Internal company docs (use Confluence/Glean); saved personal reading (use Readwise if configured) |
104
+ | **Approval required** | Auto: all read-only |
105
+
106
+ #### `glean_default`
107
+ | Field | Detail |
108
+ |-------|--------|
109
+ | **Tools** | `chat`, `search`, `read_document` |
110
+ | **When to use** | Searching internal Klaviyo knowledge base, finding internal docs, policies, runbooks, past decisions |
111
+ | **When NOT to use** | External library docs (use context7); real-time web search (use WebSearch tool) |
112
+ | **Approval required** | Auto: all read-only |
113
+
114
+ #### `apple-doc-mcp`
115
+ | Field | Detail |
116
+ |-------|--------|
117
+ | **Tools** | `list_technologies`, `get_documentation`, `search_symbols`, `list_container_technologies`, `get_container_documentation`, `search_container_symbols`, `list_containerization_technologies`, `get_containerization_documentation`, `search_containerization_symbols`, `check_updates` |
118
+ | **When to use** | Apple platform development (Swift, SwiftUI, UIKit, AppKit), containerization docs for Apple frameworks |
119
+ | **When NOT to use** | Non-Apple development contexts; general web docs |
120
+ | **Approval required** | Auto: all read-only |
121
+
122
+ ---
123
+
124
+ ### People & CRM
125
+
126
+ #### `lusha`
127
+ | Field | Detail |
128
+ |-------|--------|
129
+ | **Tools** | `contactSearch`, `contactEnrich`, `personBulkLookup`, `companySearch`, `companyEnrich`, `companyBulkLookup`, `contactFilters`, `companyFilters` |
130
+ | **When to use** | Finding contact info for a person or company, enriching a lead with email/phone, company intelligence lookups |
131
+ | **When NOT to use** | Internal employee lookups (use Slack/Glean); existing contacts already in CRM |
132
+ | **Approval required** | Auto: all search/enrich (read from Lusha). Needs approval if results are being written somewhere |
133
+
134
+ ---
135
+
136
+ ### Calendar
137
+
138
+ #### `google-calendar`
139
+ | Field | Detail |
140
+ |-------|--------|
141
+ | **Tools** | `list-calendars`, `list-events`, `get-event`, `search-events`, `create-event`, `create-events`, `update-event`, `delete-event`, `respond-to-event`, `get-freebusy`, `get-current-time`, `list-colors`, `manage-accounts` |
142
+ | **When to use** | Checking schedule, finding free time, creating/updating meetings, responding to invites, scheduling across participants |
143
+ | **When NOT to use** | Non-calendar scheduling (use Jira for sprint planning) |
144
+ | **Approval required** | Auto: `list-calendars`, `list-events`, `get-event`, `search-events`, `get-freebusy`, `get-current-time`, `list-colors` (read). Needs approval: `create-event`, `update-event`, `delete-event`, `respond-to-event` |
145
+
146
+ ---
147
+
148
+ ## 2. Contextual Trigger Map
149
+
150
+ | User says / context contains... | Reach for... | Tool category |
151
+ |----------------------------------|--------------|---------------|
152
+ | "commit", "push", "branch", "PR", "git log", "diff", "staged" | `git` | Version control |
153
+ | "Jira", "ticket", "sprint", "story", "epic", "backlog", "SCRUM" | `mcp-atlassian-personal` | Project mgmt |
154
+ | "IT ticket", "service request", "Freshservice", "hardware request", "onboarding", "access request" | `freshservice-mcp` | Service desk |
155
+ | "Confluence", "wiki", "internal doc", "runbook", "write a page" | `mcp-atlassian-personal` | Documentation |
156
+ | "Slack", "post to channel", "notify the team", "DM", "thread" | `slack` | Communication |
157
+ | "email", "Gmail", "inbox", "draft", "reply to", "send to" | `gmail` | Communication |
158
+ | "calendar", "meeting", "schedule", "free time", "invite", "block time" | `google-calendar` | Calendar |
159
+ | "how do I use [library]", "API docs", "documentation for X framework" | `context7` | Ext. docs |
160
+ | "find in internal docs", "Glean", "search Klaviyo", "company policy" | `glean_default` | Internal knowledge |
161
+ | "screenshot", "test the UI", "click button", "E2E", "browser test" | `playwright` | Testing |
162
+ | "find someone's email", "contact info", "company profile", "person lookup" | `lusha` | CRM/people |
163
+ | "Swift docs", "SwiftUI", "UIKit", "Apple framework", "AppKit" | `apple-doc-mcp` | Apple dev |
164
+ | "think through this", "complex analysis", "multi-step reasoning", "trade-offs" | `sequential-thinking` | Reasoning |
165
+ | "debug browser", "network request", "Chrome DevTools", "performance profile" | `chrome-devtools` | Dev tools |
166
+ | "who is oncall", "search internal", "Klaviyo runbook" | `glean_default` | Internal ops |
167
+ | "IT admin", "org-wide Jira change", "admin Confluence" | `mcp-atlassian` | Admin ops |
168
+ | "highlight", "saved article", "Readwise", "reading list" | *(Readwise — not configured in current settings)* | — |
169
+
170
+ ---
171
+
172
+ ## 3. Multi-MCP Workflows
173
+
174
+ ### W1: Jira Ticket → Research → Implement → PR → Notify Team
175
+ ```
176
+ 1. mcp-atlassian-personal.jira_get_issue → read ticket details
177
+ 2. context7.get-library-docs → research relevant APIs
178
+ 3. git.git_status + git.git_create_branch → prep branch
179
+ 4. [implement code changes]
180
+ 5. git.git_add + git.git_commit → commit work
181
+ 6. slack.slack_post_message → notify team of PR
182
+ ```
183
+
184
+ ### W2: Calendar Check → Draft Message → Email Follow-up
185
+ ```
186
+ 1. google-calendar.get-freebusy → find mutual availability
187
+ 2. google-calendar.search-events → context on existing meetings
188
+ 3. slack.slack_post_message OR slack.slack_reply_to_thread → async coordination
189
+ 4. gmail.draft_email → formal follow-up (needs approval to send)
190
+ 5. google-calendar.create-event → book the slot (needs approval)
191
+ ```
192
+
193
+ ### W3: IT Service Request → Jira Tracking → Slack Update
194
+ ```
195
+ 1. freshservice-mcp.get_ticket_by_id → read service request
196
+ 2. mcp-atlassian-personal.jira_create_issue → create linked engineering task (needs approval)
197
+ 3. freshservice-mcp.update_ticket → update FS ticket with Jira link (needs approval)
198
+ 4. slack.slack_post_message → notify requester's team (needs approval)
199
+ ```
200
+
201
+ ### W4: Bug Report → Code Investigation → Fix → Test → Close
202
+ ```
203
+ 1. mcp-atlassian-personal.jira_get_issue → read bug details
204
+ 2. git.git_log + git.git_diff → inspect recent changes
205
+ 3. glean_default.search → search internal runbooks for context
206
+ 4. [implement fix]
207
+ 5. playwright.browser_navigate + browser_snapshot → visual smoke test
208
+ 6. git.git_add + git.git_commit → commit fix
209
+ 7. mcp-atlassian-personal.jira_transition_issue → close/resolve ticket (needs approval)
210
+ ```
211
+
212
+ ### W5: New Hire Onboarding Request → Access Provisioning → Confirm
213
+ ```
214
+ 1. freshservice-mcp.get_ticket_by_id → read onboarding request
215
+ 2. mcp-atlassian-personal.jira_create_issue → create IT tasks (needs approval)
216
+ 3. lusha.contactEnrich → enrich new hire contact info if needed
217
+ 4. freshservice-mcp.create_requester → add to Freshservice (needs approval)
218
+ 5. slack.slack_post_message → notify IT and manager (needs approval)
219
+ 6. gmail.draft_email → welcome email (needs approval to send)
220
+ ```
221
+
222
+ ### W6: Architecture Research → Documentation → Team Sync
223
+ ```
224
+ 1. context7.get-library-docs → library/framework research
225
+ 2. glean_default.search → find existing internal decisions
226
+ 3. sequential-thinking.sequentialthinking → synthesize trade-offs
227
+ 4. mcp-atlassian-personal.confluence_create_page → write decision doc (needs approval)
228
+ 5. slack.slack_post_message → share with team (needs approval)
229
+ 6. google-calendar.create-event → schedule review meeting (needs approval)
230
+ ```
231
+
232
+ ---
233
+
234
+ ## 4. Approval Gate Annotations
235
+
236
+ ### Auto-execute (safe — read/query/list only)
237
+ | Operation type | Examples |
238
+ |----------------|---------|
239
+ | Read git state | `git_status`, `git_diff`, `git_log`, `git_show`, `git_branch` |
240
+ | Search/list Jira | `jira_search`, `jira_get_issue`, `jira_get_all_projects`, `jira_get_sprint_issues` |
241
+ | Read Confluence | `confluence_get_page`, `confluence_search`, `confluence_get_comments` |
242
+ | Read Freshservice | `get_tickets`, `get_ticket_by_id`, `filter_tickets`, `get_all_agents` |
243
+ | Read calendar | `list-events`, `get-event`, `search-events`, `get-freebusy`, `get-current-time` |
244
+ | Read Slack | `list_channels`, `get_channel_history`, `get_thread_replies`, `get_users` |
245
+ | Read Gmail | `search_emails`, `read_email`, `list_email_labels` |
246
+ | Lookup contacts | `lusha.contactSearch`, `lusha.companySearch`, `lusha.contactEnrich` |
247
+ | Read docs | `context7.get-library-docs`, `glean_default.search`, `apple-doc-mcp.*` |
248
+ | Browser inspect | `playwright.browser_snapshot`, `browser_screenshot`, `browser_console_messages` |
249
+ | Analysis | `sequential-thinking.sequentialthinking` |
250
+
251
+ ### Needs approval (write / mutate / send / delete)
252
+ | Operation type | Examples |
253
+ |----------------|---------|
254
+ | Git write | `git_commit`, `git_checkout`, `git_reset`, `git_create_branch` |
255
+ | Jira write | `jira_create_issue`, `jira_update_issue`, `jira_delete_issue`, `jira_transition_issue`, `jira_add_comment`, `jira_add_worklog` |
256
+ | Confluence write | `confluence_create_page`, `confluence_update_page`, `confluence_delete_page`, `confluence_add_comment` |
257
+ | Freshservice write | `create_ticket`, `update_ticket`, `delete_ticket`, `send_ticket_reply`, `create_ticket_note`, `create_service_request`, `create_agent`, `update_agent` |
258
+ | Calendar write | `create-event`, `update-event`, `delete-event`, `respond-to-event` |
259
+ | Slack write | `slack_post_message`, `slack_reply_to_thread`, `slack_add_reaction` |
260
+ | Gmail write | `send_email`, `draft_email`, `delete_email`, `batch_delete_emails`, `create_filter` |
261
+ | Browser actions | Form submissions, file uploads, page mutations via Playwright |
262
+
263
+ > **Hook enforcement**: `settings.json` registers a `PreToolUse` guard script on `mcp__mcp-atlassian-personal`, `mcp__mcp-atlassian`, `mcp__freshservice-mcp`, `mcp__slack`, and `mcp__gmail`. The guard will intercept write operations — treat any tool in those namespaces as needing user confirmation before proceeding.
264
+
265
+ ---
266
+
267
+ ## 5. Mind Integration Notes (Orient Phase)
268
+
269
+ ### Scan → Match → Gate → Chain
270
+
271
+ ```
272
+ INPUT SCAN (keywords, intent, entities)
273
+
274
+ ├── Domain keyword detected?
275
+ │ └── Yes → look up Contextual Trigger Map (Section 2)
276
+
277
+ ├── Single domain or multi-domain?
278
+ │ ├── Single → pick direct MCP tool
279
+ │ └── Multi → pick workflow from Section 3 or compose ad-hoc chain
280
+
281
+ ├── Approval gate check (Section 4)
282
+ │ ├── Read-only? → auto-proceed
283
+ │ └── Write/send/delete? → surface to user for confirmation
284
+
285
+ └── Execute → synthesize result → continue OODA loop
286
+ ```
287
+
288
+ ### Orient heuristics
289
+
290
+ 1. **Prefer read before write**: Always gather current state (`get_issue`, `git_status`, `list-events`) before proposing mutations.
291
+ 2. **Parallel reads are safe**: `jira_get_issue` + `glean_default.search` + `git_log` can run concurrently — no side effects.
292
+ 3. **Chain writes sequentially**: Write operations must be user-confirmed and ordered — never batch-execute multiple destructive actions.
293
+ 4. **Use personal over admin**: Default to `mcp-atlassian-personal` unless the task explicitly requires IT admin scope.
294
+ 5. **Match specificity**: IT/hardware/access → Freshservice. Engineering work → Jira. Internal knowledge → Glean. External library → context7. Personal saved reading → Readwise (not currently configured).
295
+ 6. **Stop after answer**: If a single read resolves the question, stop. Do not escalate to `sequential-thinking` for simple factual lookups.
296
+ 7. **Guard hook awareness**: Slack, Gmail, Atlassian, and Freshservice write operations are intercepted by the external-action-guard hook — do not attempt to batch them silently.
@@ -0,0 +1,72 @@
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
+ - 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: rename a variable, fix a typo, answer a factual question after one read, add an import, tweak a comment.
17
+
18
+ ## Small
19
+
20
+ `do + test`
21
+
22
+ Signals:
23
+ - 1-3 files
24
+ - one concern
25
+ - clear done state
26
+ - at least one verification step is warranted
27
+ - still reversible without planning overhead
28
+
29
+ Typical examples: implement a simple helper, patch a bug in one area, add or update a focused test, update docs plus one code path.
30
+
31
+ ## Medium
32
+
33
+ `lightweight plan`
34
+
35
+ Signals:
36
+ - multiple changes with ordering
37
+ - moderate uncertainty
38
+ - multi-file or multi-step
39
+ - a bug or feature spans layers but not a full program of work
40
+ - benefits from an explicit short plan before execution
41
+
42
+ Typical examples: fix a flaky test with several hypotheses, add UI + API + tests for one feature, refactor a module with dependent updates.
43
+
44
+ ## Large
45
+
46
+ `brainstorm + plan + executor`
47
+
48
+ Signals:
49
+ - cross-domain work
50
+ - major uncertainty or architectural choice
51
+ - a plan document already exists
52
+ - many files or multiple independent workstreams
53
+ - would benefit from orchestration, parallel execution, or audit passes
54
+
55
+ Typical examples: build a feature from scratch, implement a long plan doc, re-architect a subsystem.
56
+
57
+ ## Boundary: where micro ends and small begins
58
+
59
+ Micro ends the moment any of these become true:
60
+ - more than one meaningful edit is required
61
+ - a test or build check is needed to trust the change
62
+ - the correct change is not self-evident
63
+ - the blast radius is larger than the immediate line or local block
64
+
65
+ ## ADaPT Rule
66
+
67
+ Try the simpler tier first.
68
+ - If it looks small, start small.
69
+ - If it looks medium, see whether a small direct pass resolves it.
70
+ - If it looks large, ask whether a medium plan-plus-execute path is enough before invoking full orchestration.
71
+
72
+ Escalate only when: the simple approach fails, the user explicitly asks for the larger workflow, or the complexity is obvious from the start.