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,189 @@
1
+ ---
2
+ name: ftm-retro
3
+ description: Post-execution self-assessment skill. Automatically triggered after ftm-executor completes a plan. Scores execution across 5 dimensions, identifies what went well and what was slow, writes structured report with improvement suggestions. Use when user says "retro", "retrospective", "how did that go", "execution review", "self-assessment", "ftm retro".
4
+ ---
5
+
6
+ ## Events
7
+
8
+ ### Emits
9
+ - `experience_recorded` — when a task outcome, fix attempt, or blocker is written to the blackboard experience log
10
+ - `pattern_discovered` — when a recurring pattern is identified from accumulated experiences and promoted to patterns.json
11
+ - `task_completed` — when the retro report is saved and the self-assessment session concludes
12
+
13
+ ### Listens To
14
+ - `task_completed` — micro-reflection trigger: record the task outcome as a structured experience entry
15
+ - `error_encountered` — failure analysis: record the error context as a failure experience for pattern learning
16
+ - `bug_fixed` — success recording: record the fix details as a positive experience (what worked, what the root cause was)
17
+
18
+ # FTM Retro — Post-Execution Self-Assessment
19
+
20
+ Structured retrospective system for ftm-executor plans. Scores execution across 5 evidence-based dimensions, surfaces bottlenecks with specifics, and builds a cumulative pattern library that makes each future execution smarter.
21
+
22
+ ## Why This Exists
23
+
24
+ Execution without reflection is a loop with no exit. FTM-retro closes the feedback cycle: every plan run generates a scored report, every report feeds a pattern library, and recurring issues get escalated until they're fixed. The goal is measurable improvement across executions, not vibes.
25
+
26
+ ## Operating Modes
27
+
28
+ ### Mode 1: Auto-triggered by ftm-executor (Phase 6.5)
29
+
30
+ FTM-executor calls this skill after all waves complete and the final commit is made. It passes execution context directly:
31
+
32
+ - Plan title and absolute path
33
+ - Task count and wave count
34
+ - Total agents spawned
35
+ - Per-task audit results: pass/fail/auto-fix counts per phase
36
+ - Codex gate results per wave (pass/fail + any failures found)
37
+ - Total execution duration
38
+ - Errors, blockers, or manual interventions that occurred
39
+
40
+ When invoked in this mode, proceed directly to scoring — all data is available.
41
+
42
+ ### Mode 2: Manual (`/ftm retro`)
43
+
44
+ When invoked without execution context:
45
+
46
+ 1. Search the current project for the most recent `PROGRESS.md` file. Read it fully to reconstruct what ran.
47
+ 2. If no `PROGRESS.md` exists, check `~/.claude/ftm-retros/` for the most recent `.md` file and ask the user which execution they want to review.
48
+ 3. Once context is established, proceed to scoring.
49
+
50
+ Never ask the user to provide data you can find yourself. Read the files.
51
+
52
+ ---
53
+
54
+ ## Scoring Flow
55
+
56
+ Score execution across 5 dimensions. Read `references/protocols/SCORING-RUBRICS.md` for the full rubric for each dimension (scale breakpoints, evidence requirements, formula for Dimension 4).
57
+
58
+ **The 5 dimensions:**
59
+
60
+ 1. **Wave Parallelism Efficiency** — were independent tasks actually dispatched in parallel?
61
+ 2. **Audit Pass Rate** — what percentage of tasks passed ftm-audit on the first attempt?
62
+ 3. **Codex Gate Pass Rate** — what percentage of waves passed the ftm-codex-gate on the first attempt?
63
+ 4. **Retry and Fix Count** — how many total review-fix cycles were needed? Lower is better.
64
+ 5. **Execution Smoothness** — evidence-grounded assessment of blockers, ambiguities, and manual interventions.
65
+
66
+ Every score requires a citation to specific data. If data for a dimension is unavailable, note the gap and score conservatively.
67
+
68
+ ---
69
+
70
+ ## Report Generation
71
+
72
+ ### Step 1: Create retro directory
73
+
74
+ ```bash
75
+ mkdir -p ~/.claude/ftm-retros/
76
+ ```
77
+
78
+ ### Step 2: Check for past retros
79
+
80
+ Before writing anything, check whether any `.md` files exist in `~/.claude/ftm-retros/`. If they do, read them all. You will use them for the Pattern Analysis section.
81
+
82
+ ### Step 3: Write the report
83
+
84
+ Read `references/templates/REPORT-FORMAT.md` for the exact output template, slug generation rules, and section format.
85
+
86
+ Save to: `~/.claude/ftm-retros/{plan-slug}-{YYYY-MM-DD}.md`
87
+
88
+ ---
89
+
90
+ ## Key Behaviors
91
+
92
+ ### Improvement specificity
93
+
94
+ "Improve parallelism" is not an improvement proposal. "Add a dependency pre-check step to ftm-executor Phase 2 that flags tasks with no declared dependencies as parallelizable, and warn when they are dispatched serially" is an improvement proposal. Every proposed improvement must be concrete enough that a future session could implement it from the description alone.
95
+
96
+ ### Pattern escalation
97
+
98
+ Recurring issues that have appeared in 3+ retros without being addressed should be flagged with `[ESCALATED - 3+ occurrences]` and moved to the top of the Proposed Improvements list. These are systemic problems, not one-off noise.
99
+
100
+ ---
101
+
102
+ ## Output
103
+
104
+ After saving the retro file, print to the user:
105
+
106
+ ```
107
+ Retro saved: ~/.claude/ftm-retros/{filename}
108
+
109
+ Overall: {score}/50
110
+ Top issue: {single most impactful bottleneck in one sentence}
111
+ Top suggestion: {single highest-value proposed improvement in one sentence}
112
+ ```
113
+
114
+ Do not print the full report to the terminal — it lives in the file.
115
+
116
+ ---
117
+
118
+ ## Micro-Reflection Mode
119
+
120
+ Micro-reflections are lightweight experience entries recorded after significant actions — not just full executor runs. The mind triggers this mode via the `task_completed`, `error_encountered`, and `bug_fixed` events.
121
+
122
+ ### Trigger Events
123
+ - `task_completed` — any task completion (micro through large)
124
+ - `bug_fixed` — a bug was resolved
125
+ - `error_encountered` — an unexpected error during execution
126
+ - `code_committed` — a meaningful commit was made
127
+ - `plan_generated` — a plan was created from brainstorming
128
+ - `user_correction` — the user corrected the mind's approach
129
+
130
+ ### Reflection Format (Verbal RL)
131
+
132
+ For each trigger, generate a structured reflection:
133
+
134
+ "I [succeeded/failed/partially succeeded] at [task description] because [specific reason].
135
+ Next time I should [concrete actionable adjustment].
136
+ Confidence: [low/medium/high]"
137
+
138
+ ### Experience Entry Creation
139
+
140
+ Write a structured experience entry to `~/.claude/ftm-state/blackboard/experiences/YYYY-MM-DD_task-slug.json`.
141
+
142
+ Key fields:
143
+ - `task_type`: derived from the task
144
+ - `description`: 1-2 sentence summary
145
+ - `approach`: what was tried
146
+ - `outcome`: success/partial/failure
147
+ - `lessons`: concrete, actionable takeaways — the verbal RL reflection above, decomposed into individual lesson strings
148
+ - `complexity_estimated` vs `complexity_actual`: track both for calibration
149
+ - `capabilities_used`: skills, MCPs, and agent types activated
150
+ - `tags`: searchable labels
151
+ - `confidence`: low for first-time observations, medium for confirmed patterns
152
+
153
+ ### Pattern Extraction
154
+
155
+ After writing an experience, check for pattern promotion:
156
+
157
+ 1. Read `experiences/index.json`
158
+ 2. Count entries with overlapping `task_type` AND `tags` that share the same lesson theme
159
+ 3. If 3+ similar experiences exist with the same lesson → promote to `patterns.json`:
160
+ - Choose the appropriate category (codebase_insights, execution_patterns, user_behavior, recurring_issues)
161
+ - Set `confidence: "low"` for newly promoted patterns (3 occurrences)
162
+ - Raise to `"medium"` at 5+, `"high"` at 8+
163
+
164
+ ### Pattern Decay
165
+
166
+ Patterns that are not reinforced within 30 days should have their confidence reduced:
167
+ - `high` → `medium`
168
+ - `medium` → `low`
169
+ - `low` → remove from patterns.json
170
+
171
+ Check for decay when reading patterns.json during any blackboard operation.
172
+
173
+ ### Cold-Start Behavior
174
+
175
+ During the first ~10 interactions (when `experiences/index.json` has `total_count < 10`):
176
+ - Record EVERY completed task, even trivial ones
177
+ - Set `confidence: "low"` on all entries
178
+ - Prioritize breadth of recording over depth of analysis
179
+
180
+ ## Blackboard Write
181
+
182
+ After completing, update:
183
+ 1. `~/.claude/ftm-state/blackboard/context.json`:
184
+ - Set current_task status to "complete"
185
+ - Append decision summary to recent_decisions (cap at 10)
186
+ - Update session_metadata.skills_invoked and last_updated
187
+ 2. Write experience file to `~/.claude/ftm-state/blackboard/experiences/YYYY-MM-DD_task-slug.json`
188
+ 3. Update `experiences/index.json` with the new entry
189
+ 4. Emit `task_completed`
@@ -0,0 +1,89 @@
1
+ # Scoring Rubrics — All 5 Dimensions
2
+
3
+ Detailed rubrics for ftm-retro scoring. Each dimension is scored 0–10 with a citation to specific data. Do not estimate without evidence — if data is missing, note it and score conservatively.
4
+
5
+ ---
6
+
7
+ ## Dimension 1: Wave Parallelism Efficiency (0–10)
8
+
9
+ Were independent tasks actually dispatched in parallel? Could more tasks have been parallelized?
10
+
11
+ - **10**: Every task that could run in parallel did. No serial bottlenecks where parallelism was possible.
12
+ - **7–9**: Minor serial steps that could have been parallel (e.g., final post-processing tasks run sequentially).
13
+ - **4–6**: Significant parallelism opportunities missed. Tasks that had no dependencies ran serially.
14
+ - **1–3**: Nearly all tasks ran serially despite having no dependencies on each other.
15
+ - **0**: Everything was serial regardless of dependency structure.
16
+
17
+ Evidence to cite: wave structure from PROGRESS.md, task dependency graph, agent dispatch timestamps.
18
+
19
+ ---
20
+
21
+ ## Dimension 2: Audit Pass Rate (0–10)
22
+
23
+ What percentage of tasks passed ftm-audit on the first attempt?
24
+
25
+ - **10**: 100% first-pass. No task needed a fix cycle.
26
+ - **8**: 90%+ first-pass. One or two tasks needed minor fixes.
27
+ - **6**: 75–89% first-pass.
28
+ - **4**: 50–74% first-pass. Roughly half the tasks needed audit remediation.
29
+ - **2**: Below 50% first-pass.
30
+ - **0**: Every single task failed audit on the first attempt.
31
+
32
+ Evidence to cite: per-task audit results (pass/fail counts, auto-fix counts, manual-fix counts).
33
+
34
+ ---
35
+
36
+ ## Dimension 3: Codex Gate Pass Rate (0–10)
37
+
38
+ What percentage of waves passed the ftm-codex-gate on the first attempt?
39
+
40
+ - **10**: All waves passed on first gate run.
41
+ - **7–9**: One wave needed a fix-and-retry.
42
+ - **4–6**: Multiple waves needed retries.
43
+ - **1–3**: Most waves failed the gate at least once.
44
+ - **0**: Every wave failed the gate.
45
+
46
+ Evidence to cite: codex gate results per wave (pass/fail, failure types).
47
+
48
+ ---
49
+
50
+ ## Dimension 4: Retry and Fix Count (0–10)
51
+
52
+ How many total review-fix cycles were needed across all tasks and waves? Lower is better.
53
+
54
+ Formula: `score = max(0, 10 - (total_retries / task_count) * 5)`
55
+
56
+ - **10**: Zero retries.
57
+ - **8**: Fewer than 0.5 retries per task on average.
58
+ - **6**: 0.5–1.0 retries per task.
59
+ - **4**: 1–2 retries per task.
60
+ - **2**: 2–3 retries per task.
61
+ - **0**: More than 3 retries per task on average.
62
+
63
+ Evidence to cite: total retries, broken down by type (audit fix, codex gate retry, manual intervention).
64
+
65
+ ---
66
+
67
+ ## Dimension 5: Execution Smoothness (0–10)
68
+
69
+ Subjective but evidence-grounded assessment. Were there blockers, ambiguous plan steps, confusing errors, or required manual interventions?
70
+
71
+ - **10**: Fully autonomous from start to finish. No blockers, no ambiguity, no manual steps.
72
+ - **7–9**: Minor friction — one clarification needed, one unexpected error handled gracefully.
73
+ - **4–6**: Moderate friction — multiple ambiguities, one blocker that paused execution, one manual intervention.
74
+ - **1–3**: Significant friction — repeated blockers, unclear plan steps that caused wrong-direction work, multiple manual interventions.
75
+ - **0**: Execution could not proceed without constant human steering.
76
+
77
+ Evidence to cite: error log entries, any manual interventions recorded in PROGRESS.md, plan ambiguities encountered.
78
+
79
+ ---
80
+
81
+ ## Scoring Principles
82
+
83
+ ### Evidence-first scoring
84
+
85
+ Every score needs a citation. "Tasks passed audit" is not a citation. "12/14 tasks passed audit on first attempt; Tasks 3 and 9 each needed one auto-fix cycle" is a citation. If the data to score a dimension is genuinely unavailable, note the gap explicitly and score conservatively (assume worst case for that dimension).
86
+
87
+ ### No vibes
88
+
89
+ Do not write "the execution felt smooth" or "agents seemed efficient." Write "0 manual interventions were required and all errors were caught and auto-resolved by ftm-audit Phase 2." The report is read by future executions that need to calibrate behavior, not by humans looking for encouragement.
@@ -0,0 +1,109 @@
1
+ # Report Format — Retro Output Template
2
+
3
+ This is the exact format for all retro report files saved to `~/.claude/ftm-retros/`.
4
+
5
+ ---
6
+
7
+ ## File Naming
8
+
9
+ Save to: `~/.claude/ftm-retros/{plan-slug}-{YYYY-MM-DD}.md`
10
+
11
+ ### Slug Generation
12
+
13
+ Take the plan title, lowercase it, replace spaces with hyphens, strip all non-alphanumeric characters except hyphens.
14
+
15
+ Examples:
16
+ - "FTM Ecosystem Expansion" → `ftm-ecosystem-expansion`
17
+ - "Fix Auth Bug + Rate Limiting" → `fix-auth-bug-rate-limiting`
18
+ - "v2.0 API Refactor" → `v20-api-refactor`
19
+
20
+ ---
21
+
22
+ ## Report Template
23
+
24
+ ```markdown
25
+ # Retro: {Plan Title}
26
+
27
+ **Date:** {YYYY-MM-DD}
28
+ **Plan:** {absolute path to plan file}
29
+ **Duration:** {total execution time, e.g. "47 minutes"}
30
+
31
+ ## Scores
32
+
33
+ | Dimension | Score | Notes |
34
+ |-----------|-------|-------|
35
+ | Wave Parallelism | X/10 | {1-sentence justification with data} |
36
+ | Audit Pass Rate | X/10 | {N}/{total} tasks first-pass |
37
+ | Codex Gate Pass Rate | X/10 | {N}/{total} waves first-pass |
38
+ | Retry/Fix Count | X/10 | {total retries} across {N} tasks |
39
+ | Execution Smoothness | X/10 | {1-sentence justification} |
40
+
41
+ **Overall: {sum}/50**
42
+
43
+ ## Raw Data
44
+
45
+ - Tasks: {N}
46
+ - Waves: {N}
47
+ - Agents spawned: {N}
48
+ - Audit findings: {N} total ({N} auto-fixed, {N} manual)
49
+ - Codex gate results: Wave 1: pass | Wave 2: fail → pass | Wave 3: pass
50
+ - Errors/blockers: {list any, or "none"}
51
+
52
+ ## What Went Well
53
+
54
+ {2–4 specific observations, each grounded in a data point or task number.}
55
+
56
+ Example format:
57
+ - **Task 3 (auth middleware)** completed in a single commit with zero audit findings. The agent prompt had clear acceptance criteria and a scoped file list — the agent never wandered.
58
+ - **Wave 2 parallelism** was fully utilized: all 4 tasks dispatched simultaneously, cutting estimated serial time from ~32 minutes to ~9 minutes.
59
+
60
+ ## What Was Slow
61
+
62
+ {2–4 specific bottlenecks with timing data or retry counts where available.}
63
+
64
+ Example format:
65
+ - **ftm-audit Phase 1 (knip)** repeated full project analysis for each task in wave 3, even though tasks only touched 2–3 files each. Added ~40s × 5 tasks = ~3.5 minutes of unnecessary scanning.
66
+ - **Task 7 needed 3 audit fix cycles** due to an import path that kept regenerating incorrectly. The agent prompt did not specify the alias configuration in tsconfig.paths.
67
+
68
+ ## Proposed Improvements
69
+
70
+ {3–5 specific, actionable suggestions. Each must identify: which skill to change, what to change exactly, and why it would help.}
71
+
72
+ Format each as:
73
+ **N. {Short title}** — {Skill to change} — {Specific change} — {Expected impact}
74
+
75
+ Examples:
76
+ 1. **Cache knip results within a wave** — ftm-audit — In Phase 1, check whether knip results are already cached for the current wave (via a temp file at `/tmp/ftm-knip-cache-{wave-id}.json`). Only re-run knip if the cache is missing or if the files changed by this task differ from cached scope. Expected: 3× speedup for ftm-audit on large projects with many tasks per wave.
77
+ 2. **Dispatch Instrumentor and Researcher in parallel** — ftm-debug — These two agents have no shared state and currently run sequentially. Dispatch them simultaneously. Expected: ~40% reduction in ftm-debug total runtime.
78
+ 3. **Add tsconfig.paths to agent context for TypeScript projects** — ftm-executor — When generating agent prompts for TypeScript tasks, include the relevant `paths` aliases from `tsconfig.json`. Expected: eliminates the import-alias regeneration loop that caused 3 retries on Task 7.
79
+
80
+ ## Pattern Analysis
81
+
82
+ {Only include this section if past retros exist in ~/.claude/ftm-retros/}
83
+
84
+ ### Recurring Issues
85
+
86
+ {List problems that appeared in 2 or more retros. Format: "Issue description — appeared in: retro-slug-1, retro-slug-2"}
87
+
88
+ ### Score Trends
89
+
90
+ {Compare overall scores across retros. Are they improving, declining, or stable? Cite actual numbers.}
91
+
92
+ Example: Overall scores: 32/50 → 38/50 → 41/50 across the last 3 retros. Parallelism and smoothness improving; audit pass rate stuck at 6/10 for all three runs.
93
+
94
+ ### Unaddressed Suggestions
95
+
96
+ {List proposed improvements from past retros that have not yet been implemented. These get escalated — flag them explicitly.}
97
+
98
+ Format: "**[ESCALATED]** {suggestion} — first proposed in {retro-slug-date}, appeared {N} times"
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Improvement Specificity Standard
104
+
105
+ "Improve parallelism" is not an improvement proposal. "Add a dependency pre-check step to ftm-executor Phase 2 that flags tasks with no declared dependencies as parallelizable, and warn when they are dispatched serially" is an improvement proposal. Every proposed improvement must be concrete enough that a future session could implement it from the description alone without asking clarifying questions.
106
+
107
+ ## Pattern Escalation Standard
108
+
109
+ Recurring issues that have appeared in 3+ retros without being addressed should be flagged with `[ESCALATED - 3+ occurrences]` and moved to the top of the Proposed Improvements list. These are systemic problems, not one-off noise.
package/ftm-retro.yml ADDED
@@ -0,0 +1,2 @@
1
+ name: ftm-retro
2
+ description: Post-execution self-assessment skill. Automatically triggered after ftm-executor completes a plan. Scores execution across 5 dimensions, identifies what went well and what was slow, writes structured report with improvement suggestions. Use when user says "retro", "retrospective", "how did that go", "execution review", "self-assessment", "ftm retro".
@@ -0,0 +1,4 @@
1
+ ---
2
+ name: ftm-routine
3
+ description: Execute named, recurring multi-step workflows from YAML definitions. Use when user says "routine", "run routine", "ftm-routine", "morning triage", or names a known routine. Routines are reusable workflows stored in ~/.ftm/routines/ that execute through the normal plan-approve flow.
4
+ ---
@@ -0,0 +1,23 @@
1
+ {
2
+ "current_task": {
3
+ "id": null,
4
+ "description": null,
5
+ "type": null,
6
+ "started_at": null,
7
+ "status": null
8
+ },
9
+ "recent_decisions": [],
10
+ "active_constraints": [],
11
+ "user_preferences": {
12
+ "communication_style": null,
13
+ "approval_gates": null,
14
+ "default_model_profile": null
15
+ },
16
+ "session_metadata": {
17
+ "started_at": null,
18
+ "last_updated": null,
19
+ "conversation_id": null,
20
+ "messages_count": 0,
21
+ "skills_invoked": []
22
+ }
23
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "entries": [],
3
+ "metadata": {
4
+ "total_count": 0,
5
+ "last_updated": null,
6
+ "max_entries": 200,
7
+ "pruning_strategy": "remove_oldest_low_confidence"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "codebase_insights": [],
3
+ "execution_patterns": [],
4
+ "user_behavior": [],
5
+ "recurring_issues": []
6
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "context.schema.json",
4
+ "title": "Blackboard Context",
5
+ "description": "Schema for the blackboard session context state file",
6
+ "type": "object",
7
+ "required": [
8
+ "current_task",
9
+ "recent_decisions",
10
+ "active_constraints",
11
+ "user_preferences",
12
+ "session_metadata"
13
+ ],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "current_task": {
17
+ "type": "object",
18
+ "description": "The task currently being executed in this session",
19
+ "required": ["id", "description", "type", "started_at", "status"],
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "id": {
23
+ "type": ["string", "null"],
24
+ "description": "Unique identifier for the task"
25
+ },
26
+ "description": {
27
+ "type": ["string", "null"],
28
+ "description": "Human-readable description of the task"
29
+ },
30
+ "type": {
31
+ "type": ["string", "null"],
32
+ "description": "Category or type of task (e.g. feature, bugfix, refactor)"
33
+ },
34
+ "started_at": {
35
+ "type": ["string", "null"],
36
+ "format": "date-time",
37
+ "description": "ISO 8601 timestamp when the task was started"
38
+ },
39
+ "status": {
40
+ "type": ["string", "null"],
41
+ "enum": [null, "pending", "in_progress", "complete", "failed"],
42
+ "description": "Current execution status of the task"
43
+ }
44
+ }
45
+ },
46
+ "recent_decisions": {
47
+ "type": "array",
48
+ "description": "Log of decisions made during this session (capped at 10)",
49
+ "maxItems": 10,
50
+ "items": {
51
+ "type": "object",
52
+ "required": ["summary", "timestamp", "skill"],
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "summary": {
56
+ "type": "string",
57
+ "description": "Brief description of the decision made"
58
+ },
59
+ "timestamp": {
60
+ "type": "string",
61
+ "description": "When the decision was recorded"
62
+ },
63
+ "skill": {
64
+ "type": "string",
65
+ "description": "The skill that produced this decision"
66
+ }
67
+ }
68
+ }
69
+ },
70
+ "active_constraints": {
71
+ "type": "array",
72
+ "description": "List of constraints currently in effect for this session",
73
+ "items": {
74
+ "type": "string"
75
+ }
76
+ },
77
+ "user_preferences": {
78
+ "type": "object",
79
+ "description": "Preferences established or inferred during the session",
80
+ "required": ["communication_style", "approval_gates", "default_model_profile"],
81
+ "additionalProperties": false,
82
+ "properties": {
83
+ "communication_style": {
84
+ "type": ["string", "null"],
85
+ "description": "Preferred tone and verbosity level (e.g. concise, detailed)"
86
+ },
87
+ "approval_gates": {
88
+ "type": ["string", "null"],
89
+ "description": "Approval gate setting (e.g. always, on_destructive, never)"
90
+ },
91
+ "default_model_profile": {
92
+ "type": ["string", "null"],
93
+ "description": "Model profile to use by default when not overridden"
94
+ }
95
+ }
96
+ },
97
+ "session_metadata": {
98
+ "type": "object",
99
+ "description": "Metadata tracking the lifecycle and activity of this session",
100
+ "required": ["started_at", "last_updated", "conversation_id", "messages_count", "skills_invoked"],
101
+ "additionalProperties": false,
102
+ "properties": {
103
+ "started_at": {
104
+ "type": ["string", "null"],
105
+ "description": "ISO 8601 timestamp when the session began"
106
+ },
107
+ "last_updated": {
108
+ "type": ["string", "null"],
109
+ "description": "ISO 8601 timestamp of the most recent write to this file"
110
+ },
111
+ "conversation_id": {
112
+ "type": ["string", "null"],
113
+ "description": "Identifier for the conversation this session belongs to"
114
+ },
115
+ "messages_count": {
116
+ "type": "integer",
117
+ "minimum": 0,
118
+ "description": "Number of messages exchanged in the session so far"
119
+ },
120
+ "skills_invoked": {
121
+ "type": "array",
122
+ "description": "Ordered list of skill names invoked during this session",
123
+ "items": {
124
+ "type": "string"
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "experience-index.schema.json",
4
+ "title": "Blackboard Experience Index",
5
+ "description": "Schema for the experience index file that tracks all stored experience entries",
6
+ "type": "object",
7
+ "required": ["entries", "metadata"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "entries": {
11
+ "type": "array",
12
+ "description": "Index records pointing to individual experience files",
13
+ "items": {
14
+ "type": "object",
15
+ "required": ["id", "file", "task_type", "tags", "timestamp", "confidence"],
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "id": {
19
+ "type": "string",
20
+ "description": "Unique identifier for this experience entry"
21
+ },
22
+ "file": {
23
+ "type": "string",
24
+ "description": "Relative path to the experience JSON file (e.g. YYYY-MM-DD_task-slug.json)"
25
+ },
26
+ "task_type": {
27
+ "type": "string",
28
+ "description": "Category of task this experience was recorded from"
29
+ },
30
+ "tags": {
31
+ "type": "array",
32
+ "description": "Labels for filtering and retrieval",
33
+ "items": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "timestamp": {
38
+ "type": "string",
39
+ "description": "ISO 8601 timestamp when the experience was recorded"
40
+ },
41
+ "confidence": {
42
+ "type": "number",
43
+ "minimum": 0,
44
+ "maximum": 1,
45
+ "description": "Confidence score for this experience (0.0 = low, 1.0 = high)"
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "metadata": {
51
+ "type": "object",
52
+ "description": "Administrative metadata about the experience index",
53
+ "required": ["total_count", "last_updated", "max_entries", "pruning_strategy"],
54
+ "additionalProperties": false,
55
+ "properties": {
56
+ "total_count": {
57
+ "type": "integer",
58
+ "minimum": 0,
59
+ "description": "Total number of experience entries in the index"
60
+ },
61
+ "last_updated": {
62
+ "type": ["string", "null"],
63
+ "description": "ISO 8601 timestamp of the most recent write to this index"
64
+ },
65
+ "max_entries": {
66
+ "type": "integer",
67
+ "default": 200,
68
+ "description": "Maximum number of entries to retain before pruning is triggered"
69
+ },
70
+ "pruning_strategy": {
71
+ "type": "string",
72
+ "description": "Strategy used to remove entries when max_entries is exceeded (e.g. remove_oldest_low_confidence)"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }