@99x-ai-dlc/idf-installer 0.0.0-stage → 0.2.8

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 (49) hide show
  1. package/README.md +51 -2
  2. package/bin/idf-installer.js +185 -0
  3. package/package.json +22 -4
  4. package/repository-agents/process-diagnostic-agent/review-guide.md +669 -0
  5. package/repository-agents/process-diagnostic-agent/role-play.md +223 -0
  6. package/repository-agents/process-diagnostic-agent/skills/trend-analysis.md +113 -0
  7. package/repository-agents/process-estimation-agent/estimate.md +69 -0
  8. package/repository-agents/process-estimation-agent/estimation-guide.md +435 -0
  9. package/repository-agents/process-migration-agent/migrate.md +72 -0
  10. package/repository-agents/process-migration-agent/migration-guide.md +490 -0
  11. package/repository-agents/process-onboarding-agent/external-skills/README.md +189 -0
  12. package/repository-agents/process-onboarding-agent/external-skills/ux-os.md +92 -0
  13. package/repository-agents/process-onboarding-agent/onboard.md +214 -0
  14. package/repository-agents/process-onboarding-agent/ops/build/backlog.md +43 -0
  15. package/repository-agents/process-onboarding-agent/ops/build/bolts/_template.md +53 -0
  16. package/repository-agents/process-onboarding-agent/ops/build/units/_template.md +112 -0
  17. package/repository-agents/process-onboarding-agent/ops/inception/codebase-findings/README.md +22 -0
  18. package/repository-agents/process-onboarding-agent/ops/inception/codebase-findings/_template.md +34 -0
  19. package/repository-agents/process-onboarding-agent/ops/inception/dependency-map.md +47 -0
  20. package/repository-agents/process-onboarding-agent/ops/inception/elaborations/_template.md +46 -0
  21. package/repository-agents/process-onboarding-agent/ops/inception/intents/README.md +9 -0
  22. package/repository-agents/process-onboarding-agent/ops/inception/intents/_template.md +92 -0
  23. package/repository-agents/process-onboarding-agent/ops/operate/improvements/_template.md +51 -0
  24. package/repository-agents/process-onboarding-agent/ops/operate/incidents/_template.md +61 -0
  25. package/repository-agents/process-onboarding-agent/ops/operate/retros/_template.md +122 -0
  26. package/repository-agents/process-onboarding-agent/rules/engagement.md +70 -0
  27. package/repository-agents/process-onboarding-agent/setup-guide.md +1409 -0
  28. package/repository-agents/process-onboarding-agent/skills/ai-hub-metrics.md +341 -0
  29. package/repository-agents/process-onboarding-agent/skills/bolt-risk-assessment.md +208 -0
  30. package/repository-agents/process-onboarding-agent/skills/bug-bolt.md +105 -0
  31. package/repository-agents/process-onboarding-agent/skills/compact-docs.md +123 -0
  32. package/repository-agents/process-onboarding-agent/skills/dependency-audit.md +187 -0
  33. package/repository-agents/process-onboarding-agent/skills/design-session.md +230 -0
  34. package/repository-agents/process-onboarding-agent/skills/governance-map.md +212 -0
  35. package/repository-agents/process-onboarding-agent/skills/hotfix-bolt.md +102 -0
  36. package/repository-agents/process-onboarding-agent/skills/knowledge-promotion.md +188 -0
  37. package/repository-agents/process-onboarding-agent/skills/new-engineer-induction.md +303 -0
  38. package/repository-agents/process-onboarding-agent/skills/nfr-bolt.md +117 -0
  39. package/repository-agents/process-onboarding-agent/skills/notifications.md +456 -0
  40. package/repository-agents/process-onboarding-agent/skills/process-health.md +252 -0
  41. package/repository-agents/process-onboarding-agent/skills/process-visualization.md +157 -0
  42. package/repository-agents/process-onboarding-agent/skills/product-engineering-essentials.md +261 -0
  43. package/repository-agents/process-onboarding-agent/skills/progress-digest.md +184 -0
  44. package/repository-agents/process-onboarding-agent/skills/release-readiness-checklist.md +259 -0
  45. package/repository-agents/process-onboarding-agent/skills/root-cause-analysis.md +151 -0
  46. package/repository-agents/process-onboarding-agent/skills/solution-shaping.md +98 -0
  47. package/repository-agents/process-onboarding-agent/skills/uat.md +267 -0
  48. package/repository-agents/process-skills-agent/onboard.md +68 -0
  49. package/repository-agents/process-skills-agent/skills-guide.md +404 -0
@@ -0,0 +1,1409 @@
1
+ # AI-DLC Setup Guide
2
+
3
+ This document explains how to set up the AI-DLC framework in a repository. It works with Claude Code, Cursor, and GitHub Copilot. Everything here is generic — substitute your project's technology stack, domain terms, and rules where indicated.
4
+
5
+ ---
6
+
7
+ ## Framework Root (`{FRAMEWORK_ROOT}`)
8
+
9
+ Throughout this guide, `{FRAMEWORK_ROOT}` refers to the installation path determined during the **Preliminary Step** of `process-onboarding-agent/onboard.md`. It is set to:
10
+
11
+ - `{existing-docs-folder}/intent-execution-framework` — if the engineer has an existing process/docs folder, or
12
+ - `docs/process/intent-execution-framework` — if no such folder exists yet
13
+
14
+ All files created by this guide are placed under `{FRAMEWORK_ROOT}/`. Do not create any framework files under `process-onboarding-agent/` — that folder is the bootstrap agent and is deleted after onboarding.
15
+
16
+ ---
17
+
18
+ ## What You Are Building
19
+
20
+ AI-DLC is a structured operating system for building software with AI assistance. It is not a tool — it is a set of files, conventions, and ceremonies that govern how your team and your AI work together. The output is a repo where:
21
+
22
+ - Every feature starts with a written intent and testable acceptance criteria
23
+ - Every AI interaction is gated by a quality check and logged for audit
24
+ - Every failure feeds back into rules that prevent recurrence
25
+ - Any engineer (or AI tool) opening the repo knows exactly how to work in it
26
+
27
+ ---
28
+
29
+ ## Before You Begin
30
+
31
+ ### Question 1 — Which AI tool are you using?
32
+
33
+ This guide uses the term **master rule file** to refer to the file that governs AI behaviour in your repository. Each tool has a different name and location for this file:
34
+
35
+ | AI Tool | Master rule file | Location |
36
+ |---|---|---|
37
+ | **Claude Code** | `CLAUDE.md` | Repo root |
38
+ | **Cursor** | `.cursor/rules/project-rules.mdc` | `.cursor/rules/` (with `alwaysApply: true`) |
39
+ | **GitHub Copilot** | `copilot-instructions.md` | `.github/` folder |
40
+
41
+ The content of the master rule file is identical across tools. The only differences are the file name, the location, and: for Cursor, the body is wrapped in a `---\nalwaysApply: true\n---` YAML frontmatter block; for GitHub Copilot, internal links to `{FRAMEWORK_ROOT}/` files must use the prefix `../{FRAMEWORK_ROOT}/` since the file lives inside `.github/`.
42
+
43
+ All subsequent steps in this guide refer to the "master rule file." Substitute the correct name and path for your chosen tool.
44
+
45
+ > If you want to support more than one AI tool in the same repo, write the master rule file once and create copies for each additional tool. See Step 8.
46
+
47
+ ---
48
+
49
+ ### Question 2 — Fresh or Mature Project?
50
+
51
+ Before following this guide, the AI must ask the engineer one question:
52
+
53
+ > **"Is this a fresh project (no significant codebase yet) or a mature project (existing code, conventions, and team practices already in place)?"**
54
+
55
+ - **Fresh project** → proceed directly to Step 1 below.
56
+ - **Mature project** → complete the Mature Project Onboarding phases (Phase M1–M3) first, then continue to Step 1.
57
+
58
+ ---
59
+
60
+ ## Mature Project Onboarding
61
+
62
+ Onboarding AI-DLC into an existing codebase requires three preparatory phases before any Bolt is written. The goal is to extract what the system already is, encode it as rules, and establish safety controls — so that AI-DLC enhances the project without disrupting what already works.
63
+
64
+ ---
65
+
66
+ ### Phase M1 — Codebase Archaeology Analysis
67
+
68
+ #### M1.0 — Scope Agreement (Required Before Any Analysis)
69
+
70
+ Large codebases cannot be analysed in a single context window. Before reading any code, the agent must ask the engineer to define the analysis scope.
71
+
72
+ Ask the engineer:
73
+
74
+ > "This codebase may be too large to analyse in one pass without overloading context. To keep each analysis pass focused and accurate, I'd like to work through it in segments.
75
+ >
76
+ > Please tell me:
77
+ > 1. Which modules, services, or folders are the highest priority for AI-DLC onboarding?
78
+ > 2. Are there any areas I should skip entirely for now (e.g. legacy code not being actively worked on, third-party code, generated files)?
79
+ > 3. Should I analyse one segment at a time and report findings before moving to the next, or would you prefer a summary across all agreed segments?"
80
+
81
+ Record the engineer's answers. Use them to define **analysis segments** — named, bounded slices of the codebase (e.g. "auth service", "payments module", "shared UI components"). Each segment is analysed independently across M1.1–M1.4, with findings reported to the engineer before moving to the next segment.
82
+
83
+ **Rules for segmented analysis:**
84
+ - Never read beyond the agreed segment boundary in a single pass
85
+ - After completing each segment, present a findings summary and ask the engineer to confirm before continuing to the next segment
86
+ - If a segment itself is too large for one context window, ask the engineer to break it down further before proceeding
87
+ - Keep a running segment log: `Segment | Status | Key findings` — update it after each segment completes
88
+
89
+ Only proceed to M1.1 once at least one segment is agreed.
90
+
91
+ #### M1.0-P — Parallel Archaeology (Optional)
92
+
93
+ After segments are agreed, offer the parallel option:
94
+
95
+ > "You have [N] segments to analyze. I can work through them one by one in this session, or — if other engineers are available — each person can run the analysis for their segment independently on their own machine and share a structured report back to you. Running segments in parallel has two advantages:
96
+ >
97
+ > 1. **Speed** — all segments are analyzed simultaneously rather than sequentially.
98
+ > 2. **Accuracy** — engineers who work in a specific module every day will surface patterns and risks that a cold analysis might miss. Independent findings that match across sessions have higher confidence than single-session findings.
99
+ >
100
+ > Would you like to run this archaeology in parallel? If yes, I'll give you a segment assignment brief for each engineer to copy to their own session."
101
+
102
+ If the engineer says **yes**:
103
+
104
+ 1. Produce a **Segment Assignment Brief** for each segment — a short block the engineer can paste into another AI session to kick off a parallel analysis. Format:
105
+
106
+ ```
107
+ Segment Assignment: [Segment name]
108
+ ─────────────────────────────────────────────────
109
+ You are running a codebase archaeology analysis for one segment of a larger project.
110
+ Your scope is limited to: [folders/modules]
111
+ Do not read outside this boundary.
112
+
113
+ Run phases M1.1, M1.2, M1.3, and M1.4 from process-onboarding-agent/setup-guide.md for this segment only.
114
+ When complete, produce a Segment Report using the format defined in Phase M1.5 of the setup guide.
115
+ The engineer will copy your Segment Report back to the main session for synthesis.
116
+ ─────────────────────────────────────────────────
117
+ ```
118
+
119
+ 2. Assign each segment to an engineer. If the number of engineers is fewer than the number of segments, assign multiple segments to one engineer — they run them sequentially in their session.
120
+
121
+ 3. Tell the main engineer:
122
+
123
+ > "Share each brief with the assigned engineer. When each parallel session is complete, paste its Segment Report back here. I'll run Phase M1.5 to synthesize all reports into the final archaeology output."
124
+
125
+ 4. Pause the main session's M1.1–M1.4 analysis — do not begin reading code in the main session. The main session resumes at Phase M1.5 once all Segment Reports are received.
126
+
127
+ If the engineer says **no**, proceed directly to M1.1 in the current session.
128
+
129
+ ---
130
+
131
+ #### M1.1 — Architecture Mapping
132
+
133
+ - Read the codebase module by module (within the agreed segment)
134
+ - Generate business-language descriptions of each module (what it does, not how)
135
+ - Produce a capability map: what the system does as a whole
136
+ - Identify service boundaries, integration points, and data flows
137
+ - Output becomes the foundation for the Bolt Backlog
138
+
139
+ #### M1.2 — Pattern Extraction
140
+
141
+ - Read 10–20 representative files across modules
142
+ - Extract: naming conventions, error handling style, ORM usage, API response shapes, authentication patterns, test patterns and coverage conventions
143
+ - Document all extracted patterns — these go into the master rule file and the `rules/` folder before any Bolt is written
144
+
145
+ #### M1.3 — Due Diligence Audit
146
+
147
+ Before classifying work, audit the existing codebase for defects and structural problems that new AI-generated code could inherit. This step must complete before any Bolt is planned.
148
+
149
+ **What to look for:**
150
+
151
+ | Category | Examples |
152
+ |---|---|
153
+ | **Logic defects** | Incorrect business logic, off-by-one errors, wrong conditional branches, silent data loss |
154
+ | **Design violations** | Responsibilities mixed across layers, circular dependencies, God classes or functions doing too much |
155
+ | **Security gaps** | Unvalidated input, missing auth checks, secrets in code, direct DB calls from the wrong layer |
156
+ | **Fragile patterns** | Catch-all error suppression, hardcoded values that should be config, mutable shared state |
157
+ | **Test blind spots** | Code paths with no test coverage; tests that assert implementation details rather than behaviour |
158
+ | **Consistency breaks** | Naming or structural conventions that differ across modules with no documented reason |
159
+
160
+ **Output:** A ranked list of findings. For each finding, record:
161
+ - Location (file/module/function)
162
+ - Category from the table above
163
+ - Impact if inherited by new code
164
+ - Recommended correction (fix-in-place, quarantine, or encode as a prohibition in the master rule file)
165
+
166
+ Present the list to the engineer and agree on which items must be corrected before the first Bolt runs and which can be logged as Remediation Bolts.
167
+
168
+ #### M1.4 — Debt and Gap Mapping
169
+
170
+ Classify all identified work — including findings from M1.3 — into three Bolt types:
171
+
172
+ | Bolt Type | Description |
173
+ |---|---|
174
+ | **Enhancement Bolt** | New capabilities not yet in the system |
175
+ | **Remediation Bolt** | Tech debt, coverage gaps, refactoring, and defects found in M1.3 |
176
+ | **Migration Bolt** | Architectural changes that enable future work |
177
+
178
+ **Prioritisation order:** Remediation of blocking defects found in M1.3 first → Enhancement (shows value) → Remediation of non-blocking debt → Migration last.
179
+
180
+ ---
181
+
182
+ #### M1.5 — Parallel Synthesis (Only runs if M1.0-P parallel mode was chosen)
183
+
184
+ This phase runs in the **main session** once all parallel engineers have returned their Segment Reports. Do not start synthesis until every assigned segment has a report.
185
+
186
+ ##### Segment Report Format
187
+
188
+ Each parallel session must produce a report in this exact structure so the main session can parse and synthesize it consistently:
189
+
190
+ ```markdown
191
+ # Segment Report: [Segment name]
192
+
193
+ **Analyst:** [Engineer name]
194
+ **AI tool:** [Claude Code / Cursor / GitHub Copilot]
195
+ **Date:** YYYY-MM-DD
196
+ **Scope:** [folders and modules covered]
197
+ **Confidence:** High / Medium / Low
198
+ (High = engineer is very familiar with this module;
199
+ Medium = some familiarity;
200
+ Low = cold analysis only, no domain knowledge applied)
201
+
202
+ ---
203
+
204
+ ## M1.1 — Architecture
205
+
206
+ [Business-language description of each module in scope. What it does, not how.]
207
+
208
+ **Service boundaries identified:**
209
+ - [boundary description]
210
+
211
+ **Integration points:**
212
+ - [integration description]
213
+
214
+ **Data flows:**
215
+ - [flow description]
216
+
217
+ ---
218
+
219
+ ## M1.2 — Patterns Extracted
220
+
221
+ | Pattern type | Observed convention | Example location |
222
+ |---|---|---|
223
+ | Naming | [convention] | [file/module] |
224
+ | Error handling | [convention] | [file/module] |
225
+ | API response shape | [convention] | [file/module] |
226
+ | Auth pattern | [convention] | [file/module] |
227
+ | Test pattern | [convention] | [file/module] |
228
+ | ORM / DB access | [convention] | [file/module] |
229
+
230
+ ---
231
+
232
+ ## M1.3 — Due Diligence Findings
233
+
234
+ | # | Location | Category | Description | Impact | Recommendation |
235
+ |---|---|---|---|---|---|
236
+ | 1 | [file/function] | [category] | [description] | [impact] | Fix-in-place / Quarantine / Encode as prohibition |
237
+
238
+ ---
239
+
240
+ ## M1.4 — Debt Classification
241
+
242
+ | Work item | Bolt type | Priority | Notes |
243
+ |---|---|---|---|
244
+ | [description] | Enhancement / Remediation / Migration | High / Med / Low | [notes] |
245
+
246
+ ---
247
+
248
+ ## Confidence Notes
249
+
250
+ [Anything the analyst was uncertain about, code paths not covered, or areas where a second opinion is recommended.]
251
+ ```
252
+
253
+ ##### Synthesis Protocol
254
+
255
+ Once all Segment Reports are received:
256
+
257
+ **Step 1 — Validate completeness.** Check that every agreed segment has a report. If any segment is missing, do not proceed — ask the engineer to follow up with the assigned analyst.
258
+
259
+ **Step 2 — Merge architecture findings.** Combine the M1.1 sections across all reports into a single capability map. Identify: modules that appear in multiple reports (cross-segment dependencies), integration points that span segment boundaries, and data flows that pass through more than one segment.
260
+
261
+ **Step 3 — Reconcile patterns.** For each pattern type in M1.2, compare findings across reports:
262
+
263
+ | Situation | Action |
264
+ |---|---|
265
+ | Same convention found in 2+ segments | Mark as **Confirmed convention** — high confidence for the master rule file |
266
+ | Different conventions found for the same pattern type | Mark as **Inconsistency** — flag to engineer for resolution before writing rules |
267
+ | Convention found in only one segment | Mark as **Unconfirmed** — note the segment scope and treat with lower confidence |
268
+
269
+ **Step 4 — Consolidate due diligence findings.** Merge all M1.3 findings into a single ranked list. Apply a confidence boost to any finding that appears in more than one report independently — these have been confirmed by multiple analysts without coordination and are high-priority. Flag any finding where two reports directly contradict each other (e.g. one reports a pattern as consistent, another reports it as absent) — these require engineer resolution.
270
+
271
+ **Step 5 — Unify debt classification.** Merge all M1.4 items. De-duplicate by description. Where two analysts classified the same work item differently (e.g. one called it Remediation, another called it Migration), present both classifications to the engineer and ask for a decision.
272
+
273
+ **Step 6 — Present the synthesis report.** Before proceeding to Phase M2, present:
274
+
275
+ ```
276
+ Parallel Archaeology Synthesis
277
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
278
+ Segments analyzed: [N] of [N] assigned
279
+ Analysts: [names]
280
+ Combined confidence: [summary]
281
+
282
+ Confirmed conventions: [N] (found in 2+ segments independently)
283
+ Inconsistencies to resolve: [N] (conflicting findings — need engineer decision)
284
+ High-confidence findings: [N] (due diligence items confirmed by 2+ analysts)
285
+
286
+ Items needing engineer resolution before Phase M2:
287
+ [list each inconsistency or conflict with both positions stated]
288
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
289
+ ```
290
+
291
+ Resolve all conflicts with the engineer before writing any Phase M2 files. Then continue to Phase M2 using the synthesized output as the archaeology result.
292
+
293
+ ---
294
+
295
+ ### Phase M2 — Repository Overlay
296
+
297
+ Create the governance layer on top of the existing codebase. All five artefacts must exist before the first Bolt runs.
298
+
299
+ #### M2.1 — Master Rule File
300
+
301
+ The most important file in the overlay. See **Before You Begin** for the correct file name and location for your AI tool. Must contain:
302
+ - Architecture context derived from M1.1
303
+ - Coding conventions extracted in M1.2
304
+ - Forbidden zones (see M2.2)
305
+ - Bolt workflow rules
306
+ - Entry points (see M2.3)
307
+
308
+ Follow the full master rule file authoring instructions in Step 2 of this guide, but populate each section from the archaeology output rather than from scratch.
309
+
310
+ #### M2.2 — Forbidden Zones
311
+
312
+ Create `{FRAMEWORK_ROOT}/guidelines/forbidden-zones.md` containing an explicit list of files, modules, or patterns that the AI must **not** modify without senior engineer approval. This protects stable, business-critical code from accidental change.
313
+
314
+ ```markdown
315
+ | Zone | Path / Pattern | Reason | Approval required from |
316
+ |---|---|---|---|
317
+ | <name> | <path or glob> | <why it is protected> | <role> |
318
+ ```
319
+
320
+ Reference this file in the master rule file under Code Rules (Section 3) so it is enforced in every session.
321
+
322
+ #### M2.3 — Entry Point Registry
323
+
324
+ Create `{FRAMEWORK_ROOT}/guidelines/entry-points.md` containing the approved list of modules and features where AI-DLC Bolts may begin. This controls the expansion boundary. Update the list as the team gains confidence with the process.
325
+
326
+ ```markdown
327
+ | Module / Feature | Status | Notes |
328
+ |---|---|---|
329
+ | <name> | Approved / Pending / Blocked | <any constraints> |
330
+ ```
331
+
332
+ #### M2.4 — Coding Conventions File
333
+
334
+ Create `{FRAMEWORK_ROOT}/rules/code-standards.md` (or populate it if it already exists) entirely from the patterns extracted in M1.2. Every AI session must match the style of the existing codebase — this file is the authoritative source injected into each session.
335
+
336
+ #### M2.5 — Seed Codebase Findings
337
+
338
+ Copy `_template.md` and `README.md` verbatim from `process-onboarding-agent/ops/inception/codebase-findings/` to `{FRAMEWORK_ROOT}/ops/inception/codebase-findings/`. Then, for each segment analyzed in Phase M1, create one finding file from `_template.md` (e.g. `payments-service.md`) populated from that segment's M1.1–M1.4 output:
339
+ - **Summary** — from the segment's architecture mapping (M1.1)
340
+ - **Findings** — one dated entry per segment, attributed to `Initial archaeology (M1)` rather than an intent slug, covering the patterns extracted (M1.2), due diligence findings (M1.3), and debt classification (M1.4)
341
+ - **Open Questions** — anything M1 flagged with low confidence or could not resolve from code alone
342
+
343
+ Add one row per segment to the index table in `README.md`. This turns the archaeology output — which would otherwise live only in this onboarding session — into the persistent starting point every future brownfield intent checks before re-analyzing the same code.
344
+
345
+ ---
346
+
347
+ ### Phase M3 — Blast Radius Management
348
+
349
+ Before any Bolt is executed, three safety controls must be in place. These apply to every Bolt that touches existing code.
350
+
351
+ #### M3.1 — Test Coverage Gate
352
+
353
+ Verify that adequate test coverage exists for the target feature or module before a Bolt begins. If coverage is insufficient, a Remediation Bolt to add tests must be planned and executed first. No Bolt modifying existing code starts without this gate passing.
354
+
355
+ #### M3.2 — Feature Flag Requirement
356
+
357
+ Every change introduced by AI-DLC into an existing module must be wrapped in a feature flag. This limits production impact if a change behaves unexpectedly and allows rollback without a deployment.
358
+
359
+ #### M3.3 — Default Acceptance Criterion for Existing-Code Bolts
360
+
361
+ Every Bolt that affects existing code must carry the following AC by default. It has two forms depending on Bolt classification:
362
+
363
+ **Standard form** (Enhancement Bolts and all Bolts not classified as Migration or Remediation):
364
+ > **"All integration tests for [affected module] pass without modification."**
365
+
366
+ This AC is non-negotiable and cannot be removed during elaboration.
367
+
368
+ **Contract-change form** (Migration Bolts and Remediation Bolts that explicitly change contract boundaries — e.g. API shapes, data schemas, inter-module interfaces):
369
+ > **"All integration tests for [affected module] pass without modification, except for tests that cover the contract boundaries listed as breaking changes below. Each breaking change must be detailed and approved in the elaboration session before any code is generated."**
370
+
371
+ When the contract-change form applies, the elaboration session must produce a **Breaking Changes Register** — a table attached to the unit file listing every changed contract boundary, the reason it must change, and the name of the engineer who approved it. No unit using the contract-change form may be executed without a completed and approved Breaking Changes Register.
372
+
373
+ Add both forms to the master rule file Section 6 (AI-DLC Workflow) and to `{FRAMEWORK_ROOT}/rules/code-standards.md` so the correct form is enforced automatically based on Bolt classification.
374
+
375
+ ---
376
+
377
+ ### Mature Project Onboarding Checklist
378
+
379
+ - [ ] Architecture map produced (capability map, service boundaries, data flows)
380
+ - [ ] Pattern extraction complete (naming, error handling, ORM, API shapes, test conventions)
381
+ - [ ] Debt and gap map produced; work classified into Enhancement / Remediation / Migration Bolts
382
+ - [ ] Master rule file written from archaeology output (see Before You Begin for file name)
383
+ - [ ] `{FRAMEWORK_ROOT}/guidelines/forbidden-zones.md` created and referenced in the master rule file
384
+ - [ ] `{FRAMEWORK_ROOT}/guidelines/entry-points.md` created
385
+ - [ ] `{FRAMEWORK_ROOT}/rules/code-standards.md` populated from extracted patterns
386
+ - [ ] `{FRAMEWORK_ROOT}/ops/inception/codebase-findings/` seeded with one file per M1 segment, indexed in `README.md`
387
+ - [ ] Test coverage gate verified for first target module
388
+ - [ ] Feature flag approach confirmed with team
389
+ - [ ] Default AC for existing-code Bolts added to the master rule file and `code-standards.md`
390
+
391
+ Once all items above are checked, continue to **Step 1** of this guide to create the full folder structure and remaining artifacts.
392
+
393
+ ---
394
+
395
+ ## Fresh Project — Structured Interview
396
+
397
+ For fresh projects the agent cannot read a codebase to populate the master rule file. Instead, it must run a structured interview before creating any files. The interview is strictly one question at a time, in this order. The agent must not proceed to the next question until the engineer has answered the current one.
398
+
399
+ **Do not present all questions at once. Ask them one at a time and wait for the answer.**
400
+
401
+ ---
402
+
403
+ **Interview sequence:**
404
+
405
+ 1. **Product identity**
406
+ > "In one sentence, what does this product do and who uses it?"
407
+
408
+ 2. **Technology stack — backend**
409
+ > "What language and framework will the backend use? (e.g., Node/Express, Python/FastAPI, .NET/ASP.NET Core)"
410
+
411
+ 3. **Technology stack — frontend**
412
+ > "What language and framework will the frontend use? (e.g., React/TypeScript, Vue, server-rendered only)"
413
+
414
+ 4. **Database and auth**
415
+ > "What database will you use, and how will authentication work? (e.g., PostgreSQL with Supabase Auth, MongoDB with JWT)"
416
+
417
+ 5. **System boundaries**
418
+ > "Are there any hard rules about what must never happen architecturally? (e.g., 'the frontend must never call the database directly', 'the mobile app communicates only through the REST API')"
419
+
420
+ 6. **Domain language**
421
+ > "List the key business terms this system uses — the words that appear in your domain, not generic tech terms. For each one, give a one-sentence definition. (e.g., 'Booking — a confirmed reservation between a guest and a host')"
422
+ >
423
+ > *Keep asking "any more?" until the engineer says done.*
424
+
425
+ 7. **Known constraints and prohibitions**
426
+ > "Are there any technical choices that are already decided and must not be changed by the AI? (e.g., 'we must use REST, not GraphQL', 'no ORM — raw SQL only', 'all prices stored as integers in cents')"
427
+
428
+ 8. **First capability**
429
+ > "What is the first feature or capability you want to build? Give it a name and one sentence describing what it does for the user."
430
+
431
+ 9. **Documentation archive threshold**
432
+ > "AI-DLC generates operational documents over time (retros, improvement files, unit files, bolt files). These can be compacted and archived periodically using the compact-docs skill. How many months old must a document be before it qualifies for archiving? (Common choices: 3, 6, or 12 months. This can be changed later.)"
433
+
434
+ ---
435
+
436
+ Once all nine questions are answered, the agent has enough to:
437
+ - Create the folder structure (Step 1)
438
+ - Write the master rule file with Sections 1–5, Section 8, and Process Configuration fully populated, and Sections 10 (Notifications) and 11 (AI Hub Metrics) as `Status: Disabled` until Step 4 settles them
439
+ - Write an initial first intent file from the answer to question 8
440
+ - Flag Sections 6 and 7 (workflow and review) as pre-populated from the guide defaults
441
+
442
+ ---
443
+
444
+ ## Step 1 — Create the Folder Structure
445
+
446
+ Create this directory tree at the root of your repository:
447
+
448
+ ```
449
+ {FRAMEWORK_ROOT}/
450
+ Instructions2FDE.md ← main guide for Forward Deployed Engineers (FDEs)
451
+ README.md ← how the process achieves quality
452
+ rules/
453
+ prompt-quality-gate.md ← the 4-component gate run before every code generation
454
+ code-standards.md ← language/framework conventions and anti-patterns
455
+ security.md ← never/always security rules
456
+ architecture.md ← ADRs — decisions and their rationale
457
+ engagement.md ← engineer engagement monitoring signals and intervention protocol
458
+ skills/
459
+ mob-elab-prompts.md ← interactive protocol and prompts for elaboration sessions
460
+ review-checklist.md ← structured lens for reviewing AI output
461
+ compact-docs.md ← engineer-triggered skill to archive old operational documents
462
+ root-cause-analysis.md ← skill to analyse incidents and improvements for design, technology, and process gaps
463
+ solution-shaping.md ← decides generic-vs-specific, simplest-viable approach, and extend-vs-build-vs-buy before design begins
464
+ design-session.md ← Phase 0 of elaboration — locks API contracts and data model decisions before units are proposed
465
+ bolt-risk-assessment.md ← blast radius, rollback, and feature flag assessment before a bolt's first unit executes
466
+ progress-digest.md ← plain-language stakeholder progress summary for a feature intent
467
+ uat.md ← acceptance testing protocol; blocks an intent from closing without sign-off
468
+ process-health.md ← quantitative report on how well the AI-DLC process is functioning
469
+ dependency-audit.md ← scheduled audit of third-party dependencies by severity
470
+ knowledge-promotion.md ← classifies retro improvements as generic (promote to base repo) or project-specific
471
+ notifications.md ← Slack alerts at delivery moments that need a human
472
+ ai-hub-metrics.md ← pushes usage/activity events to 99x AI Hub
473
+ process-visualization.md ← reconstructs how a bolt actually got delivered as Mermaid diagrams
474
+ governance-map.md ← draws how the installed framework governs delivery (Mermaid + HTML blueprint)
475
+ new-engineer-induction.md ← walks a new team member through the project's framework
476
+ bug-bolt.md ← lightweight bolt workflow for fixing a specific, reproducible bug
477
+ hotfix-bolt.md ← emergency bolt for production incidents
478
+ nfr-bolt.md ← non-functional quality attribute bolt (performance, security, accessibility)
479
+ product-engineering-essentials.md ← optional ten-pillar checklist of product/engineering foundations
480
+ release-readiness-checklist.md ← engineer-invoked, self-attestation UAT/production release checklist
481
+ external-skills/ ← only if at least one external skill adapter supports this project's AI tool (Step 4)
482
+ README.md ← statuses, offer points, runtime protocol, and precedence for external skills
483
+ <name>.md ← one adapter per external skill that supports this project's AI tool
484
+ guidelines/
485
+ domain-glossary.md ← canonical business terms used in code and prompts
486
+ edge-cases.md ← known failure modes to check before generating code
487
+ acceptance-patterns.md ← rules and anti-patterns for writing ACs
488
+ dev-setup.md ← environment setup checklist for new engineers
489
+ team-rollout.md ← scaling to multiple engineers
490
+ prompts/ ← one file per feature; every AI session logged here
491
+ ops/
492
+ inception/
493
+ intents/ ← one file per feature intent
494
+ _template.md
495
+ README.md
496
+ elaborations/ ← one folder per intent; one file per session
497
+ _template.md
498
+ codebase-findings/ ← one file per module/area; reverse-engineering findings from existing code, accumulated across intents
499
+ _template.md
500
+ README.md
501
+ build/
502
+ backlog.md ← master status of all units
503
+ units/ ← one file per atomic unit of work
504
+ _template.md
505
+ bolts/ ← one file per planned batch of units
506
+ _template.md
507
+ operate/
508
+ retros/ ← one file per completed bolt
509
+ _template.md
510
+ incidents/ ← one file per production issue
511
+ _template.md
512
+ improvements/ ← one file per process change triggered by retro/incident
513
+ _template.md
514
+ ```
515
+
516
+ **Files created outside `{FRAMEWORK_ROOT}`.** Almost everything this framework creates lives under `{FRAMEWORK_ROOT}`. The notifications and AI Hub metrics skills are the exceptions: if the team enables either in Step 4, artifacts are created at the **repository root** instead — `scripts/notify.sh` / `scripts/ai-hub-push.sh` (the send scripts) and the AI tool's hook or allowlist config (`.claude/settings.json`, `.cursor/hooks.json`, or `.github/hooks/notify.json`). These must be at the root, not nested under `{FRAMEWORK_ROOT}`, or the allowlist rule will not match and the scripts will not load. Installing an external skill (Step 4, **External skills**) also writes the AI tool's project MCP configuration at the repository root — `.mcp.json`, `.cursor/mcp.json`, or `.vscode/mcp.json` — as `external-skills/README.md` specifies.
517
+
518
+ ---
519
+
520
+ ## Step 2 — Write the Master Rule File (The Behavioral Contract)
521
+
522
+ The master rule file is loaded automatically by your AI tool every session. See **Before You Begin** for the correct file name and location for your tool — the content is the same regardless of which tool you use. Every section below is required.
523
+
524
+ > **Path substitution — critical:** Every template block below contains the placeholder `{FRAMEWORK_ROOT}`. When writing the actual master rule file, replace every occurrence of `{FRAMEWORK_ROOT}` with the real path determined in the Preliminary Step of `process-onboarding-agent/onboard.md`. For example, if `FRAMEWORK_ROOT` = `docs/process/intent-execution-framework`, then `{FRAMEWORK_ROOT}/rules/prompt-quality-gate.md` must be written as `docs/process/intent-execution-framework/rules/prompt-quality-gate.md`. The master rule file must contain real, resolvable paths — never the literal string `{FRAMEWORK_ROOT}`.
525
+
526
+ ### Section 1 — Project Identity
527
+
528
+ State what the system is and its technology stack. Be specific — the AI needs to know:
529
+ - What the product does (one sentence)
530
+ - Backend language/framework and key patterns
531
+ - Frontend language/framework
532
+ - Database and auth approach
533
+ - **System boundaries** — what calls what; what must never happen (e.g. "frontend never calls the database directly")
534
+
535
+ ```markdown
536
+ ## 1. Project Identity
537
+
538
+ **<ProjectName>** is a <one-sentence description>.
539
+ - Backend: <language/framework, key patterns>
540
+ - Frontend: <language/framework>
541
+ - Database: <database, auth approach>
542
+
543
+ **System boundaries:**
544
+ - <boundary rule 1>
545
+ - <boundary rule 2>
546
+ ```
547
+
548
+ ### Section 2 — Prompt Quality Gate
549
+
550
+ A three-line routing entry. Do not embed the gate definition — it lives in `rules/prompt-quality-gate.md`.
551
+
552
+ ```markdown
553
+ ## 2. Prompt Quality Gate
554
+
555
+ Before every code response: read and enforce `{FRAMEWORK_ROOT}/rules/prompt-quality-gate.md`.
556
+ If any of the four components (Context · Constraints · Acceptance Criteria · Output Format) is missing, stop and ask for it. Do not generate code.
557
+ Before every response, regardless of the four components: scan the request and any pasted content for sensitive information (credentials, secrets, personal data). If found, stop, name the category found without repeating the value back, and ask the engineer to confirm it's intentional or redact it before continuing.
558
+ ```
559
+
560
+ ### Section 3 — Code Rules
561
+
562
+ Three to five **hard-stop prohibitions** that the AI must have in working memory (no file lookup tolerated) — these are the rules where a single violation causes immediate, serious harm. Then a mandatory-read routing line for everything else.
563
+
564
+ ```markdown
565
+ ## 3. Code Rules
566
+
567
+ **Hard stops — memorise, never look up:**
568
+ - Never commit secrets, API keys, or connection strings
569
+ - Never trust client-supplied IDs without server-side ownership verification
570
+ - Never expose internal stack traces to the client
571
+ - [1–2 stack-specific absolute prohibitions from the project interview]
572
+
573
+ **Full rules (read before writing any code):**
574
+ - Conventions and patterns: `{FRAMEWORK_ROOT}/rules/code-standards.md`
575
+ - Security rules: `{FRAMEWORK_ROOT}/rules/security.md`
576
+ - Architecture decisions: `{FRAMEWORK_ROOT}/rules/architecture.md`
577
+ ```
578
+
579
+ Keep the hard-stop list to five items maximum. Anything beyond five belongs in `code-standards.md`, not here.
580
+
581
+ ### Section 4 — Domain Language
582
+
583
+ A mandatory-read instruction plus the two or three terms most likely to cause logic errors if misused. The full glossary lives in `guidelines/domain-glossary.md` — do not reproduce it here.
584
+
585
+ ```markdown
586
+ ## 4. Domain Language
587
+
588
+ Read `{FRAMEWORK_ROOT}/guidelines/domain-glossary.md` before every elaboration session and before generating any business logic. Use only the terms defined there — do not substitute synonyms.
589
+
590
+ **Critical terms (load immediately):**
591
+ - **[Term]:** [one-line definition]
592
+ - **[Term]:** [one-line definition]
593
+ ```
594
+
595
+ Limit inline terms to three. If the project has more critical terms, add them to the glossary file, not to this section.
596
+
597
+ ### Section 5 — Known Edge Cases
598
+
599
+ A single mandatory-read routing line. No inline table — edge cases are added continuously via the retro loop and must stay in their dedicated file to remain current.
600
+
601
+ ```markdown
602
+ ## 5. Known Edge Cases
603
+
604
+ Read `{FRAMEWORK_ROOT}/guidelines/edge-cases.md` before generating code for any unit. Do not skip this step — new edge cases are added after every retro.
605
+ ```
606
+
607
+ ### Section 6 — AI-DLC Workflow
608
+
609
+ The turn structure is short enough to hold in working memory — keep it inline. Everything else routes to files.
610
+
611
+ ```markdown
612
+ ## 6. AI-DLC Workflow
613
+
614
+ **Session start check:** At the beginning of every session, present the following note to the engineer:
615
+ > "At any point during this session, if you have a question about a step, need further clarification, or don't have the exact answer to a question I'm asking — just say so. I'll help you work through it so we don't get blocked."
616
+
617
+ Then read the `Next dependency audit` date from Section 9. If today is on or after that date, prompt the engineer before any other work:
618
+ > "A dependency and security audit is scheduled. Would you like to run it now, or set a new date?"
619
+ If the engineer defers, ask for the new date and update Section 9 before continuing.
620
+
621
+ **Elaboration turn structure (strictly one unit per turn):**
622
+ 1. Propose one unit — name and one-sentence purpose only. Stop.
623
+ 2. Propose ACs as a numbered list. Stop.
624
+ 3. Surface edge cases and open questions. Stop.
625
+ 4. Ask the three observability questions: what confirms this is working in production? What log entry signals failure? What alert threshold makes sense? If the answer represents code behavior, add it as an AC. If not applicable, record "Not applicable" and move on. Stop.
626
+ 5. Move to next unit. Repeat.
627
+ 6. After all units agreed, present summary table and ask for sign-off before writing any files.
628
+
629
+ **Solution shaping:** at the start of every mob elaboration, check the intent for a `## Solution Shape` section. If it is absent and the intent introduces a new capability, a potentially reusable surface, or an expensive-to-reverse decision, ask the engineer once whether to run `{FRAMEWORK_ROOT}/skills/solution-shaping.md` first or proceed straight to design. The engineer decides — run it, skip it, or invoke it directly at any time; never block on it. Skip the prompt entirely for plainly small, feature-specific intents.
630
+ **External skills:** at each offer point named by an adapter in `{FRAMEWORK_ROOT}/external-skills/`, follow the runtime protocol in `{FRAMEWORK_ROOT}/external-skills/README.md` using that skill's status in Section 9 — run it if Installed, offer it once if Offer at stage, stay silent if Declined. Never block on it. Outside an external skill's declared Scope, this master rule file governs, whatever the external skill's own instructions say.
631
+ **Full elaboration protocol (including design session):** read `{FRAMEWORK_ROOT}/skills/mob-elab-prompts.md` before every elaboration session. The design session runs as Phase 0 of elaboration — it is not invoked separately.
632
+ **Codebase findings:** before analyzing existing code to understand a new intent's dependencies on prior implementation, check `{FRAMEWORK_ROOT}/ops/inception/codebase-findings/README.md` for an existing file on that module/area; after any such analysis, record or update the finding there. This is part of the mandatory elaboration protocol above, not a separate skill.
633
+ **Bolt risk assessment:** read `{FRAMEWORK_ROOT}/skills/bolt-risk-assessment.md` after elaboration sign-off and before the first unit in a bolt executes. No unit may begin execution without a signed-off risk assessment in the bolt file.
634
+ **Elaboration-to-build handoff gate:** after elaboration sign-off, do not execute any implementation work until every agreed unit has a materialized unit file, an owning bolt, a matching backlog entry, and a link from the intent's Extracted Units table. If any artifact or link is missing, stop and report the incomplete handoff instead of proceeding. Once a bolt has been planned and the checks pass, set its `Artifact handoff` field to `Complete` before the first unit executes.
635
+ **UAT skill:** read `{FRAMEWORK_ROOT}/skills/uat.md` when all units under an intent are marked Done, or when the engineer invokes it directly. Prompt the engineer to run UAT before setting intent status to Implemented.
636
+ **Progress digest skill:** read `{FRAMEWORK_ROOT}/skills/progress-digest.md` when the engineer asks for a stakeholder update, progress summary, or digest for an intent.
637
+ **Process health skill:** read `{FRAMEWORK_ROOT}/skills/process-health.md` when the engineer invokes it to audit how well the AI-DLC process is functioning.
638
+ **New engineer induction skill:** read `{FRAMEWORK_ROOT}/skills/new-engineer-induction.md` when an engineer says they are new to the project or invokes it directly.
639
+ **Product engineering essentials skill:** read `{FRAMEWORK_ROOT}/skills/product-engineering-essentials.md` when the engineer invokes it directly, or once as an optional offer at the end of onboarding (setup guide **Onboarding Completion**, item 4b). Never run automatically or on a schedule — it is a checklist, not a gate.
640
+ **Release readiness checklist skill:** read `{FRAMEWORK_ROOT}/skills/release-readiness-checklist.md` when the engineer invokes it directly before a UAT or production release ("run the release checklist", "check release readiness", "pre-release checklist for [version]"). Never run automatically or on a schedule — it is a self-attestation record, not a gate.
641
+ **Knowledge promotion skill:** read `{FRAMEWORK_ROOT}/skills/knowledge-promotion.md` as Step 5 of the Post-Retro Improvement Workflow after all improvements are applied. A retro is not closed until every Applied improvement has a Knowledge Promotion status.
642
+ **Process visualization skill:** offer to read `{FRAMEWORK_ROOT}/skills/process-visualization.md` at the start of every retro, before "What Went Well" is discussed. The engineer may accept, skip, or invoke it directly at any time. Never run it without the engineer's go-ahead.
643
+ **Governance map skill:** read `{FRAMEWORK_ROOT}/skills/governance-map.md` when the engineer asks to draw, show or regenerate the governance map. Offer it once at the end of a new engineer induction, and once after the Post-Retro Improvement Workflow applies an improvement that adds, removes or changes a gate, a ceremony or a skill routing line. Never run it without the engineer's go-ahead.
644
+ **Dependency audit skill:** read `{FRAMEWORK_ROOT}/skills/dependency-audit.md` when the engineer invokes it, or when the `Next dependency audit` date in Section 9 has been reached. Prompt at session start if the date is due.
645
+ **Compact-docs skill:** read `{FRAMEWORK_ROOT}/skills/compact-docs.md` when the engineer invokes it.
646
+ **Root-cause-analysis skill:** read `{FRAMEWORK_ROOT}/skills/root-cause-analysis.md` when the engineer invokes it, or when an incident is marked Resolved and no RCA has been run on it.
647
+ **Notifications skill:** read `{FRAMEWORK_ROOT}/skills/notifications.md` when a lifecycle event in Section 10 is reached (elaboration sign-off required, bolt complete, UAT sign-off required, intent implemented, incident/hotfix started, circuit breaker tripped, dependency audit due), or when the engineer asks to send, configure, or silence notifications. Sending is best-effort — send and continue; never block a step on it. Skip if Section 10 is set to disabled or the engineer silenced notifications this session.
648
+ **AI Hub metrics skill:** read `{FRAMEWORK_ROOT}/skills/ai-hub-metrics.md` when a lifecycle event in Section 11 is reached (unit marked Done, bolt complete, UAT sign-off recorded, intent implemented), or when the engineer asks to push, enable, disable, configure, or silence AI Hub metrics, or check its status. "Enable"/"disable" edit Section 11's `Status` field directly (project-wide, takes effect immediately) — do not confuse with "silence for this session," which is non-persistent and leaves Section 11 untouched. Pushing is best-effort — push and continue; never block a step on it. Skip if Section 11 is set to disabled or the engineer silenced AI Hub metrics this session.
649
+ **Bug bolt:** read `{FRAMEWORK_ROOT}/skills/bug-bolt.md` when the engineer says "fix a bug", "there's a bug in X", or "bug: [description]". Do not run a full mob elaboration — follow the bug bolt workflow directly.
650
+ **Hotfix bolt:** read `{FRAMEWORK_ROOT}/skills/hotfix-bolt.md` when the engineer says "hotfix", "production issue", "prod is down", or "emergency fix for X". Skip elaboration — begin hotfix intake immediately.
651
+ **NFR bolt:** read `{FRAMEWORK_ROOT}/skills/nfr-bolt.md` when the engineer says "improve performance", "harden security", "accessibility improvements", "NFR bolt for X", or "non-functional work on X". Do not create a new intent — follow the NFR bolt workflow.
652
+ **Engagement monitoring:** read and apply `{FRAMEWORK_ROOT}/rules/engagement.md` throughout all ceremonies.
653
+ ```
654
+
655
+ ### Section 7 — Review Behavior
656
+
657
+ A single routing line. The checklist lives in its file.
658
+
659
+ ```markdown
660
+ ## 7. Review Behavior
661
+
662
+ Before presenting any output, run every item in `{FRAMEWORK_ROOT}/skills/review-checklist.md`. Do not present output that has not passed this checklist.
663
+ ```
664
+
665
+ ### Section 8 — Reference Map
666
+
667
+ A table mapping common needs to their files. Engineers and the AI both use this to navigate the framework.
668
+
669
+ ### Section 9 — Process Configuration
670
+
671
+ A single table of project-level process settings that govern AI-DLC behaviour. Populate from the setup interview answers. Every value here can be changed by the project lead at any time by editing this section.
672
+
673
+ ```markdown
674
+ ## 9. Process Configuration
675
+
676
+ | Setting | Value | Notes |
677
+ |---|---|---|
678
+ | **Archive threshold** | [X] months | Documents older than this qualify for archiving via the compact-docs skill |
679
+ | **Last dependency audit** | — | Updated automatically each time the dependency-audit skill runs |
680
+ | **Next dependency audit** | YYYY-MM-DD | AI prompts at session start on or after this date; default interval is 30 days |
681
+ | **External skills** | [name]: Installed ([version]) / Offer at stage / Declined | One entry per adapter in `{FRAMEWORK_ROOT}/external-skills/`; see its README for what each status does |
682
+ ```
683
+
684
+ The archive threshold is read by the `compact-docs` skill at runtime. If this section is absent, the skill will ask the engineer for the value before proceeding.
685
+
686
+ The dependency audit dates are read and written by the `dependency-audit` skill. The `Next dependency audit` date is checked at the start of every session — if today is on or after that date, the AI prompts the engineer to run the audit before any other work begins. Set this value during onboarding by asking the engineer:
687
+
688
+ > "When would you like to schedule the first dependency and security audit? The recommended interval is once a month."
689
+
690
+ The `External skills` row, and the matching **External skills** line in Section 6, are written in Step 4 by the **External skills** setup, not during the structured interview. Omit both if no external skill adapter supports the project's AI tool.
691
+
692
+ ### Section 10 — Notifications
693
+
694
+ Records whether the project sends Slack notifications and which lifecycle events fire them. The behaviour lives in `{FRAMEWORK_ROOT}/skills/notifications.md`; this section is the per-project switchboard. Omit this section (or set it to disabled) if the team opted out during onboarding.
695
+
696
+ The question of whether the team wants notifications is asked in Step 4, when the notifications skill is installed — not during the structured interview. Write this section then. If the master rule file is being written before that point, write it with **Status: Disabled** and update it in Step 4.
697
+
698
+ ```markdown
699
+ ## 10. Notifications
700
+
701
+ **Status:** Enabled / Disabled
702
+ **Endpoint:** Slack incoming webhook, read from the `SLACK_WEBHOOK_URL` environment variable — never commit a webhook URL. Per engineer, not per project: each teammate has their own channel and their own webhook on their own machine, so this section says the events fire, not who receives them. A teammate who has not set the variable simply gets nothing.
703
+ **Harness hooks:** installed by default — turn-ended and needs-attention. Record the tool and its config file: Claude Code `.claude/settings.json` (`Stop`, `Notification`), Cursor `.cursor/hooks.json` (`stop`, `beforeShellExecution`), Copilot `.github/hooks/notify.json` (`agentStop`, `permissionRequest`). If that config directory is gitignored in this project, note that hooks are per engineer rather than shared.
704
+ **Send command:** `scripts/notify.sh '<message>'` — run from the repository root, single-quoted argument, approved in the AI tool's command allowlist so sends do not prompt. The script takes raw text and builds the JSON itself.
705
+
706
+ Events that notify (see `{FRAMEWORK_ROOT}/skills/notifications.md` for message format):
707
+
708
+ | Event | Priority | Layer |
709
+ |---|---|---|
710
+ | Turn ended — work done, question asked, or awaiting the next prompt | normal | harness |
711
+ | Attention needed — permission request or idle prompt | high | harness |
712
+ | Elaboration sign-off required | high | lifecycle |
713
+ | Bolt complete → retro due | normal | lifecycle |
714
+ | UAT sign-off required | high | lifecycle |
715
+ | Intent implemented | normal | lifecycle |
716
+ | Incident logged / hotfix started | high | lifecycle |
717
+ | Circuit breaker tripped | high | lifecycle |
718
+ | Dependency audit due | high | lifecycle |
719
+ ```
720
+
721
+ Add or remove events from the table to tune what the project is alerted on. Read and applied by the notifications skill; if this section is absent, notifications are treated as disabled. Keep the two sign-off events even though the turn-ended hook also fires there. The harness message is instant but generic ("finished its turn"); the lifecycle message says which moment and what is needed. Removing the lifecycle events leaves only the ping that cannot say why.
722
+
723
+ ### Section 11 — AI Hub Metrics
724
+
725
+ Records whether the project pushes usage/activity events to 99x AI Hub and which lifecycle events push them. The behaviour lives in `{FRAMEWORK_ROOT}/skills/ai-hub-metrics.md`; this section is the per-project switchboard. Omit this section (or set it to disabled) if the team opted out during onboarding.
726
+
727
+ The question of whether the team wants AI Hub metrics is asked in Step 4, when the ai-hub-metrics skill is installed — not during the structured interview. Write this section then. If the master rule file is being written before that point, write it with **Status: Disabled** and update it in Step 4.
728
+
729
+ ```markdown
730
+ ## 11. AI Hub Metrics
731
+
732
+ **Status:** Enabled / Disabled
733
+ **Endpoint & credential:** read from `AI_HUB_BASE_URL`, `AI_HUB_API_KEY` (or `AI_HUB_PAT`), `AI_HUB_NODE_ID`, and `AI_HUB_NODE_ACTIVITY_ID` — never commit any of these. Project-wide, not per engineer: one Team, one Workflow, and one shared credential cover the whole project.
734
+ **Send command:** `scripts/ai-hub-push.sh --correlation-id '<id>' --actor '<name>' [...]` — run from the repository root, approved in the AI tool's command allowlist so pushes do not prompt. The script builds the JSON event payload itself.
735
+
736
+ Events that push (see `{FRAMEWORK_ROOT}/skills/ai-hub-metrics.md` for the correlationId/actor mapping):
737
+
738
+ | Event | Priority | `correlationId` |
739
+ |---|---|---|
740
+ | Unit marked Done | normal | unit id |
741
+ | Bolt complete | normal | bolt id |
742
+ | UAT sign-off recorded | normal | intent id |
743
+ | Intent implemented | normal | intent id |
744
+ ```
745
+
746
+ Add or remove events from the table to tune what the project reports to AI Hub. Read and applied by the ai-hub-metrics skill; if this section is absent, AI Hub metrics are treated as disabled.
747
+
748
+ ---
749
+
750
+ ## Step 3 — Write the Rules Files
751
+
752
+ ### `rules/prompt-quality-gate.md`
753
+
754
+ Defines the four components in detail with examples of complete and incomplete requests, plus the Sensitive Data Check that runs independently of them. Include:
755
+ - What each of the four components means
756
+ - The order to ask for missing components
757
+ - An example of an incomplete request and the correct response
758
+ - An example of a complete request
759
+ - What counts as sensitive information for this project — credentials/API keys/tokens/connection strings, personal data (names plus contact info, government IDs, financial or health details), and internal infrastructure details (internal hostnames, IPs, non-public endpoints). Ask the team during the setup interview which categories apply to their domain and regulatory context, and add any project-specific categories they name.
760
+ - What to do when it's detected: stop before using the value, name the category found without repeating the sensitive value back, and ask the engineer to confirm it's intentional or to redact/replace it with a placeholder before continuing. Never write the raw value into a generated file, log, commit message, or artifact.
761
+ - This check runs on every request, independent of the four components above — it can fire on an otherwise fully-specified prompt, and a request can fail it even when Context, Constraints, ACs, and Output Format are all present.
762
+
763
+ ### `rules/code-standards.md`
764
+
765
+ Document your stack's patterns and anti-patterns. Key sections:
766
+ - Languages & runtimes
767
+ - Naming conventions (per language)
768
+ - Framework patterns (backend and frontend)
769
+ - Formatting & linting tooling
770
+ - Testing requirements and coverage thresholds
771
+
772
+ **Critically:** add anti-patterns discovered through actual failures — e.g. framework methods that look correct but have unit-testing limitations. These turn retro findings into permanent rules.
773
+
774
+ **Concurrent sessions — reserve numbers + serialise shared files.** If your project ever runs two agent sessions against one working tree, add a standing rule: two sessions collide on unit/bolt numbers and on shared cross-cutting files (schema/data-model, the migration journal, a shared domain module), and the interleaved uncommitted state often can't be split cleanly (interactive `git add -p` is unavailable). Mitigate — at elaboration sign-off, reserve a contiguous unit-number block plus the bolt number and record them immediately, then re-check right before creating files (numbers move mid-work); serialise edits to shared data-layer files (one stream at a time — migration journals are linear). Better still: run concurrent streams on separate git worktrees/branches and merge, so shared-file interleaving can't happen.
775
+
776
+ ### `rules/security.md`
777
+
778
+ Two sections:
779
+ - **Never do these** — injection, auth gaps, secrets, data exposure
780
+ - **Always do these** — input validation, auth on every endpoint, least privilege
781
+
782
+ Add a section for your specific platform's security quirks (e.g. Supabase RLS, AWS IAM patterns, OAuth flows).
783
+
784
+ ### `rules/architecture.md`
785
+
786
+ One ADR per significant decision. Format:
787
+
788
+ ```markdown
789
+ ### ADR-001 — <Decision title>
790
+ **Decision:** <what was decided>
791
+ **Why:** <the reasoning>
792
+ **Trade-off:** <what you gave up>
793
+ ```
794
+
795
+ Add an ADR whenever a new cross-cutting decision is made — especially ones where the AI might make a different choice if not told (e.g. symmetric vs asymmetric JWT signing, SSR vs SPA, monorepo vs polyrepo).
796
+
797
+ ### `rules/engagement.md`
798
+
799
+ Copy this file verbatim from `process-onboarding-agent/rules/engagement.md` to `{FRAMEWORK_ROOT}/rules/engagement.md`. It defines two monitoring protocols: (1) engineer disengagement signals — when to intervene, what to say, and how to handle continued non-engagement; (2) failed output circuit breaker — if AI output for the same unit is rejected 3 consecutive times with the same underlying failure, execution stops, a diagnostic question is asked, and the outcome is recorded in the unit's Prompt Log. The master rule file Section 6 routes to it with a single mandatory-read line — do not inline its contents.
800
+
801
+ ---
802
+
803
+ ## Step 4 — Write the Skills Files
804
+
805
+ > **Path substitution — critical:** Any `{FRAMEWORK_ROOT}` placeholder that appears in the content descriptions below (or in "Wire into the master rule file" snippets) must be replaced with the actual resolved path before writing. This applies to generated skills files (`mob-elab-prompts.md`, `review-checklist.md`) and to any routing lines added to the master rule file Section 6. Skills files that are copied verbatim (compact-docs, root-cause-analysis, design-session, uat, etc.) do not contain `{FRAMEWORK_ROOT}` and require no substitution.
806
+
807
+ ### `skills/mob-elab-prompts.md`
808
+
809
+ The mob elaboration reference. Must include:
810
+ - **Solution Shape check (before anything else):** at the very start of every elaboration session, read the intent and check for a `## Solution Shape` section. If it is missing and the intent introduces a new capability, a potentially reusable surface, or an expensive-to-reverse decision, ask the engineer once:
811
+
812
+ > "This intent has no recorded solution shape. Run Solution Shaping first (`{FRAMEWORK_ROOT}/skills/solution-shaping.md`) to decide generic-vs-specific, simplest-viable, and extend-vs-build — or proceed straight to design?"
813
+
814
+ The engineer decides: run it (then resume elaboration with the recorded shape as binding context), or proceed as-is. Never block. For plainly small, feature-specific intents, skip this prompt and go straight to mode selection.
815
+ - **External skills — `Pre-elaboration` offer point:** after the Solution Shape check and before mode selection, if `{FRAMEWORK_ROOT}/external-skills/` exists, run the runtime protocol in `{FRAMEWORK_ROOT}/external-skills/README.md` for every adapter whose Stage Offer names `Pre-elaboration`. Any outputs brought back under an adapter's Integration Contract are binding context for Phase 0 and unit decomposition, the same way a recorded Solution Shape is. This runs even when the Solution Shape prompt was skipped for a small intent — each adapter's own Condition decides whether it applies. Never block; if the folder is absent, skip straight to mode selection.
816
+ - **Elaboration Mode Selection:** at the very start of every elaboration session, before Phase 0, ask the engineer which mode they prefer:
817
+
818
+ > "Before we begin — which elaboration mode would you like to use?
819
+ >
820
+ > **A — Interactive (turn-by-turn):** I'll propose one unit at a time, confirm the ACs with you, then move to edge cases and observability before proposing the next. Good for working through uncertain scope.
821
+ >
822
+ > **B — Plan-first:** I'll draft a complete elaboration plan — all proposed units with ACs, edge cases, and observability signals — as a single markdown document. You review it, mark changes, and we refine from there. Good when you have a clear picture and want to see everything at once."
823
+
824
+ Record the answer. **Mode A** follows the standard turn-by-turn protocol described below. **Mode B** follows the plan-first protocol:
825
+ 1. Run Phase 0 (design session) as normal.
826
+ 2. Produce the full draft plan as a markdown document written to `{FRAMEWORK_ROOT}/ops/inception/elaborations/YYYY-MM-DD-<unix_timestamp>-[intent-slug]-draft-plan.md`. The document contains: intent recap, all proposed units (each with context, ACs, scope boundaries, edge cases, and observability signals), and a unit summary table.
827
+ 3. Ask the engineer to review and respond with any changes, additions, or removals.
828
+ 4. Apply changes in a second pass — update the draft document and confirm the revised unit summary table with the engineer.
829
+ 5. Proceed to sign-off and the Dependency Map update as normal once the engineer confirms the plan is complete.
830
+
831
+ The quality gate, ACs, and sign-off requirements are identical in both modes — Mode B compresses the back-and-forth into a document review cycle, it does not skip any step.
832
+
833
+ - **Phase 0 — Design Session:** read `{FRAMEWORK_ROOT}/skills/design-session.md` and run it at the opening of every session before proposing any units. The design session scopes the intent's API surface, data model, and architectural patterns, then produces binding constraints that govern every unit and AC in the session. For simple intents with nothing new to design, Phase 0 concludes quickly and flows straight into unit decomposition. If the intent carries a `## Solution Shape` section (recorded by `{FRAMEWORK_ROOT}/skills/solution-shaping.md` before elaboration), Phase 0 treats those decisions as binding context and designs within them.
834
+ - **Codebase findings check (brownfield dependency analysis):** whenever Phase 0 or unit decomposition requires understanding existing code — because the intent depends on, integrates with, or is constrained by a prior implementation — first check `{FRAMEWORK_ROOT}/ops/inception/codebase-findings/README.md` for a file already covering that module/area. If one exists, read it as a starting point and verify it still matches the current code before relying on it; findings go stale as code changes. After analyzing any module/area not yet documented there, or finding something that contradicts an existing entry, write or update the corresponding file (append a new dated entry, never overwrite prior ones) before finishing Phase 0, and update the index in `README.md`. This step is mandatory whenever code analysis of an existing module occurs — findings from reading the codebase must never live only in the session's memory.
835
+ - The mandatory interactive protocol (turn structure + never-do rules)
836
+ - Facilitation prompts for: proposing units, proposing ACs, edge case check, observability check (success signal / failure signal / alert threshold per unit), generating implementation scaffold, reviewing output
837
+ - **Post sign-off — Dependency Map update:** after the engineer confirms sign-off on the unit summary table and before writing any files, read `{FRAMEWORK_ROOT}/ops/inception/dependency-map.md` and update it: record any prerequisites this intent has on other intents, and any shared interfaces (API contracts, data entities) that cross intent boundaries. Add a row to the Update Log. If a dependency on an incomplete intent is found, flag it to the engineer before proceeding.
838
+
839
+ ### `skills/review-checklist.md`
840
+
841
+ Structured review sections covering all five AI failure modes:
842
+
843
+ | Section | Failure mode covered |
844
+ |---|---|
845
+ | Functional Correctness | Logic errors that look correct |
846
+ | Code Quality | Over-engineering; dead code |
847
+ | Security | Security vulnerabilities |
848
+ | Architecture | Architectural drift |
849
+ | Tests | Logic errors; hallucinations |
850
+ | AI-Specific Checks | Hallucinated library calls; prompt log; scope creep |
851
+ | Observability | Missing production evidence; silent failures |
852
+ | Deployment Readiness | Configuration errors; breaking changes |
853
+
854
+ Key items that must be present:
855
+ - Feature verified in a real environment — tests passing alone is not sufficient
856
+ - Nothing in the diff beyond what the ACs required (no extra abstractions or future-proofing)
857
+ - Diff checked against system boundaries in `architecture.md`
858
+ - Behavioral trade-offs confirmed before accepting output
859
+ - For wrapper/layout components: existing files grepped for patterns the new component will duplicate before generation
860
+ - Observability section of the unit file is complete — success signal, failure signal, and alert threshold are recorded; any that represent code behavior are expressed as ACs and implemented in the diff
861
+ - Any AC asserting a page/route is "accessible" is verified by a rendered 200 (following redirects) with the expected content actually visible — text present and legible, images decoded (non-zero natural dimensions) — never a build pass or a 3xx redirect alone
862
+ - After any deploy, a post-deploy smoke suite passes against the live deployed URL, asserting key pages render their actual content (text visible, images decoded, primary auth/entry reachable) rather than merely returning a 200 status — a deploy is not done until this passes
863
+ - Before pushing changes that CI or any shared pipeline will check, the full local verification gate (typecheck, lint, format, tests, build, and any other CI step) passes — not just the command that changed
864
+ - Unit-test coverage is reviewed for each bolt: pure/logic code (validators, helpers, transforms, formatters) has unit tests, or it is explicitly stated that the bolt added no unit-testable logic (integration/rendering/DB-backed code belongs in the project's E2E harness, not unit tests)
865
+ - Verification gates (e.g. a post-deploy smoke suite) are run by whoever is driving the work — when an AI assistant is driving a deploy, the assistant runs the gate itself and reports the result, rather than handing a runnable check back to the engineer
866
+
867
+ ### `skills/compact-docs.md`
868
+
869
+ The compact-docs skill is engineer-triggered and must never run automatically. It archives operational documents older than the project's configured threshold to keep the active workspace manageable without losing institutional memory.
870
+
871
+ Copy this file verbatim from `process-onboarding-agent/skills/compact-docs.md` to `{FRAMEWORK_ROOT}/skills/compact-docs.md`. No customisation is needed — the archive threshold is read from the master rule file Process Configuration section at runtime.
872
+
873
+ ### `skills/root-cause-analysis.md`
874
+
875
+ The root-cause-analysis skill applies structured 5-Whys analysis to resolved incidents and filed improvements to find deeper root causes beyond the immediate fix. It classifies findings into three categories — Solution Design, Technology Selection, and Process — and produces recommendations that map directly to new intent files, ADRs, or improvement files.
876
+
877
+ Can operate on a single file or across a batch to surface cross-cutting patterns and recurring vulnerabilities.
878
+
879
+ Copy this file verbatim from `process-onboarding-agent/skills/root-cause-analysis.md` to `{FRAMEWORK_ROOT}/skills/root-cause-analysis.md`. No customisation is needed.
880
+
881
+ ### `skills/notifications.md`
882
+
883
+ The notifications skill sends Slack alerts at the delivery moments that need a human, on two layers: deterministic tool hooks for turn-ended and needs-attention pings (Claude Code, Cursor and Copilot all support these, with different event names and config files), and agent-driven, event-specific notifications for framework moments (elaboration sign-off, bolt complete, UAT sign-off, incident/hotfix, circuit breaker, dependency audit due). The incoming-webhook URL is read from the `SLACK_WEBHOOK_URL` environment variable — no webhook URL is ever written into a committed file. Sending is best-effort and never blocks a step.
884
+
885
+ Copy this file verbatim from `process-onboarding-agent/skills/notifications.md` to `{FRAMEWORK_ROOT}/skills/notifications.md`. No customization of the skill file is needed — per-project settings (event set, enabled/disabled) live in the master rule file Notifications section, and the endpoint lives in an environment variable.
886
+
887
+ **During onboarding:** run the *Onboarding setup* steps inside the skill, in the order given there. The order matters — each step depends on an earlier one:
888
+
889
+ 1. Ask whether the engineer wants notifications. It is a personal setup: their own channel, their own webhook, this machine only. Each teammate repeats it, which is why `new-engineer-induction` prompts joiners.
890
+ 2. Add `scripts/notify.env`, `.envrc` and `.claude/settings.local.json` to `.gitignore` **before** any webhook URL exists, and confirm with `git check-ignore`.
891
+ 3. Create `scripts/notify.sh` at the **repository root** — everything else calls it, so it comes first.
892
+ 4. Approve that command in the tool's allowlist so sends do not prompt.
893
+ 5. Hand the engineer the two credential steps — create the channel and webhook, then write `scripts/notify.env` — and wait. These are the only framework steps the AI cannot perform. Never ask them to paste a webhook URL into the conversation or a committed file. When they confirm, verify with a test send.
894
+ 6. Install the turn-ended and needs-attention hooks in the tool's own hook config — `.claude/settings.json`, `.cursor/hooks.json`, or `.github/hooks/notify.json`. All three tools support hooks, and they call the script from step 3.
895
+ 7. Populate the master rule file Notifications section (Section 10).
896
+ 8. Send one test notification and confirm it arrived *without* a permission prompt.
897
+
898
+ The skill's *What each AI tool gets* table lists the hook event names and config file per tool — walk through it with the team so nobody expects a ping their tool does not send.
899
+
900
+ **Section 6 routing line:** already written as part of the Section 6 template in Step 2 — do not add a second one. Verify it is present, and write Section 10 here.
901
+
902
+ ### `skills/ai-hub-metrics.md`
903
+
904
+ The ai-hub-metrics skill pushes usage/activity events to 99x AI Hub at delivery moments that mark real progress (unit Done, bolt complete, UAT sign-off, intent implemented), attributing each event to the actors who did the work and, when tracked separately, tokens/cost/model. Unlike notifications, this is a **project-wide** integration — one Team, one Workflow, one shared credential — not per engineer. The credential and workflow ids are read from environment variables; none are ever written into a committed file. Pushing is best-effort and never blocks a step.
905
+
906
+ Copy this file verbatim from `process-onboarding-agent/skills/ai-hub-metrics.md` to `{FRAMEWORK_ROOT}/skills/ai-hub-metrics.md`. No customization of the skill file is needed — per-project settings (event set, enabled/disabled) live in the master rule file AI Hub Metrics section, and the endpoint/credential/workflow ids live in environment variables.
907
+
908
+ **During onboarding:** run the *Onboarding setup* steps inside the skill, in the order given there:
909
+
910
+ 1. Ask whether the project wants AI Hub metrics. It is a project-wide setup — one team, one workflow, one shared credential.
911
+ 2. Add `scripts/ai-hub.env`, `.envrc`, and `.claude/settings.local.json` to `.gitignore` **before** any credential exists (these may already be gitignored from the notifications skill — do not duplicate entries).
912
+ 3. Create `scripts/ai-hub-push.sh` at the **repository root** — everything else calls it, so it comes first.
913
+ 4. Approve that command in the tool's allowlist so pushes do not prompt.
914
+ 5. Hand the engineer Step 1 (model the workflow, mint a team API key) and Step 2 (write `scripts/ai-hub.env`) of the skill's *Who does what* — and wait. These are the only steps the AI cannot perform. Never ask them to paste the API key into the conversation or a committed file. When they confirm, verify with a test push.
915
+ 6. Populate the master rule file AI Hub Metrics section (Section 11).
916
+ 7. Send one test push and confirm it appears in the AI Hub workflow's event list *without* a permission prompt.
917
+ 8. Present the skill's *Status summary* card to the engineer — what is being pushed, where it goes, and the exact phrases to enable, disable, or silence it. This is the hand-off moment: the engineer should not have to re-read the skill file later just to know how to turn it off.
918
+
919
+ **Section 6 routing line:** already written as part of the Section 6 template in Step 2 — do not add a second one. Verify it is present, and write Section 11 here.
920
+
921
+ **The enable/disable switch is conversational, not just a file edit.** Once installed, "enable AI Hub metrics" / "disable AI Hub metrics" flips Section 11's `Status` field directly and is project-wide — it takes effect for every engineer's next session, unlike notifications' per-engineer setup. Keep this distinct from "turn off AI Hub metrics for this session," which is non-persistent and does not touch Section 11. See the skill's *Enabling and disabling* section for the exact behavior in each case.
922
+
923
+ ### `skills/solution-shaping.md`
924
+
925
+ The solution-shaping skill runs before mob elaboration to decide the shape of the solution — generic capability or feature-specific implementation, expected usage and scale, the simplest viable approach, extend-vs-build-vs-buy, and reversibility. The signed-off decision is recorded on the intent as a `## Solution Shape` section (plus a `Shape:` header field) and inherited by the design session as binding context, so Phase 0 designs within an agreed shape rather than an open field.
926
+
927
+ It runs **at the developer's discretion** — the engineer decides per intent whether to run it or go straight to elaboration, and skipping is a legitimate choice for work that doesn't need it. Invoke it on intents where the shape isn't obvious — new capabilities, candidate platform features, or requests that may be better served by extending an existing module or adopting an existing service. `mob-elab-prompts.md` **auto-prompts** for it at the start of a session when the intent has no recorded shape, but never runs it without the engineer's go-ahead — so the step is offered, not forced.
928
+
929
+ Copy this file verbatim from `process-onboarding-agent/skills/solution-shaping.md` to `{FRAMEWORK_ROOT}/skills/solution-shaping.md`. No customization is needed.
930
+
931
+ ### `skills/design-session.md`
932
+
933
+ The design-session skill runs as Phase 0 of mob elaboration to establish an agreed design foundation — API contracts, data model sketch, and architectural pattern decisions — before any units are proposed. Mob elaboration inherits the design as binding constraints, so ACs are written against a concrete interface rather than a vague description.
934
+
935
+ The skill works through three optional areas (API contract, data model, architectural patterns) based on the intent's scope. It produces a `ops/inception/designs/YYYY-MM-DD-<unix_timestamp>-[slug]-design.md` artifact and links it back to the intent file. Any new architectural patterns agreed during the session are written to `{FRAMEWORK_ROOT}/rules/architecture.md` as ADRs immediately.
936
+
937
+ Copy this file verbatim from `process-onboarding-agent/skills/design-session.md` to `{FRAMEWORK_ROOT}/skills/design-session.md`. No customization is needed — it is called by mob-elab-prompts.md, not invoked separately.
938
+
939
+ ### `skills/uat.md`
940
+
941
+ The UAT skill runs when all units under an intent are marked Done. It generates a plain-language demo script from the acceptance criteria of every unit under the intent, guides the engineer through a stakeholder validation session, and records the outcome in the intent file's UAT Sign-off section.
942
+
943
+ The engineer chooses one of three paths: conduct UAT now (the AI walks through the script step by step and records pass/fail per step), defer UAT to a later date (recorded with a revisit date, intent can still close as Implemented), or mark UAT as not required (a reason must be stated). All three choices are recorded. The intent status cannot move to Implemented without a UAT Sign-off entry.
944
+
945
+ Any UAT failure automatically creates a draft unit in the backlog for the engineer to confirm.
946
+
947
+ Copy this file verbatim from `process-onboarding-agent/skills/uat.md` to `{FRAMEWORK_ROOT}/skills/uat.md`. No customization is needed.
948
+
949
+ **Wire into the master rule file Section 6** by adding one routing line:
950
+
951
+ ```markdown
952
+ **UAT skill:** read `{FRAMEWORK_ROOT}/skills/uat.md` when all units under an intent are marked Done, or when the engineer invokes it directly. Prompt the engineer to run UAT before setting intent status to Implemented.
953
+ ```
954
+
955
+ ### `skills/progress-digest.md`
956
+
957
+ The progress-digest skill generates a plain-language, one-page progress summary for a feature intent — written for non-technical stakeholders (product owners, clients, leadership) who cannot read engineering artifacts. It translates the intent file, bolt status, and unit statuses into a clear picture of what is being built, what is done, and what comes next.
958
+
959
+ Engineer-triggered at any point during or after delivery of an intent. Produces a single file at `{FRAMEWORK_ROOT}/ops/inception/intents/[intent-slug]-digest.md`, overwriting any previous digest for that intent. The digest is never archived — it reflects the current state of the intent whenever generated.
960
+
961
+ Copy this file verbatim from `process-onboarding-agent/skills/progress-digest.md` to `{FRAMEWORK_ROOT}/skills/progress-digest.md`. No customization is needed.
962
+
963
+ **Wire into the master rule file Section 6** by adding one routing line:
964
+
965
+ ```markdown
966
+ **Progress digest skill:** read `{FRAMEWORK_ROOT}/skills/progress-digest.md` when the engineer asks for a stakeholder update, progress summary, or digest for an intent.
967
+ ```
968
+
969
+ ### `ops/inception/dependency-map.md`
970
+
971
+ A single file that records which intents depend on which others, and which API contracts, data entities, or shared services cross intent boundaries. Updated automatically by the AI after every elaboration sign-off. Read before every bolt planning step.
972
+
973
+ Copy this file verbatim from `process-onboarding-agent/ops/inception/dependency-map.md` to `{FRAMEWORK_ROOT}/ops/inception/dependency-map.md`. It contains the empty table structure and update log — the AI populates it as intents are elaborated.
974
+
975
+ The AI must read this file before planning a bolt and flag: (1) any prerequisite intent not yet Implemented, (2) any units in the planned bolt that touch a shared interface owned by a different intent.
976
+
977
+ ### `ops/inception/codebase-findings/`
978
+
979
+ One file per module, service, or area of the existing codebase — the accumulated record of what the AI has learned by reading that code. Exists so reverse-engineering done for one intent is never repeated for the next, particularly on brownfield/mature projects where new intents routinely depend on undocumented prior implementation.
980
+
981
+ Copy `_template.md` and `README.md` verbatim from `process-onboarding-agent/ops/inception/codebase-findings/` to `{FRAMEWORK_ROOT}/ops/inception/codebase-findings/`. The folder starts with only these two files — individual finding files (e.g. `payments-service.md`) are created by the AI the first time it analyzes that module, per the `mob-elab-prompts.md` protocol above. `README.md` contains the index table the AI checks before repeating any code analysis; keep the index in sync whenever a finding file is created or updated.
982
+
983
+ ### `skills/new-engineer-induction.md`
984
+
985
+ The new-engineer-induction skill runs when an engineer joins an AI-DLC project for the first time. It reads the project's actual master rule file, domain glossary, quality gate, and backlog — then explains each section in plain language, demonstrates the quality gate with a project-specific example, optionally runs a practice elaboration for two units, prompts the engineer to set up notifications on this machine if Section 10 is enabled (the endpoint is per engineer, so a joiner gets nothing until they do), and produces a personalized quick-reference card written to `{FRAMEWORK_ROOT}/guidelines/[engineer-name-slug]-quick-ref.md`.
986
+
987
+ The session takes 30–45 minutes. Engineers who want a faster version say "quick tour" to skip the practice elaboration.
988
+
989
+ Copy this file verbatim from `process-onboarding-agent/skills/new-engineer-induction.md` to `{FRAMEWORK_ROOT}/skills/new-engineer-induction.md`. No customization is needed — the skill reads the project's own files to personalize the session.
990
+
991
+ **Wire into the master rule file Section 6** by adding one routing line:
992
+
993
+ ```markdown
994
+ **New engineer induction skill:** read `{FRAMEWORK_ROOT}/skills/new-engineer-induction.md` when an engineer says they are new to the project, or invokes it directly.
995
+ ```
996
+
997
+ ### `skills/product-engineering-essentials.md`
998
+
999
+ The product-engineering-essentials skill checks how much foundational product-engineering groundwork the repository actually has in place, across ten pillars: product vision & problem definition, user & domain understanding, product requirements & scope, UX/product design foundation, architecture & technical foundation, development standards & engineering practices, DevOps & environment foundation, quality engineering foundation, security/compliance & operational readiness, and the product delivery & feedback loop. For each item within scope it reads the actual repository (master rule file, `rules/`, `guidelines/`, intents, CI config, infra, test structure, etc.) and assigns In place / Partial / Missing / N/A with evidence — never inferring a status from a file's mere existence. It produces a checklist report, not a health score, because the pillars are not equally weighted or equally urgent for every project.
1000
+
1001
+ **This is not a mandatory gate.** No pillar is required before build work begins; the skill exists purely to make gaps visible so a team can choose deliberately rather than by accident. It never runs automatically or on a schedule.
1002
+
1003
+ Copy this file verbatim from `process-onboarding-agent/skills/product-engineering-essentials.md` to `{FRAMEWORK_ROOT}/skills/product-engineering-essentials.md`. No customization is needed.
1004
+
1005
+ **Wire into the master rule file Section 6** by adding one routing line:
1006
+
1007
+ ```markdown
1008
+ **Product engineering essentials skill:** read `{FRAMEWORK_ROOT}/skills/product-engineering-essentials.md` when the engineer invokes it directly, or once as an optional offer at the end of onboarding. Never run automatically or on a schedule — it is a checklist, not a gate.
1009
+ ```
1010
+
1011
+ ### `skills/release-readiness-checklist.md`
1012
+
1013
+ The release-readiness-checklist skill walks the engineer through the UAT Release Checklist or the Production Release Checklist, one item at a time, before a release goes out. Unlike product-engineering-essentials, it never inspects the repository for evidence — it is a pure self-attestation record: the engineer states Confirmed / Not confirmed / N/A for each item, the skill records the answer (and a blocker note for anything Not confirmed), and produces a report at the end. It is also distinct from `uat.md`: `uat.md` validates feature *behavior* against acceptance criteria with a stakeholder; this skill checks release *mechanics* — build, testing, security, database, deployment/rollback, environment readiness, and sign-offs.
1014
+
1015
+ **This is not a gate.** The skill never authorizes or blocks a release; it surfaces the self-reported state so whoever holds sign-off (technical owner, QA, security, product, operations, as applicable) can decide with full information. It never runs automatically or on a schedule.
1016
+
1017
+ Copy this file verbatim from `process-onboarding-agent/skills/release-readiness-checklist.md` to `{FRAMEWORK_ROOT}/skills/release-readiness-checklist.md`. No customization is needed.
1018
+
1019
+ **Wire into the master rule file Section 6** by adding one routing line:
1020
+
1021
+ ```markdown
1022
+ **Release readiness checklist skill:** read `{FRAMEWORK_ROOT}/skills/release-readiness-checklist.md` when the engineer invokes it directly before a UAT or production release ("run the release checklist", "check release readiness", "pre-release checklist for [version]"). Never run automatically or on a schedule — it is a self-attestation record, not a gate.
1023
+ ```
1024
+
1025
+ ### `skills/knowledge-promotion.md`
1026
+
1027
+ The knowledge-promotion skill evaluates each applied improvement to determine whether it is generic (beneficial to all AI-DLC projects) or project-specific. For generic improvements, it drafts the exact change needed in the base repository — file path, current text, and proposed replacement — so the engineer can raise a PR against `ai-dlc-base` without having to reconstruct the context later. The promotion decision and draft are recorded in the improvement file.
1028
+
1029
+ Runs automatically as Step 5 of the Post-Retro Improvement Workflow after all improvements are applied. Can also be invoked directly against a specific improvement. A retro is not fully closed until every Applied improvement has a Knowledge Promotion status recorded.
1030
+
1031
+ The skill uses the target file as the primary classification signal — files copied verbatim from the base repo (skills, templates, `engagement.md`) are classified generic; files generated per project (code-standards, architecture, domain-glossary, etc.) are classified project-specific. Ambiguous cases are resolved using a content test: would this improvement still apply to a project with a completely different tech stack and domain?
1032
+
1033
+ Copy this file verbatim from `process-onboarding-agent/skills/knowledge-promotion.md` to `{FRAMEWORK_ROOT}/skills/knowledge-promotion.md`. No customization is needed.
1034
+
1035
+ **Wire into the master rule file Section 6** by adding one routing line:
1036
+
1037
+ ```markdown
1038
+ **Knowledge promotion skill:** read `{FRAMEWORK_ROOT}/skills/knowledge-promotion.md` as Step 5 of the Post-Retro Improvement Workflow, after all improvements are applied. A retro is not closed until every Applied improvement has a Knowledge Promotion status.
1039
+ ```
1040
+
1041
+ ### `skills/process-visualization.md`
1042
+
1043
+ The process-visualization skill reconstructs how a bolt (or a whole intent) actually got delivered and renders it as Mermaid diagrams — an actual delivery timeline (`gantt`) and an actual execution path (`flowchart`) — plus a plan-vs-actual deviation table comparing the bolt's recorded `Execution Order` against what really happened. When the project is a git repository, it mines commit history for each unit and bolt file to find the real dates a `Status:` field changed; otherwise it falls back to the dates already recorded in the artifacts and says so plainly.
1044
+
1045
+ Offered at the start of every retro, before "What Went Well" is discussed, the same way `solution-shaping.md` is offered before design sessions — the engineer accepts, skips, or runs it later. Output is written into the retro file's "Delivery Flow (What Actually Happened)" section, so the rest of the retro discussion has a factual anchor instead of relying on memory.
1046
+
1047
+ Copy this file verbatim from `process-onboarding-agent/skills/process-visualization.md` to `{FRAMEWORK_ROOT}/skills/process-visualization.md`. No customization is needed.
1048
+
1049
+ **Wire into the master rule file Section 6** by adding one routing line:
1050
+
1051
+ ```markdown
1052
+ **Process visualization skill:** offer to read `{FRAMEWORK_ROOT}/skills/process-visualization.md` at the start of every retro, before "What Went Well" is discussed. The engineer may accept, skip, or invoke it directly at any time. Never run it without the engineer's go-ahead.
1053
+ ```
1054
+
1055
+ ### `skills/governance-map.md`
1056
+
1057
+ The governance-map skill draws a one-page map of how the project's installed framework governs delivery: the governance layer (master rule file, `rules/`, `guidelines/`), the steps of each phase, every gate the engineer must sign off, the bolt variants, the scheduled and on-demand skills, and the feedback loops through which retros and RCAs rewrite the rules. It builds the map only from the project's own files. Every element must cite the file and section it came from, and anything the files do not support is left off. It also reports "map gaps": skills installed but not routed in Section 6, and routing lines that point to missing files.
1058
+
1059
+ Output is written to the framework root as `governance-map.md` (a Mermaid flowchart plus reference tables, renders in Git hosts and IDEs) and `governance-map.html` (a self-contained blueprint page with inline SVG and no external resources). Both are overwritten on regeneration. It is distinct from `process-visualization.md`, which reconstructs what actually happened in one bolt; this skill draws what the framework requires for every bolt.
1060
+
1061
+ Copy this file verbatim from `process-onboarding-agent/skills/governance-map.md` to `{FRAMEWORK_ROOT}/skills/governance-map.md`. No customization is needed — the skill reads the project's own files to build the map.
1062
+
1063
+ **Wire into the master rule file Section 6** by adding one routing line:
1064
+
1065
+ ```markdown
1066
+ **Governance map skill:** read `{FRAMEWORK_ROOT}/skills/governance-map.md` when the engineer asks to draw, show or regenerate the governance map. Offer it once at the end of a new engineer induction, and once after the Post-Retro Improvement Workflow applies an improvement that adds, removes or changes a gate, a ceremony or a skill routing line. Never run it without the engineer's go-ahead.
1067
+ ```
1068
+
1069
+ ### `skills/dependency-audit.md`
1070
+
1071
+ The dependency-audit skill audits third-party dependencies for major version drift, end-of-life packages, and known vulnerability patterns. It runs in two phases: AI analysis of manifest files using training knowledge, followed by a tool-assisted scan where the engineer runs their ecosystem's security scanner (npm audit, pip-audit, bundler-audit, etc.) and shares the output. Findings are classified by severity and converted into Remediation Bolts in the backlog.
1072
+
1073
+ The skill is scheduled — the next audit date is stored in the master rule file Section 9 (Process Configuration). At the start of every session, the AI checks whether the scheduled date has passed and prompts the engineer if so. The engineer may run the audit immediately or defer it to a new date. The recommended cadence is once a month.
1074
+
1075
+ Copy this file verbatim from `process-onboarding-agent/skills/dependency-audit.md` to `{FRAMEWORK_ROOT}/skills/dependency-audit.md`. No customization is needed.
1076
+
1077
+ **During onboarding (Step 9 of the Process Configuration section):** ask the engineer when they would like to schedule the first audit and populate the `Next dependency audit` row accordingly.
1078
+
1079
+ ### `skills/process-health.md`
1080
+
1081
+ The process-health skill analyses the project's operational artifacts and produces a quantitative report on how well the AI-DLC process is functioning. It calculates four metrics — improvement adoption rate, quality gate failure rate, AC revision rate, and bolt velocity trend — and surfaces additional decay signals such as retros with no improvements, stale open improvements, and recurring failure patterns.
1082
+
1083
+ The report is presented in-conversation and always saved to `{FRAMEWORK_ROOT}/ops/operate/process-health-YYYY-MM-DD.md` automatically. Reports accumulate over time, making it possible to compare health trends across runs.
1084
+
1085
+ Recommended cadence: after every third or fourth bolt, or whenever the team suspects the process has drifted.
1086
+
1087
+ Copy this file verbatim from `process-onboarding-agent/skills/process-health.md` to `{FRAMEWORK_ROOT}/skills/process-health.md`. No customization is needed.
1088
+
1089
+ **Wire into the master rule file Section 6** by adding one routing line:
1090
+
1091
+ ```markdown
1092
+ **Process health skill:** read `{FRAMEWORK_ROOT}/skills/process-health.md` when the engineer invokes it to audit how well the AI-DLC process is functioning.
1093
+ ```
1094
+
1095
+ ### `skills/bolt-risk-assessment.md`
1096
+
1097
+ The bolt-risk-assessment skill runs after elaboration sign-off and before the first unit in a bolt executes. It actively interrogates each unit for blast radius, cross-unit sequencing risks, rollback feasibility, and feature flag requirements — replacing the passive "Risks and Assumptions" table in the bolt file with structured, engineer-signed-off findings.
1098
+
1099
+ For mature projects (those with existing code), this assessment is mandatory before any unit executes. For fresh projects with no existing modules affected, it may be brief but must still be completed.
1100
+
1101
+ Copy this file verbatim from `process-onboarding-agent/skills/bolt-risk-assessment.md` to `{FRAMEWORK_ROOT}/skills/bolt-risk-assessment.md`. No customization is needed.
1102
+
1103
+ **Wire into the master rule file Section 6** by adding one routing line:
1104
+
1105
+ ```markdown
1106
+ **Bolt risk assessment:** read `{FRAMEWORK_ROOT}/skills/bolt-risk-assessment.md` after elaboration sign-off and before the first unit in a bolt executes. No unit may begin execution without a signed-off risk assessment in the bolt file.
1107
+ ```
1108
+
1109
+ ### `skills/bug-bolt.md`
1110
+
1111
+ The bug-bolt skill is a lightweight bolt workflow for fixing a specific, reproducible bug. It replaces the full elaboration ceremony with a four-question intake, a recurrence check against retro and incident history, a single focused unit with regression-guard ACs, and a mandatory RCA if the bug is recurring. Skips: design session, dependency map update, mob elaboration. Preserves: pre-generation checks, review checklist, blast radius assessment for shared components, and post-fix retro.
1112
+
1113
+ Copy this file verbatim from `process-onboarding-agent/skills/bug-bolt.md` to `{FRAMEWORK_ROOT}/skills/bug-bolt.md`. No customization is needed.
1114
+
1115
+ **Wire into the master rule file Section 6** by adding one routing line:
1116
+
1117
+ ```markdown
1118
+ **Bug bolt:** read `{FRAMEWORK_ROOT}/skills/bug-bolt.md` when the engineer says "fix a bug", "there's a bug in X", or "bug: [description]". Do not run a full mob elaboration — follow the bug bolt workflow directly.
1119
+ ```
1120
+
1121
+ ---
1122
+
1123
+ ### `skills/hotfix-bolt.md`
1124
+
1125
+ The hotfix-bolt skill is an emergency bolt for production incidents that cannot wait for a planning cycle. It runs a three-question intake (symptom, severity, rollback availability), creates a minimal unit with a two-AC pair (fix applied / no regressions), confirms the blast radius before any code is generated, and mandates a retro and RCA within 24 hours. Skips: elaboration, design session, dependency map update. Preserves: review checklist, pre-generation checks, incident file creation, retro.
1126
+
1127
+ Copy this file verbatim from `process-onboarding-agent/skills/hotfix-bolt.md` to `{FRAMEWORK_ROOT}/skills/hotfix-bolt.md`. No customization is needed.
1128
+
1129
+ **Wire into the master rule file Section 6** by adding one routing line:
1130
+
1131
+ ```markdown
1132
+ **Hotfix bolt:** read `{FRAMEWORK_ROOT}/skills/hotfix-bolt.md` when the engineer says "hotfix", "production issue", "prod is down", or "emergency fix for X". Skip elaboration — begin hotfix intake immediately.
1133
+ ```
1134
+
1135
+ ---
1136
+
1137
+ ### `skills/nfr-bolt.md`
1138
+
1139
+ The nfr-bolt skill handles non-functional quality attribute improvements — performance, security hardening, accessibility, reliability, observability, and scalability. It does not create a new intent; it references and improves existing ones. Key controls: measurable threshold ACs are mandatory (vague ACs are rejected), a before/after measurement is required for bolt closure, affected intents are identified upfront and cross-referenced after completion, and bolt-risk-assessment runs before any unit executes because NFR changes often have wider blast radii than they appear.
1140
+
1141
+ Copy this file verbatim from `process-onboarding-agent/skills/nfr-bolt.md` to `{FRAMEWORK_ROOT}/skills/nfr-bolt.md`. No customization is needed.
1142
+
1143
+ **Wire into the master rule file Section 6** by adding one routing line:
1144
+
1145
+ ```markdown
1146
+ **NFR bolt:** read `{FRAMEWORK_ROOT}/skills/nfr-bolt.md` when the engineer says "improve performance", "harden security", "accessibility improvements", "NFR bolt for X", or "non-functional work on X". Do not create a new intent — follow the NFR bolt workflow.
1147
+ ```
1148
+
1149
+ ---
1150
+
1151
+ ### External skills (`external-skills/`)
1152
+
1153
+ External skills live in other repositories and reach the project through an MCP server their maintainers publish. Each is described by an adapter in `process-onboarding-agent/external-skills/` — every `.md` file there except `README.md`. The adapter says which AI tools the skill supports, what the project needs before it can be offered, whether to offer it during onboarding, when to offer it during delivery, how its MCP server is launched, and how its outputs feed the framework. The skill's own content is never copied into `{FRAMEWORK_ROOT}`.
1154
+
1155
+ Run this setup after the notifications and ai-hub-metrics setup conversations. Never block onboarding on it.
1156
+
1157
+ 1. List the adapters. Keep only those whose `Supported tools` includes the AI tool identified in **Before You Begin**, Question 1. Never offer or mention the others.
1158
+ 2. If none remain, skip the rest of this setup: do not create `{FRAMEWORK_ROOT}/external-skills/`, and omit the Section 6 **External skills** line and the Section 9 `External skills` row.
1159
+ 3. Copy `process-onboarding-agent/external-skills/README.md` and every remaining adapter verbatim to `{FRAMEWORK_ROOT}/external-skills/`.
1160
+ 4. For each remaining adapter, read its **Onboarding Offer**:
1161
+ - If this project's type (Fresh or Mature) is listed under `Project types`, check the adapter's **Requirements** first, as **Readiness** in `external-skills/README.md` describes. If they are met, ask its question. On *install now*, follow **Connecting a Server** in that README, including its verification step; if the server does not connect, tell the engineer and record `Offer at stage` instead. Map every other answer as the adapter's table says. If a requirement is not met, record `Offer at stage` without asking and tell the engineer what is missing.
1162
+ - If this project's type is not listed, record `Offer at stage` without asking.
1163
+ 5. Write the Section 9 `External skills` row with one entry per copied adapter, and add the **External skills** routing line to Section 6.
1164
+ 6. Show the engineer a one-line status per external skill — name, status, and the offer point at which it will next appear.
1165
+
1166
+ The runtime behaviour — what happens at each offer point, and the precedence rule that keeps the master rule file in charge of the delivery process — is defined in `{FRAMEWORK_ROOT}/external-skills/README.md`. Do not restate it in the master rule file.
1167
+
1168
+ ---
1169
+
1170
+ ## Step 5 — Write the Guidelines Files
1171
+
1172
+ ### `guidelines/domain-glossary.md`
1173
+
1174
+ Full definitions for every domain term. Each entry: term, definition, usage notes, and related terms. The glossary in the master rule file is a summary — this file is the authoritative source.
1175
+
1176
+ ### `guidelines/edge-cases.md`
1177
+
1178
+ Full descriptions of each known edge case: the scenario, the required behavior, and which parts of the system must handle it. Start with the ones most relevant to your domain. Add entries from retros and incidents.
1179
+
1180
+ ### `guidelines/acceptance-patterns.md`
1181
+
1182
+ Rules for writing good Given/When/Then ACs:
1183
+ - One behavior per criterion (no compound ACs)
1184
+ - Name the actor in every Given
1185
+ - Cover at least one unhappy path per unit
1186
+ - No implementation details in ACs
1187
+ - Anti-patterns to avoid (vague outcomes, testing implementation not behavior)
1188
+
1189
+
1190
+ ### `guidelines/dev-setup.md`
1191
+
1192
+ Step-by-step environment setup for a new engineer:
1193
+ - All prerequisites with version checks
1194
+ - Configuration files needed and what goes in them (no actual secrets — explain how to get them)
1195
+ - How to start each service
1196
+ - Auth verification steps
1197
+ - Secrets hygiene checklist
1198
+
1199
+ ### `guidelines/team-rollout.md`
1200
+
1201
+ Covers: git branching conventions, environment isolation, secrets management, backlog ownership, multi-FDE Bolt rhythm, PR checklist, merge conflict resolution (including AI-assisted resolution), team leader review guidelines, and common anti-patterns.
1202
+
1203
+ ---
1204
+
1205
+ ## Step 6 — Write the Ops Templates
1206
+
1207
+ Each template file defines the structure for its artifact type. The key templates:
1208
+
1209
+ ### `ops/inception/intents/_template.md`
1210
+ Fields: Status, Date, Owner, **AI Risk** (Minimal / Limited / High — see template for definitions), What, Why, Success Looks Like, Assumptions, Open Questions, Out of Scope, Elaboration Sessions, Extracted Units, UAT Sign-off, Implementation Summary.
1211
+
1212
+ The **AI Risk** field gates the review level required: Minimal → standard review; Limited → named engineer sign-off on ACs before elaboration and on Implementation Summary before merge; High → senior engineer approval before any elaboration begins, plus all Limited controls.
1213
+
1214
+ The **Implementation Summary** section is written by the AI once all units under the intent have been delivered and merged. It must not be filled in earlier. It contains four subsections:
1215
+
1216
+ 1. **What Was Built** — user-facing description of every feature delivered under the intent; one paragraph per distinct feature
1217
+ 2. **How It Works (Key Design Decisions)** — data model choices, API contracts, edge cases explicitly handled, and non-obvious implementation facts a future engineer must know before modifying the feature
1218
+ 3. **Scope Delivered vs. Original Intent** — any deviations from the original intent (descoped items, changed assumptions, additions); write "Delivered as specified" if none
1219
+ 4. **Known Limitations and Future Considerations** — constraints the current implementation imposes on future changes; write "None identified" if none
1220
+
1221
+ When the last unit of an intent is confirmed done, the AI must:
1222
+ 1. Set the intent status to **Implemented**
1223
+ 2. Write the Implementation Summary by reading the elaboration session files, unit files, and bolt retros for this intent
1224
+ 3. Ask the engineer to review the summary before closing the intent
1225
+
1226
+ The Implementation Summary is the authoritative reference for future Bolts that modify or extend this feature. Any Bolt touching a feature covered by an intent must read its Implementation Summary before elaboration begins.
1227
+
1228
+ ### `ops/build/units/_template.md`
1229
+ Fields: Status, Intent link, Elaboration link, Bolt link, Priority, Context, Acceptance Criteria, Scope (in/out), Dependencies, Pre-generation Checks, Edge Cases to Handle, Definition of Done, Prompt Log link, Notes.
1230
+
1231
+ The **Pre-generation Checks** section is critical for wrapper/layout units — list grep patterns to run across existing files before generating to surface duplication.
1232
+
1233
+ ### `ops/build/bolts/_template.md`
1234
+ Fields: Status, Goal, Start/Target/Completed dates, Artifact handoff, Units table, Execution Order diagram, Risks & Assumptions, Definition of Done, Retrospective link.
1235
+
1236
+ ### `ops/operate/retros/_template.md`
1237
+ Sections: What Went Well, What Didn't Go Well, AI-Specific Observations (prompts that worked / needed revision / quality gate failures / output accepted without enough review), Actions table, Improvements Triggered (**required** — cannot be left blank without a stated reason), New Intents Triggered, Post-Retro Improvement Workflow.
1238
+
1239
+ **The Post-Retro Improvement Workflow is mandatory and AI-driven.** Immediately after the retro document is complete, the AI must:
1240
+ 1. Synthesize every finding in "What Didn't Go Well" and "AI-Specific Observations" into concrete improvement proposals — one per finding — identifying the exact file and text to change
1241
+ 2. Present all proposals to the engineer for approval, rejection, or revision before touching any file
1242
+ 3. **For each approved proposal:** check which open or in-progress units reference the section being changed (Pre-generation Checks, ACs, or referenced rule files) and present the impact list to the engineer before applying. Record affected units in the improvement file.
1243
+ 4. For each approved proposal: create an improvement file, apply the change to the target file, and update mirror files if the master rule file was modified
1244
+ 5. Mark each improvement Applied in the retro and close the retro only when all approved improvements are applied
1245
+
1246
+ The intent is that every retro automatically tightens the rules, skills, and guidelines that govern the next bolt. No finding should require the engineer to manually translate it into a file change.
1247
+
1248
+ ### `ops/operate/improvements/_template.md`
1249
+ Fields: Triggered by (retro/incident link), Target file, Current text, Proposed replacement, Reason, Validation criteria, Status, Applied date.
1250
+
1251
+ ---
1252
+
1253
+ ## Step 7 — Write Instructions2FDE.md
1254
+
1255
+ This is the main onboarding document for every engineer. Sections:
1256
+ 1. What AI-DLC is (the loop diagram: Inception → Build → Operate → Improvements)
1257
+ 2. How to invoke each ceremony by talking to the AI (not by following manual steps)
1258
+ 3. What the engineer still owns (review, AC confirmation, running tests, edge case checks)
1259
+ 4. Phase 1 — Inception (how intents and mob elaboration work)
1260
+ 5. Phase 2 — Build (bolts, unit execution order, review before merge)
1261
+ 6. Phase 3 — Operate (retros, incidents, improvements)
1262
+ 7. The Three Non-Negotiables (quality gate, review checklist, prompt log)
1263
+ 8. Using a different AI tool (Cursor → `.cursor/rules/project-rules.mdc`; GitHub Copilot → `.github/copilot-instructions.md`)
1264
+ 9. Common mistakes table
1265
+ 10. Quick reference table (ceremony → what to say to the AI)
1266
+
1267
+ ---
1268
+
1269
+ ## Step 8 — Confirm Tool Setup and Add Mirror Files
1270
+
1271
+ ### Primary tool setup
1272
+
1273
+ By this point your master rule file should exist at the correct path for your chosen tool (see **Before You Begin**). Verify:
1274
+
1275
+ | Tool | Expected path | Loaded automatically? |
1276
+ |---|---|---|
1277
+ | Claude Code | `CLAUDE.md` at repo root | Yes — every session |
1278
+ | Cursor | `.cursor/rules/project-rules.mdc` (with `alwaysApply: true`) | Yes — every session |
1279
+ | GitHub Copilot | `.github/copilot-instructions.md` | Yes — every session |
1280
+
1281
+ ### Supporting multiple tools in the same repo
1282
+
1283
+ If your team uses more than one AI tool, create copies of the master rule file for each additional tool. The content is identical — only the file name, location, internal link prefixes, and (for Cursor) a wrapping YAML frontmatter block differ.
1284
+
1285
+ **Add Cursor support** (if your primary tool is Claude Code or Copilot):
1286
+ ```bash
1287
+ mkdir -p .cursor/rules
1288
+ printf -- '---\nalwaysApply: true\n---\n\n' > .cursor/rules/project-rules.mdc
1289
+ cat CLAUDE.md >> .cursor/rules/project-rules.mdc
1290
+ ```
1291
+ Open `.cursor/rules/project-rules.mdc` and, in the copied content below the `---` frontmatter block, update the opening line to reference Cursor.
1292
+
1293
+ **Add GitHub Copilot support** (if your primary tool is Claude Code or Cursor):
1294
+ ```bash
1295
+ mkdir -p .github
1296
+ cp CLAUDE.md .github/copilot-instructions.md
1297
+ ```
1298
+ Open `.github/copilot-instructions.md`, update the opening line to reference GitHub Copilot, and change all `{FRAMEWORK_ROOT}/` link prefixes to `../{FRAMEWORK_ROOT}/`.
1299
+
1300
+ **Add Claude Code support** (if your primary tool is Cursor or Copilot):
1301
+ ```bash
1302
+ # From Cursor rule file — strip the YAML frontmatter before copying:
1303
+ tail -n +5 .cursor/rules/project-rules.mdc > CLAUDE.md
1304
+ # Or from Copilot:
1305
+ # cp .github/copilot-instructions.md CLAUDE.md
1306
+ ```
1307
+ Open `CLAUDE.md`, update the opening line to reference Claude Code, and if copying from Copilot change all `../{FRAMEWORK_ROOT}/` prefixes back to `{FRAMEWORK_ROOT}/`.
1308
+
1309
+ ### Sync discipline
1310
+
1311
+ Whenever the master rule file is updated, all mirror files must be updated in the same PR. Add this to your PR checklist — it is a team discipline, not an automated process.
1312
+
1313
+ ---
1314
+
1315
+ ## Step 9 — Initialize the Backlog and First Intent
1316
+
1317
+ 1. Copy `process-onboarding-agent/ops/build/backlog.md` to `{FRAMEWORK_ROOT}/ops/build/backlog.md` — it already contains the empty status sections and the Reference Link Registry comment at the bottom.
1318
+ 2. Copy `process-onboarding-agent/ops/inception/dependency-map.md` to `{FRAMEWORK_ROOT}/ops/inception/dependency-map.md` — it contains the empty map structure and update log.
1319
+ 3. Identify the first capability to build and write an intent: `ops/inception/intents/YYYY-MM-DD-<unix_timestamp>-<slug>.md`
1320
+ 4. Say to your AI assistant: "Run a mob elaboration for the [intent name] intent"
1321
+ 5. After sign-off, the AI creates one unit file for every agreed unit, updates the intent's Extracted Units table, updates the backlog, and updates the dependency map. **When adding any unit or bolt to the backlog, the AI must use reference-style links** — write the display text as `[Unit-name][unit-slug]` in the table and add the path definition to the Reference Link Registry at the bottom of the file. Never use inline URLs in backlog tables.
1322
+ 6. Say: "Plan a bolt from the open units in the backlog" — before creating the bolt file, the AI reads `ops/inception/dependency-map.md` and flags any prerequisite intents that are not yet Implemented, or any units that touch a shared interface owned by a different intent. The AI then creates the bolt, assigns its units, and updates each unit's bolt link. After the bolt and unit assignments exist, verify the handoff: every agreed unit has a real file, an intent link, a bolt link to the created bolt, a backlog row, and a status consistent across those records. If any check fails, stop and report the missing artifact; do not execute any unit. Once all checks pass, set the bolt's `Artifact handoff` field to `Complete`.
1323
+ 7. Say: "Execute unit [name] from bolt [name]"
1324
+
1325
+ ---
1326
+
1327
+ ## What Makes This Work
1328
+
1329
+ The quality of the framework depends entirely on two things:
1330
+
1331
+ **1. The specificity of the master rule file.** Generic rules produce generic output. The more your master rule file encodes your actual domain language, your actual architectural decisions, and your actual learned anti-patterns, the better every AI interaction will be. A master rule file written on day one will be much weaker than one shaped by three bolts of retros.
1332
+
1333
+ **2. The discipline of the retro loop.** The retro is the compiler for the process. Every failure that is not encoded into a rule will recur. Every retro that produces no improvement file means the next bolt starts from the same baseline. Run the retro after every bolt, file the improvements, and the framework compounds.
1334
+
1335
+ ---
1336
+
1337
+ ## Onboarding Completion — What the Agent Must Produce
1338
+
1339
+ When the agent has finished executing this guide, it must output a structured completion report before handing back to the engineer. The report must contain:
1340
+
1341
+ ### 1. Files Created
1342
+ A table of every file written during onboarding, grouped by folder.
1343
+
1344
+ | File | Status | Notes |
1345
+ |---|---|---|
1346
+ | `CLAUDE.md` (or tool equivalent) | Created | Sections 1–11 populated |
1347
+ | `{FRAMEWORK_ROOT}/rules/...` | Created | … |
1348
+ | *(etc.)* | | |
1349
+
1350
+ ### 2. Sections Requiring Engineer Review
1351
+ List every section or field in the master rule file that the agent could not populate from the codebase and left as a placeholder. The engineer must fill these before the first Bolt runs.
1352
+
1353
+ ### 3. Open Questions
1354
+ Any ambiguity the agent encountered that the engineer must resolve — e.g., conflicting patterns found in the codebase, modules where ownership was unclear, or test coverage below the gate threshold.
1355
+
1356
+ ### 4. First Recommended Action
1357
+ One sentence: what the engineer should do next before starting the experience agent (e.g., "Review the domain glossary placeholders in Section 4 of the master rule file, then start a new session to begin the first mob elaboration.").
1358
+
1359
+ ### 4b. Optional Offer — Product Engineering Essentials Check
1360
+ Before the mandatory handoff (item 5), offer the engineer the essentials check once — do not run it, only offer it:
1361
+
1362
+ > "One optional thing before you go: I can run a Product Engineering Essentials check — a ten-pillar checklist (vision, domain understanding, requirements, UX, architecture, engineering practices, DevOps, quality engineering, security/compliance, and the delivery feedback loop) showing what's already in place in this repo and what isn't. It's not a gate — nothing blocks on it — just a shared picture of the gaps. Want to run it now, or skip it? You can always run it later by saying 'run product engineering essentials.'"
1363
+
1364
+ If the engineer wants it now, run `process-onboarding-agent/skills/product-engineering-essentials.md` before presenting item 5's handoff. If they decline or want to defer, do not offer again this session — proceed straight to item 5.
1365
+
1366
+ ### 5. How to Start the Experience Agent
1367
+
1368
+ This is the final and mandatory step. After the report is presented, the agent must say:
1369
+
1370
+ ---
1371
+
1372
+ > **Onboarding is complete. The experience agent is now embedded in your `[master rule file name]`.**
1373
+ >
1374
+ > **This session is now finished. Do not continue working in this conversation.** The onboarding session has accumulated context — interview answers, archaeology findings, file creation history — that is no longer needed and will slow down and distort future AI sessions.
1375
+ >
1376
+ > **To start the experience agent:**
1377
+ > 1. Close or end this conversation entirely.
1378
+ > 2. Open a brand new session inside your project repository using your AI tool ([Claude Code / Cursor / GitHub Copilot]).
1379
+ > 3. Your AI tool will automatically load `[master rule file path]` at the start of the session.
1380
+ > 4. Say: **"[first action from item 4 above]"**
1381
+ >
1382
+ > From that point forward, every session in this repository is an experience agent session. The onboarding agent is not needed again unless you are onboarding a new project.
1383
+
1384
+ ---
1385
+
1386
+ > The agent must not mark onboarding as complete until all checklist items below are checked and this report — including the handoff instruction — has been presented to the engineer.
1387
+
1388
+ ---
1389
+
1390
+ ## Checklist: Ready to Start
1391
+
1392
+ **Tool setup**
1393
+ - [ ] AI tool identified (Claude Code / Cursor / GitHub Copilot)
1394
+ - [ ] Master rule file created at the correct path for your tool (see Before You Begin)
1395
+ - [ ] Mirror files created for any additional tools in use (see Step 8)
1396
+
1397
+ **Framework files**
1398
+ - [ ] Folder structure created (`{FRAMEWORK_ROOT}/` tree from Step 1)
1399
+ - [ ] Master rule file written with all 11 sections (Step 2)
1400
+ - [ ] `rules/` files written (prompt-quality-gate, code-standards, security, architecture)
1401
+ - [ ] `skills/` files written (mob-elab-prompts, review-checklist)
1402
+ - [ ] External skills settled — adapters copied and the Section 9 `External skills` row written, or none support this AI tool (Step 4)
1403
+ - [ ] `guidelines/` files written (domain-glossary, edge-cases, acceptance-patterns, dev-setup)
1404
+ - [ ] Ops templates written (intent, unit, bolt, retro, incident, improvement, codebase-findings)
1405
+ - [ ] `Instructions2FDE.md` written
1406
+ - [ ] `{FRAMEWORK_ROOT}/README.md` written
1407
+
1408
+ **First iteration**
1409
+ - [ ] First intent written and ready for mob elaboration