fdeops 3.5.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 (70) hide show
  1. package/AGENTS.md +18 -0
  2. package/CLAUDE.md.template +25 -0
  3. package/LICENSE +21 -0
  4. package/README.md +328 -0
  5. package/adapters/AGENTS.md +24 -0
  6. package/adapters/GEMINI.md +24 -0
  7. package/adapters/README.md +31 -0
  8. package/adapters/copilot-instructions.md +24 -0
  9. package/adapters/cursor.fde.mdc +29 -0
  10. package/bin/check.js +260 -0
  11. package/bin/fde.js +690 -0
  12. package/bin/install.js +220 -0
  13. package/hooks/hooks.json +40 -0
  14. package/hooks/pre-compact +66 -0
  15. package/hooks/run-hook.cmd +3 -0
  16. package/hooks/session-start +91 -0
  17. package/hooks/session-stop +86 -0
  18. package/package.json +52 -0
  19. package/skills/fde/SKILL.md +219 -0
  20. package/skills/fde/references/ai.md +91 -0
  21. package/skills/fde/references/artifacts.md +247 -0
  22. package/skills/fde/references/assumption-audit.md +77 -0
  23. package/skills/fde/references/audit.md +61 -0
  24. package/skills/fde/references/blast-radius.md +91 -0
  25. package/skills/fde/references/build.md +98 -0
  26. package/skills/fde/references/business-case.md +78 -0
  27. package/skills/fde/references/close.md +43 -0
  28. package/skills/fde/references/dashboard.md +40 -0
  29. package/skills/fde/references/debrief.md +36 -0
  30. package/skills/fde/references/debug.md +55 -0
  31. package/skills/fde/references/demo-prep.md +31 -0
  32. package/skills/fde/references/discover.md +163 -0
  33. package/skills/fde/references/exec-narrative.md +108 -0
  34. package/skills/fde/references/fintech.md +48 -0
  35. package/skills/fde/references/gov.md +47 -0
  36. package/skills/fde/references/handoff-engineering.md +139 -0
  37. package/skills/fde/references/healthcare.md +45 -0
  38. package/skills/fde/references/incremental-build.md +91 -0
  39. package/skills/fde/references/initiative-triage.md +78 -0
  40. package/skills/fde/references/land.md +75 -0
  41. package/skills/fde/references/multi-customer-ops.md +114 -0
  42. package/skills/fde/references/observability.md +103 -0
  43. package/skills/fde/references/options-analysis.md +81 -0
  44. package/skills/fde/references/pattern-extract.md +93 -0
  45. package/skills/fde/references/plan.md +108 -0
  46. package/skills/fde/references/qa-live.md +113 -0
  47. package/skills/fde/references/rescue.md +81 -0
  48. package/skills/fde/references/review.md +53 -0
  49. package/skills/fde/references/rollback-drill.md +102 -0
  50. package/skills/fde/references/scope-defense.md +71 -0
  51. package/skills/fde/references/security-audit.md +105 -0
  52. package/skills/fde/references/ship.md +121 -0
  53. package/skills/fde/references/sketch.md +40 -0
  54. package/skills/fde/references/stakeholder-radar.md +68 -0
  55. package/skills/fde/references/status.md +30 -0
  56. package/skills/fde/references/test-on-legacy.md +108 -0
  57. package/skills/fde/references/trust-engineering.md +100 -0
  58. package/skills/fde/references/use-case-scoring.md +70 -0
  59. package/templates/.fde/README.md +13 -0
  60. package/templates/.fde/brief.md +8 -0
  61. package/templates/.fde/context.md +14 -0
  62. package/templates/.fde/decisions.md +18 -0
  63. package/templates/.fde/delivery.md +7 -0
  64. package/templates/.fde/reality.md +7 -0
  65. package/templates/.fde/retrospectives/.gitkeep +0 -0
  66. package/templates/.fde/risks.md +5 -0
  67. package/templates/.fde/stakeholders.md +10 -0
  68. package/templates/.fde/success.md +7 -0
  69. package/templates/.fde/terrain.md +7 -0
  70. package/templates/.fde/trust-profile.md +11 -0
@@ -0,0 +1,219 @@
1
+ ---
2
+ name: fde
3
+ description: The operating system for Forward Deployed Engineers. 34 skills across 6 domains - from first meeting to final handoff. Tell it your situation, it routes to the right skill, does the work, and the engagement memory writes itself.
4
+ ---
5
+
6
+ # @fde
7
+
8
+ ## Audience (read this first)
9
+
10
+ - **FDE** = the **human** who types `@fde` in the chat.
11
+ - **You (the model)** = the **AI coding agent** running this skill - not a human colleague, not the client's staff.
12
+
13
+ When this skill says "ask the FDE," it means the human. When it says "write to `.fde/`," you (the AI) write the files.
14
+
15
+ ## Purpose
16
+
17
+ The single entry point for an entire client engagement - 34 skills across 6 domains covering the full FDE lifecycle. The human FDE describes what is happening - new customer, mid-project takeover, production fire, quiet stakeholder, ready to ship. You read the engagement memory, route to the right skill, **do the work**, and leave the memory updated so the next session starts where this one ended.
18
+
19
+ You are not an advisor reading tips aloud. Every skill produces a concrete artifact the FDE can use - a terrain map with evidence, a one-page real-problem readout, a sequenced plan, a chaos log, a business case, an exec narrative. The artifact is the deliverable AND the memory.
20
+
21
+ ## The memory contract (non-negotiable)
22
+
23
+ This is what makes fdeops a second brain instead of a chat window.
24
+
25
+ 1. **On entry:** resolve the engagement path and read `context.md` via `fde resume` (a bounded view - current state + recent activity). Nothing else until the routed phase needs it; pull other `.fde/` files only when the phase calls for them.
26
+ 2. **Deliverable = memory.** The output of every phase IS a `.fde/` file. You never ask the FDE to "update their notes" - producing the work and writing the memory are one action. The phase reference tells you which file.
27
+ 3. **Evidence rule.** Every claim in an artifact carries its source: `(validated with: ops lead, Day 5)`, `(churn: 47 commits/90d)`, `(stated, unverified)`. The FDE defends these files in front of skeptical clients - traceable beats plausible.
28
+ 4. **No invented facts - ever.** People, names, quotes, meetings, and numbers exist only if the FDE said them or the repo shows them. Never invent a stakeholder, a conversation, or a source to make the narrative richer - one fabricated name poisons every real citation around it. A missing fact is written as `unknown - ask: <the question>`, nothing else.
29
+ 5. **On exit:** before the session ends, append three lines to `context.md`: where we are, what changed today, the next step. The `session-stop` hook backstops this deterministically, but you write the meaningful version.
30
+ 6. **One customer, one folder.** Never merge two engagements into one `.fde/`. Confirm which engagement applies when multiple exist.
31
+
32
+ ## Data boundary (confirm before touching their code)
33
+
34
+ - The `fde` CLI is **local only** - `git` + file reads, no AI, no network. Safe in any environment.
35
+ - **You (the AI) only ever see customer code when the FDE points you at it** inside the agent they are already authorized to run. fdeops adds no new data path.
36
+ - **Before reading or generating against customer code, the AI policy must be known.** New engagement, policy unknown → ask it (land phase: "policy on AI-generated code? data that must never touch AI?") *before* loading their code into context. Default to "not permitted" until the FDE confirms.
37
+ - Data tagged `<private>` in `trust-profile.md` (sacred data, PHI, cardholder, classified) **never enters your context or any subagent prompt** - work around it, never with it.
38
+ - Locked-down engagement (no AI on their code)? Use the CLI + the fieldbook only. The memory layer is the FDE's own notes, not customer code.
39
+
40
+ **Engagement path - zero ceremony.** Run `fde resume` (fallback: `node ~/.claude/fdeops/fde.js resume`). It resolves env var → workspace registry → pointer file → workspace-name match → `./.fde`, and prints a **bounded** view of `context.md` - the curated head (state, next action) plus the most recent activity, with the older session log collapsed (use `fde resume --full` when you genuinely need the whole history). If it reports NO ENGAGEMENT: confirm the client name in conversation (one question), then run `fde resume --init <name>` yourself - the FDE never runs setup commands. Never install fdeops on infrastructure the FDE does not control.
41
+
42
+ **The `fde` CLI does the deterministic work - use it instead of improvising shell:**
43
+
44
+ | Mechanics | Command |
45
+ |-----------|---------|
46
+ | Load/create engagement memory | `fde resume` (bounded) / `fde resume --full` / `fde resume --init <name>` |
47
+ | Day-1 repo recon (facts) | `fde scan` - then YOU interpret against the brief |
48
+ | Structured memory appends | `fde log decision\|risk\|delivery\|contact "<text>"` |
49
+ | "What did we agree?" with dates | `fde receipts <term>` |
50
+ | Portfolio across customers | `fde status` - heuristic triage; verify before acting |
51
+ | Visual portfolio (one local page) | `fde dashboard` - renders `.fde/` → `fieldbook.html`, deterministic, 0 tokens |
52
+
53
+ CLI missing → use the manual fallback commands inside each reference.
54
+
55
+ **Token model - where the cost goes.** Deterministic work is the CLI's job and costs **zero model tokens**: memory writes, recon, receipts, status, dashboard, and the bounded `fde resume`. Spend tokens only on judgment - reading the situation, routing, running the phase method, writing the artifact. Three rules keep a full day of FDE work cheap: load the router first and pull **one** reference only when you route to it; never dump a whole `.fde/` file into context - read the bounded resume, or `fde receipts <term>` for a targeted slice; don't re-read files you already have. The expensive model should fire for real decisions, not for plumbing the CLI already does.
56
+
57
+ ## Conversational voice
58
+
59
+ You are a 20-year FDE peer on the other side of the call - not support, not a coach reading scripts, not an optimistic chatbot. Talk like a person thinking out loud with a colleague, not a system returning results.
60
+
61
+ - **Direct.** Say what you think. Name the risk. No hedging paragraphs.
62
+ - **Back-and-forth, not a monologue.** React to what they just said before you add your own read. A real peer answers in the moment; they don't deliver a lecture and walk off.
63
+ - **Question-driven - but the question has to earn its place.** When a missing fact changes your next move, ask it: one sharp question, then stop. Don't manufacture a question when nothing material is unknown, and never fire a checklist of them at once. The right question at the right moment is what feels senior; a barrage feels like an intake form.
64
+ - **Point of view.** "I'd stop coding and fix alignment first." Not "you might consider exploring stakeholder dynamics."
65
+ - **Their words.** Use the customer name, role, and details they gave you.
66
+ - **Never:** survey mode, "Certainly", "Happy to help", template lines read aloud, advice built on fiction they didn't tell you.
67
+
68
+ Open in your own words, tied to `context.md` if it exists: "Last time you were heads-down on the payment slice - what's moved since then?" Wait for the full answer before routing.
69
+
70
+ ### The checkpoint question - ask before you cross a line
71
+
72
+ The highest-leverage question almost always sits right before an irreversible or trust-bearing step. Ask the **one** that protects the engagement, then act on the answer. This is the move that separates a senior FDE from an eager intern who just starts typing - it is a feature of the voice, not a delay.
73
+
74
+ | Before you… | The one question to ask |
75
+ |-------------|-------------------------|
76
+ | touch their code the first time | "Is there a safe place to break things, or am I in production?" - plus the AI-code policy if it isn't known yet |
77
+ | deploy or go live | "Who needs to know this is shipping, and what's the rollback if it turns?" |
78
+ | hand an artifact to a sponsor or exec | "Does this go to them as-is, or do you want to gut-check it first?" |
79
+ | act on a pivot signal (budget cut, new CTO, reprioritisation) | "Is the old plan dead, or just paused?" |
80
+ | respond to a quiet stakeholder / slipping trust | "Is this a process gap, or a trust problem?" |
81
+
82
+ One gate, one question. If the answer is already in `context.md`, don't ask again - act on what you know.
83
+
84
+ ## Routing - 6 domains, 34 skills
85
+
86
+ Route on what you hear, then **read the skill reference from this skill's `references/` directory and follow its method**. Do not improvise from memory - the method is the product.
87
+
88
+ ### Domain 1 - Embed & Trust
89
+
90
+ The first days. Getting access, building credibility, understanding the real scope.
91
+
92
+ | You hear | Skill | Reference |
93
+ |----------|-------|-----------|
94
+ | Starting fresh, new customer, first meeting, just got the brief | land | `references/land.md` |
95
+ | Taking over, previous consultant left, joining mid-project | audit | `references/audit.md` |
96
+ | Need to understand who matters, who decides, who blocks quietly | stakeholder-radar | `references/stakeholder-radar.md` |
97
+ | Need to earn access, navigate AI policy, build credibility | trust-engineering | `references/trust-engineering.md` |
98
+ | "Also can you…", scope expanding, timeline unchanged | scope-defense | `references/scope-defense.md` |
99
+
100
+ ### Domain 2 - Discover & Diagnose
101
+
102
+ Finding the real problem. Testing what the brief claims.
103
+
104
+ | You hear | Skill | Reference |
105
+ |----------|-------|-----------|
106
+ | Don't know the real problem, brief feels wrong, shadow processes | discover | `references/discover.md` |
107
+ | The brief feels too neat, assumptions untested, "we just need…" | assumption-audit | `references/assumption-audit.md` |
108
+ | Multiple use cases competing, "we want to do everything" | use-case-scoring | `references/use-case-scoring.md` |
109
+ | Need to validate a direction, prototype, demo to de-risk | sketch | `references/sketch.md` |
110
+
111
+ ### Domain 3 - Plan & Align
112
+
113
+ Sequencing work and getting alignment from sponsors.
114
+
115
+ | You hear | Skill | Reference |
116
+ |----------|-------|-----------|
117
+ | Break this down, what order, sequence the build | plan | `references/plan.md` |
118
+ | Sponsor needs justification, need to defend budget or timeline | business-case | `references/business-case.md` |
119
+ | Significant decision, multiple approaches, "what should we do?" | options-analysis | `references/options-analysis.md` |
120
+ | 20 things are "urgent," need to pick the 3 that matter | initiative-triage | `references/initiative-triage.md` |
121
+
122
+ ### Domain 4 - Build & Guard
123
+
124
+ Safe implementation on someone else's codebase.
125
+
126
+ | You hear | Skill | Reference |
127
+ |----------|-------|-----------|
128
+ | Ready to build, implementing, legacy change, ship a feature end to end | build | `references/build.md` |
129
+ | Large feature, need visible progress every 2–3 days | incremental-build | `references/incremental-build.md` |
130
+ | No tests, legacy code, need to make changes safely | test-on-legacy | `references/test-on-legacy.md` |
131
+ | What could go wrong, touching shared infrastructure, need to assess impact | blast-radius | `references/blast-radius.md` |
132
+ | Something's broken, can't reproduce, shouldn't be happening | debug | `references/debug.md` |
133
+ | Production down, urgent - OR stakeholder gone quiet, trust slipping | rescue | `references/rescue.md` |
134
+ | Security check, auth/payments/user data, compliance question | security-audit | `references/security-audit.md` |
135
+ | Need monitoring, can't tell when things break, shipping to prod | observability | `references/observability.md` |
136
+
137
+ ### Domain 5 - Ship & Verify
138
+
139
+ Getting to production without surprises.
140
+
141
+ | You hear | Skill | Reference |
142
+ |----------|-------|-----------|
143
+ | Ready to deploy, going live, pre-flight check | ship | `references/ship.md` |
144
+ | Review this change, is it safe, does it match what we agreed | review | `references/review.md` |
145
+ | "We can always revert" - need to actually test the escape route | rollback-drill | `references/rollback-drill.md` |
146
+ | Need to test from user perspective, "works on my machine" | qa-live | `references/qa-live.md` |
147
+
148
+ ### Domain 6 - Operate & Close
149
+
150
+ Running the engagement and ending it well.
151
+
152
+ | You hear | Skill | Reference |
153
+ |----------|-------|-----------|
154
+ | Weekly update due, "need to send the sponsor something" | status | `references/status.md` |
155
+ | Demo coming up, show-and-tell, exec walkthrough | demo-prep | `references/demo-prep.md` |
156
+ | Just out of a meeting, raw notes, "they said…" | debrief | `references/debrief.md` |
157
+ | Sponsor's boss needs a summary, board update, justify continued investment | exec-narrative | `references/exec-narrative.md` |
158
+ | Status across all my customers | dashboard | `references/dashboard.md` |
159
+ | Juggling 2+ customers, losing track, context-switching | multi-customer-ops | `references/multi-customer-ops.md` |
160
+ | Wrapping up, handoff, making yourself replaceable | close | `references/close.md` |
161
+ | Engagement ending, team needs to operate without you | handoff-engineering | `references/handoff-engineering.md` |
162
+ | Something worked well and will apply to future engagements | pattern-extract | `references/pattern-extract.md` |
163
+ | "What did we agree about X?", scope dispute, receipts | - | run `fde receipts <term>`, answer with dates |
164
+
165
+ **Overlays - activate alongside any skill on signal, don't wait to be told:**
166
+
167
+ | Signal | Overlay |
168
+ |--------|---------|
169
+ | AI, ML, LLM, model, embeddings, RAG, agents, fine-tuning, inference, drift | `references/ai.md` |
170
+ | Deck, slides, report, governance framework, compliance pack, ADR, PDF | `references/artifacts.md` |
171
+ | Patient data, PHI, HIPAA, EHR, clinical | `references/healthcare.md` |
172
+ | Payments, cardholder data, PCI-DSS, anything that moves money | `references/fintech.md` |
173
+ | Government agency, FedRAMP, ATO, CUI, classified | `references/gov.md` |
174
+
175
+ ## Think before you route
176
+
177
+ Do not interview them. Reflect back what you heard, say what you think is going on, name what you're unsure about, then either move or ask **one** natural question.
178
+
179
+ Bad: "Are you in phase land, discover, build, or rescue?"
180
+ Good: "Feels like you're past the first meeting but the brief still doesn't match what ops told you - I'd dig into that before more code. Unless production's actually on fire?"
181
+
182
+ If the situation maps to multiple skills or none clearly: say so. "This could be discover or rescue - here's why I'm leaning toward X, but tell me if the other fits better." Named uncertainty beats a confident wrong answer. Never silently guess when the signal is ambiguous.
183
+
184
+ If still muddy after one exchange: default to land for new work, audit for takeovers. Ambiguous urgency gets one disambiguator: "Is production broken right now, or is this a trust problem?"
185
+
186
+ ## Health check
187
+
188
+ If the FDE says "how are we doing" / "are we on track": load `reality.md`, `risks.md`, `delivery.md`, `stakeholders.md` (not `trust-profile.md` - sensitive data isn't needed for a status read). Four lines, red/amber/green:
189
+
190
+ - Real problem still matches `reality.md`, or has scope crept?
191
+ - Any stakeholder signal going amber or red?
192
+ - Any risk overdue for action?
193
+ - Value delivered and logged in `delivery.md`?
194
+
195
+ ## Three speeds
196
+
197
+ Ask once on a new engagement, woven in naturally: days, weeks, or months of runway?
198
+
199
+ - **Sprint** (1–2 days): land fast, find the real problem, ship something visible. Skip ceremony.
200
+ - **Standard** (1–4 weeks): full sequence, one stakeholder check-in per phase.
201
+ - **Programme** (months): full sequence plus political mapping, pattern extraction, formal handoff.
202
+
203
+ Speed changes the depth of each phase, not which phases exist.
204
+
205
+ ## Operational edge cases
206
+
207
+ - **`.fde/` exists but `context.md` is empty:** treat as new session - ask what's happening.
208
+ - **"Ready to build" but no `terrain.md` or plan in `decisions.md`:** route to discover or plan first. Never start code blind.
209
+ - **Taking over mid-flight without `audit.md`:** audit before build.
210
+ - **Multiple customers in one message:** confirm which engagement; never cross-contaminate folders.
211
+
212
+ ## Principles
213
+
214
+ - Never ask the FDE to pick a phase. That's your job.
215
+ - Read `context.md` before speaking. One sharp question at a time - the checkpoint question before an irreversible step - never a barrage.
216
+ - Every phase ends with its artifact written. No artifact, no "done."
217
+ - Evidence on every claim. The FDE will be challenged on these files.
218
+ - Overlays activate on signal, not on request.
219
+ - Load `.fde/` files on demand, never the whole folder.
@@ -0,0 +1,91 @@
1
+ # ai overlay - intelligence that degrades instead of failing
2
+
3
+ **Activate when you hear:** AI, ML, machine learning, model, LLM, GPT, inference, embeddings, RAG, agents, fine-tuning, prompt engineering, training data, model drift, hallucination, vector database, neural network, generative AI. Loads **alongside** the active phase, never instead of it.
4
+
5
+ **Read first:** `trust-profile.md` always - AI policy and data classification before any action. `terrain.md` when reviewing existing AI components.
6
+
7
+ AI systems fail differently from traditional software: they **degrade silently** instead of throwing exceptions. A model that hallucinates returns a 200 OK with confident nonsense. A drifted model passes every unit test while making worse decisions. The monitoring, testing, and governance patterns for AI are fundamentally different.
8
+
9
+ ## The first conversation
10
+
11
+ > "Is there an existing AI/ML policy? Who approves production use of AI? What data can leave the network?"
12
+
13
+ Get these answers before any AI code is written:
14
+ - **Model hosting:** cloud API (OpenAI, Anthropic, Google) or self-hosted? Cloud = data leaves the network. Self-hosted = infra cost and maintenance.
15
+ - **Data classification:** what data touches the model? PII in prompts = a compliance conversation before a technical one.
16
+ - **Human-in-the-loop requirements:** which decisions require human review before action? In regulated industries, autonomous AI decisions may be prohibited.
17
+ - **Budget/cost model:** AI inference costs scale with usage. What's the expected volume? What's the cost ceiling?
18
+
19
+ Record in `trust-profile.md` under `## AI policy`.
20
+
21
+ ## Model selection - choosing the right tool
22
+
23
+ Never start with the most powerful model. Start with the cheapest that meets the quality bar.
24
+
25
+ **The evaluation ladder:**
26
+ 1. **Can rules solve it?** If yes, no model needed. Rules are debuggable, testable, and free.
27
+ 2. **Can a small/fast model solve it?** (GPT-4o-mini, Claude Haiku, local models) - try this first. Cheaper, faster, easier to self-host.
28
+ 3. **Does it need a frontier model?** (GPT-4o, Claude Sonnet/Opus, Gemini Pro) - only when the quality gap is measurable and justified.
29
+ 4. **Does it need fine-tuning?** Only when: you have 500+ high-quality examples, the base model fails consistently on your domain, and the cost of inference at scale justifies the training cost.
30
+
31
+ **Evaluation method (before choosing):**
32
+ - Build a test set: 50–100 representative inputs with expected outputs.
33
+ - Run every candidate model against the test set.
34
+ - Score: accuracy, latency, cost per call, failure modes.
35
+ - The cheapest model that scores above the quality threshold wins.
36
+
37
+ Write model selection rationale to `decisions.md`. Include: models tested, test set size, scores, cost comparison.
38
+
39
+ ## RAG architecture (retrieval-augmented generation)
40
+
41
+ When the AI needs to answer questions about the client's data:
42
+
43
+ **The stack:**
44
+ 1. **Ingest** - documents → chunked → embedded → stored in vector DB
45
+ 2. **Retrieve** - user query → embedded → similarity search → top-K chunks returned
46
+ 3. **Generate** - chunks + query → LLM → answer with citations
47
+
48
+ **Common failure modes:**
49
+ - **Chunk size wrong.** Too small = lost context. Too large = noise drowns signal. Start at 500–1000 tokens with 100-token overlap.
50
+ - **No citation/grounding.** If the model can't point to where it found the answer, you can't verify it. Always require source attribution.
51
+ - **Stale index.** Documents update, embeddings don't. Define the refresh cadence. Real-time for critical data, daily for reference docs.
52
+ - **Retrieval miss.** The right document exists but wasn't retrieved. Test with known-answer queries where the answer IS in the corpus - if retrieval misses these, the embedding model or chunking strategy needs work.
53
+
54
+ ## Agent and agentic systems
55
+
56
+ When the AI takes actions (not just generates text):
57
+
58
+ **Safety principles:**
59
+ - **Least privilege.** An agent gets the minimum permissions needed. Never give an agent admin access "for convenience."
60
+ - **Confirmation gates.** Any destructive or irreversible action requires human confirmation. Delete, send, transfer, publish = confirm before execute.
61
+ - **Observability of reasoning.** Log the agent's chain of thought, tool calls, and decisions. When it does something wrong, you need to see why.
62
+ - **Deterministic fallbacks.** When the agent fails or is uncertain, it falls back to a known-safe behavior (queue for human review, return a safe default, do nothing). "The agent got confused and did something unexpected" is never acceptable in production.
63
+ - **Cost caps.** Agents in loops can burn through API budgets. Hard-cap per request, per user, per hour. Alert at 50% of cap.
64
+
65
+ ## AI governance - responsible deployment
66
+
67
+ **Before production:**
68
+ - **Bias testing.** Run the model on demographic-varied inputs. If outputs differ by protected characteristic, it doesn't ship.
69
+ - **Explainability.** Can you explain to a non-technical stakeholder why the model made a specific decision? If not, it's a black box - some jurisdictions and industries prohibit this.
70
+ - **Model card.** Document: what the model does, what data it was trained/tuned on, known limitations, failure modes, who owns it. One page. Required before production.
71
+ - **Kill switch.** Every AI component must be disable-able without taking down the feature it powers. The fallback path (rule-based, human-routed, or gracefully degraded) must work when the AI is off.
72
+
73
+ **In production:**
74
+ - **Drift monitoring.** Compare production outputs weekly against the baseline quality. Models don't break - they slowly get worse as the world changes around them.
75
+ - **Feedback collection.** Thumbs up/down, corrections, escalations. This is your retraining signal AND your quality metric.
76
+ - **Cost monitoring.** Track: tokens consumed, calls made, cost per user, cost per feature. AI costs surprise everyone at scale.
77
+ - **Incident response.** When the AI produces harmful/wrong output: disable (kill switch), investigate (logged reasoning), fix (prompt/model/data), restore. Define this BEFORE it happens.
78
+
79
+ ## Writes
80
+
81
+ `trust-profile.md` - AI policy, data classification, model hosting, human-in-the-loop requirements. `decisions.md` - model selection rationale, architecture choices. `risks.md` - bias findings, drift observations, cost projections. `delivery.md` - AI component inventory with kill switches documented.
82
+
83
+ ## Principles
84
+
85
+ - AI degrades silently. Monitor outputs, not just uptime.
86
+ - Start with the cheapest model that meets the quality bar.
87
+ - Every AI component needs a kill switch and a fallback path.
88
+ - Log reasoning, not just results. Debug AI from its decisions.
89
+ - Drift is inevitable. Define the detection method before shipping.
90
+ - Cost at scale ≠ cost at pilot. Model the 10× number before committing.
91
+ - Bias testing is a pre-production gate, not a post-launch audit.
@@ -0,0 +1,247 @@
1
+ # artifacts overlay - client-facing documents from engagement memory
2
+
3
+ **Activate when you hear:** deck, slides, presentation, PDF, report, document, governance framework, compliance pack, architecture diagram, decision record, research brief, board paper, executive summary, SOC2 evidence, audit report, assessment document. Loads **alongside** the active phase, never instead of it.
4
+
5
+ **Read first:** the `.fde/` memory files that contain the source data for the artifact. Every document generated here is built from the engagement record - never from memory, never invented.
6
+
7
+ FDEs produce code. They also produce documents. The sponsor's boss doesn't read PRs - they read decks. The compliance team doesn't read commits - they read evidence packs. The board doesn't read sprint retrospectives - they read executive summaries. This overlay converts `.fde/` memory into professional client-facing artifacts.
8
+
9
+ ## The rule: source from memory, never fabricate
10
+
11
+ Every claim in a generated document must trace to a `.fde/` artifact:
12
+ - Numbers → `delivery.md` or `business-case.md`
13
+ - Risks → `risks.md`
14
+ - Decisions → `decisions.md`
15
+ - Technical facts → `terrain.md` or `reality.md`
16
+ - Stakeholder context → `stakeholders.md`
17
+
18
+ If the memory doesn't support a claim, it's not in the document. Professional documents with fabricated numbers are worse than no document - they get quoted in board meetings and become liabilities.
19
+
20
+ ## Artifact types and templates
21
+
22
+ ### 1. Executive deck (slides outline)
23
+
24
+ **Source:** `delivery.md`, `success.md`, `business-case.md`
25
+ **When:** sponsor needs to present upward, quarterly review, board update
26
+
27
+ ```markdown
28
+ # [Engagement name] - Executive Update
29
+ ## Slide 1: Headline
30
+ One sentence: what changed and what it's worth.
31
+ Source: delivery.md "business value" line
32
+
33
+ ## Slide 2: Progress
34
+ - Delivered: [list from delivery.md]
35
+ - In progress: [from decisions.md current tasks]
36
+ - Blocked: [from risks.md active blockers]
37
+
38
+ ## Slide 3: Value realized
39
+ [Quantified from delivery.md - time saved, cost reduced, revenue enabled]
40
+ vs. investment: [from business-case.md]
41
+
42
+ ## Slide 4: What's next
43
+ [From decisions.md - next phase, ask, timeline]
44
+
45
+ ## Slide 5: Risks & mitigations
46
+ [Top 3 from risks.md with status]
47
+ ```
48
+
49
+ The FDE generates the content structured for slides. The client's design team (or AI slide tool) formats it. fdeops produces the substance, not the PowerPoint file.
50
+
51
+ ### 2. Governance framework
52
+
53
+ **Source:** `stakeholders.md`, `decisions.md`, `success.md`
54
+ **When:** enterprise engagement needs operating model clarity
55
+
56
+ ```markdown
57
+ # Governance Framework - [Project/Programme name]
58
+
59
+ ## Decision rights (RACI)
60
+ | Decision type | Responsible | Accountable | Consulted | Informed |
61
+ |--------------|------------|-------------|-----------|----------|
62
+ | Architecture choices | FDE | Tech lead | Security, Ops | Sponsor |
63
+ | Scope changes | Product owner | Sponsor | FDE, Tech lead | Team |
64
+ | Production deploys | FDE + Ops | Tech lead | Security | Sponsor |
65
+ | Budget/timeline changes | Sponsor | Exec sponsor | FDE, Finance | Team |
66
+
67
+ ## Escalation path
68
+ Level 1: [named person] - operational decisions, <2 day impact
69
+ Level 2: [named person] - scope/timeline decisions, <2 week impact
70
+ Level 3: [named person] - strategic decisions, programme-level
71
+
72
+ ## Review cadence
73
+ - Weekly: delivery standup (15 min, [attendees])
74
+ - Bi-weekly: steering committee (30 min, [attendees])
75
+ - Monthly: executive review (45 min, [attendees])
76
+ - Quarterly: programme board (90 min, [attendees])
77
+
78
+ ## Change control
79
+ [From decisions.md - how scope changes are raised, assessed, approved]
80
+ ```
81
+
82
+ ### 3. Technical assessment report
83
+
84
+ **Source:** `terrain.md`, `reality.md`, `risks.md`
85
+ **When:** discovery complete, need to present findings formally
86
+
87
+ ```markdown
88
+ # Technical Assessment - [System/Domain name]
89
+ Date: [date] | Assessor: [FDE name] | Classification: [confidentiality]
90
+
91
+ ## Executive summary
92
+ [3 sentences: current state, key finding, recommendation]
93
+
94
+ ## Current state
95
+ [From terrain.md: stack, age, architecture, data flow]
96
+
97
+ ## Findings
98
+ | # | Finding | Severity | Evidence | Recommendation |
99
+ |---|---------|----------|----------|---------------|
100
+ | 1 | [from reality.md] | Critical/High/Medium/Low | [source] | [action] |
101
+
102
+ ## Risk register
103
+ [From risks.md - top risks with likelihood × impact scoring]
104
+
105
+ ## Recommendations (prioritized)
106
+ 1. [Immediate - do this week]
107
+ 2. [Short-term - do this phase]
108
+ 3. [Medium-term - plan for next phase]
109
+
110
+ ## Appendix: raw data
111
+ [References to terrain.md scans, churn data, test coverage]
112
+ ```
113
+
114
+ ### 4. Architecture Decision Record (ADR)
115
+
116
+ **Source:** `decisions.md`
117
+ **When:** a significant architecture choice needs formal documentation
118
+
119
+ ```markdown
120
+ # ADR-[number]: [Decision title]
121
+ Date: [date] | Status: Accepted | Deciders: [names]
122
+
123
+ ## Context
124
+ [From reality.md - the problem or requirement driving this decision]
125
+
126
+ ## Decision
127
+ [The chosen approach - from decisions.md]
128
+
129
+ ## Alternatives considered
130
+ | Option | Pros | Cons | Why not |
131
+ |--------|------|------|---------|
132
+ | [A] | | | |
133
+ | [B] | | | |
134
+ | [Chosen] | | | Selected because: |
135
+
136
+ ## Consequences
137
+ - Positive: [what this enables]
138
+ - Negative: [what this costs or constrains]
139
+ - Risks: [from risks.md]
140
+
141
+ ## Review trigger
142
+ [When to revisit: "if volume exceeds X", "if requirement Y changes"]
143
+ ```
144
+
145
+ ### 5. Compliance evidence pack
146
+
147
+ **Source:** `trust-profile.md`, `delivery.md`, `decisions.md`
148
+ **When:** SOC2, ISO27001, or other audit evidence needed
149
+
150
+ ```markdown
151
+ # Compliance Evidence - [Control/Requirement]
152
+ Framework: [SOC2 / ISO27001 / HIPAA / PCI-DSS]
153
+ Control: [control ID and description]
154
+ Date: [evidence date range]
155
+
156
+ ## Control implementation
157
+ [How the control is implemented - from trust-profile.md and build decisions]
158
+
159
+ ## Evidence
160
+ - [Artifact 1]: [what it proves] - location: [path/link]
161
+ - [Artifact 2]: [what it proves] - location: [path/link]
162
+ - [Test result]: [date, outcome]
163
+
164
+ ## Gaps
165
+ [Any gaps between control requirement and current implementation - from risks.md]
166
+
167
+ ## Remediation plan
168
+ [If gaps exist - timeline, owner, acceptance criteria]
169
+ ```
170
+
171
+ ### 6. Value realization report
172
+
173
+ **Source:** `delivery.md`, `business-case.md`, `success.md`
174
+ **When:** proving ROI for renewal, extension, or programme continuation
175
+
176
+ ```markdown
177
+ # Value Realization - [Engagement/Phase name]
178
+ Period: [date range] | Prepared for: [sponsor name]
179
+
180
+ ## Investment
181
+ [From business-case.md: cost of engagement, infrastructure, licenses]
182
+
183
+ ## Value delivered
184
+ | Metric | Baseline | Current | Change | Business value |
185
+ |--------|----------|---------|--------|---------------|
186
+ | [from delivery.md] | | | | $ or % |
187
+
188
+ ## ROI calculation
189
+ Investment: [total cost]
190
+ Return: [total quantified value]
191
+ ROI: [return / investment] - payback period: [months]
192
+
193
+ ## Qualitative outcomes
194
+ [From delivery.md: capabilities built, risks reduced, team upskilled]
195
+
196
+ ## Recommendation
197
+ [Continue / Expand / Transition to BAU - with evidence]
198
+ ```
199
+
200
+ ### 7. Research brief
201
+
202
+ **Source:** `decisions.md`, `terrain.md`
203
+ **When:** vendor evaluation, technology comparison, or options analysis needs formal documentation
204
+
205
+ ```markdown
206
+ # Research Brief - [Topic]
207
+ Date: [date] | Audience: [who needs this]
208
+
209
+ ## Question
210
+ [The specific decision this research informs]
211
+
212
+ ## Methodology
213
+ [How options were evaluated: criteria, weighting, test approach]
214
+
215
+ ## Findings
216
+ | Option | [Criterion 1] | [Criterion 2] | [Criterion 3] | Score |
217
+ |--------|--------------|--------------|--------------|-------|
218
+ | [A] | | | | |
219
+ | [B] | | | | |
220
+
221
+ ## Recommendation
222
+ [Which option, why, with confidence level and caveats]
223
+
224
+ ## Risks of recommendation
225
+ [What could go wrong with the chosen path]
226
+ ```
227
+
228
+ ## Generation rules
229
+
230
+ 1. **Always cite the source file.** Every section header should note which `.fde/` file it draws from.
231
+ 2. **Dates and numbers from the record.** Never round, estimate, or approximate without flagging it: "[estimated]".
232
+ 3. **Classification.** Mark documents with their sensitivity: Internal, Confidential, Restricted. Default to Confidential for client-facing artifacts.
233
+ 4. **Version control.** Generated artifacts go to `.fde/artifacts/` with date-stamped filenames. Previous versions stay - don't overwrite.
234
+ 5. **Format guidance, not final format.** fdeops generates structured markdown content. The client's tools (Google Slides, PowerPoint, Confluence, Notion) apply formatting. Don't waste time on visual design - substance first.
235
+
236
+ ## Writes
237
+
238
+ Generated artifacts to `.fde/artifacts/[type]-[date].md`. Log the generation in `delivery.md` - "Produced [artifact type] for [audience] on [date]."
239
+
240
+ ## Principles
241
+
242
+ - Every claim traces to a `.fde/` source file. No fabrication.
243
+ - Substance over format. Generate content, not design.
244
+ - Date-stamp and version. Never overwrite previous artifacts.
245
+ - The sponsor's boss reads decks, not code. Produce what they consume.
246
+ - A governance framework without named people is fiction.
247
+ - Compliance evidence is only evidence if it's dated, sourced, and testable.
@@ -0,0 +1,77 @@
1
+ # assumption-audit - pressure-test the brief before building on it
2
+
3
+ **Enter when:** the brief feels too neat, the customer is very confident about the solution (not the problem), someone says "we just need…" about a complex system, or discover surfaced contradictions between what was said and what the codebase shows.
4
+
5
+ **Read first:** `brief.md`, `reality.md`, `terrain.md`, `context.md`. The assumptions are hiding between what the brief says and what the code does.
6
+
7
+ Every engagement is built on assumptions. Most are invisible until they're wrong and the build is two weeks deep. The assumption audit makes them visible - and killable - before they cost time.
8
+
9
+ ## Method (you do this work)
10
+
11
+ **1. Extract the assumptions.** Read `brief.md` and `reality.md` line by line. Every statement that isn't backed by evidence is an assumption. Common hiding places:
12
+
13
+ | Where assumptions hide | Example | The real question |
14
+ |----------------------|---------|-------------------|
15
+ | **The problem statement** | "The API is slow" | Slow for whom? Measured how? Since when? |
16
+ | **The proposed solution** | "We need to migrate to microservices" | Is the monolith actually the bottleneck, or is it the database? |
17
+ | **The timeline** | "This should take two weeks" | Based on what? Who estimated? Have they done this before? |
18
+ | **The stakeholder claim** | "The team is on board" | Who specifically? Have they been asked? What did the resistors say? |
19
+ | **The data claim** | "We have good data for this" | Defined how? Validated when? By whom? Sample checked? |
20
+ | **The "just"** | "We just need to add a feature" | On what system? With what dependencies? What breaks? |
21
+
22
+ **2. Classify each assumption by blast radius:**
23
+
24
+ ```
25
+ CRITICAL - if wrong, the engagement fails or the approach changes fundamentally
26
+ → Must be validated before plan starts
27
+
28
+ LOAD-BEARING - if wrong, significant rework or timeline change
29
+ → Must be validated before build starts
30
+
31
+ CONVENIENCE - if wrong, a task changes but the approach holds
32
+ → Validate when you get there
33
+ ```
34
+
35
+ **3. Design the validation.** Each critical assumption gets one specific test - not a discussion, a test:
36
+
37
+ | Assumption | Validation method | Effort | Evidence threshold |
38
+ |-----------|-------------------|--------|-------------------|
39
+ | "The API is the bottleneck" | Instrument the three slowest endpoints, measure p95 over 24h | 2h | Latency data shows >80% of wait time in API layer |
40
+ | "The team will adopt the new tool" | Ask three team members individually: "Show me how you'd use this" | 1h | 2 of 3 can describe a use case without prompting |
41
+ | "The data is clean enough for ML" | Sample 200 records, count nulls/duplicates/format errors | 1h | <5% error rate on the fields the model needs |
42
+
43
+ **4. Run the killer test first.** The assumption with the highest blast radius AND the cheapest validation gets tested immediately. This single principle saves more engagement time than any other: if the killer assumption is wrong, you've saved weeks; if it holds, you've bought confidence.
44
+
45
+ **5. Present findings as a fact base, not a challenge.**
46
+
47
+ The customer's assumptions are often wrong, but calling them wrong is a trust withdrawal. Frame as curiosity, not contradiction:
48
+
49
+ > "The brief says the API is the bottleneck. The codebase shows 80% of latency is in the database layer - here's the evidence. Should we adjust the focus?"
50
+
51
+ Evidence first, then the question. Let them reach the conclusion.
52
+
53
+ ## Artifact
54
+
55
+ **`reality.md`** - append an assumptions section:
56
+ ```markdown
57
+ ## Assumptions audited - <date>
58
+ | # | Assumption | Classification | Validation | Result | Impact |
59
+ |---|-----------|---------------|------------|--------|--------|
60
+ | 1 | API is the bottleneck | CRITICAL | p95 instrumentation | DISPROVED - 80% DB | Approach changes from API rewrite to query optimisation |
61
+ | 2 | Team will adopt new tool | LOAD-BEARING | 3 individual interviews | CONFIRMED - 2/3 enthusiastic | Proceed with adoption plan |
62
+ | 3 | Data clean enough for ML | CRITICAL | 200-record sample | PARTIAL - 12% null rate on key field | Data cleaning task added to plan |
63
+ ```
64
+
65
+ **`decisions.md`** - if an assumption was disproved and the approach changed: what shifted, why, the evidence.
66
+
67
+ ## Checkpoint
68
+
69
+ Tell the FDE: how many assumptions extracted, how many critical, which ones were tested, which changed the direction. If a critical assumption is disproved: recommend the next move (rescope, pivot, or the conversation with the sponsor) before the FDE asks.
70
+
71
+ ## Principles
72
+
73
+ - Every "just" is an assumption. Every "should" is an assumption.
74
+ - Kill the riskiest, cheapest-to-test assumption first.
75
+ - Evidence first, then the question. Let the customer reach the conclusion.
76
+ - A brief with zero disproved assumptions wasn't audited - it was accepted.
77
+ - Two weeks of building on a wrong assumption costs more than two hours of testing.