@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,123 @@
1
+ # Skill: Compact Docs
2
+
3
+ **Purpose:** Archive operational documents older than the project's configured threshold to keep the active workspace manageable without losing institutional memory.
4
+
5
+ **Trigger:** Engineer-initiated only. The engineer invokes this skill by saying something like: "run compact-docs", "archive old operational documents", or "compact the ops folder."
6
+
7
+ **Never run automatically.** This skill must not be triggered by any other workflow step.
8
+
9
+ ---
10
+
11
+ ## Step 1 — Determine the Archive Threshold
12
+
13
+ Read the **Archive threshold** value from the Process Configuration section of the master rule file.
14
+
15
+ - If the value is set, confirm it with the engineer before proceeding:
16
+ > "The archive threshold is set to [X] months. Documents last modified before [calculated date] will be eligible. Shall I continue?"
17
+ - If the value is not set, ask the engineer:
18
+ > "No archive threshold is configured. How many months old must a document be before it qualifies for archiving?"
19
+ Record the answer and ask if it should be saved to the master rule file for future use.
20
+
21
+ ---
22
+
23
+ ## Step 2 — Scan for Qualifying Documents
24
+
25
+ Scan the following folders. A document qualifies for archiving if its last-modified date is older than the threshold **and** its status permits archiving:
26
+
27
+ | Folder | Eligible statuses |
28
+ |---|---|
29
+ | `process-onboarding-agent/ops/inception/elaborations/` | Any (elaboration sessions are records, not live documents) |
30
+ | `process-onboarding-agent/ops/build/units/` | Done, Cancelled |
31
+ | `process-onboarding-agent/ops/build/bolts/` | Done, Cancelled |
32
+ | `process-onboarding-agent/ops/operate/retros/` | Any |
33
+ | `process-onboarding-agent/ops/operate/incidents/` | Resolved |
34
+ | `process-onboarding-agent/ops/operate/improvements/` | Applied, Rejected |
35
+
36
+ **Never archive:**
37
+ - Intent files (`process-onboarding-agent/ops/inception/intents/`) — these hold the Implementation Summary and are permanent references
38
+ - Any document with status Open, In Progress, Planned, or Blocked
39
+ - Template files (`_template.md`)
40
+ - Index and README files (`backlog.md`, `README.md`, `digest.md`)
41
+
42
+ ---
43
+
44
+ ## Step 3 — Present the Archive Preview
45
+
46
+ Before moving any file, present a table of everything that qualifies:
47
+
48
+ ```
49
+ Documents to be archived (older than [X] months):
50
+
51
+ Folder | File | Last modified | Status
52
+ process-onboarding-agent/ops/build/bolts/ | 2024-11-10-auth-bolt.md | 2024-11-30 | Done
53
+ process-onboarding-agent/ops/operate/retros/ | 2024-11-30-bolt-1-retro.md | 2024-11-30 | —
54
+ ...
55
+
56
+ [N] documents will be archived. [M] documents will remain active.
57
+
58
+ Proceed? (yes / no / show me what stays)
59
+ ```
60
+
61
+ Do not move any file until the engineer confirms.
62
+
63
+ ---
64
+
65
+ ## Step 4 — Archive Documents
66
+
67
+ For each qualifying folder that has documents to archive:
68
+
69
+ 1. Create `archive/` subfolder inside the folder if it does not already exist.
70
+ 2. Move each qualifying document into `archive/`.
71
+ 3. Append a one-line entry per document to `archive/digest.md` in that folder, creating the file if it does not exist. Entry format:
72
+
73
+ ```markdown
74
+ | YYYY-MM-DD | [filename](filename) | [one-sentence summary of the document's key outcome or finding] |
75
+ ```
76
+
77
+ The digest must contain enough information for a future engineer to know whether to retrieve a document without having to open it.
78
+
79
+ ---
80
+
81
+ ## Step 5 — Update the Backlog
82
+
83
+ `backlog.md` uses Markdown reference-style links defined in a **Reference Link Registry** section at the bottom of the file. All unit and bolt links in the table body are written as `[Unit-name][unit-name-ref]` rather than inline URLs. This means updating an archived item requires changing exactly one line in the registry — the path update — without touching the table matrix at all.
84
+
85
+ For each archived unit or bolt:
86
+
87
+ 1. Locate its entry in the Reference Link Registry at the bottom of `backlog.md`. It will look like:
88
+ ```
89
+ [unit-name-ref]: process-onboarding-agent/ops/build/units/filename.md
90
+ ```
91
+ 2. Update the path to point into `archive/`:
92
+ ```
93
+ [unit-name-ref]: process-onboarding-agent/ops/build/units/archive/filename.md
94
+ ```
95
+ 3. Append ` <!-- archived -->` as an inline comment on the same line so archived entries are scannable without following the link:
96
+ ```
97
+ [unit-name-ref]: process-onboarding-agent/ops/build/units/archive/filename.md <!-- archived -->
98
+ ```
99
+
100
+ Do not touch the table rows. Do not rewrite inline links. If a backlog entry does not use a reference-style link (i.e., it was added manually with an inline URL), flag it to the engineer rather than attempting to rewrite it — inconsistent link styles should be corrected by the engineer, not silently patched by this skill.
101
+
102
+ ---
103
+
104
+ ## Step 6 — Report
105
+
106
+ Present a completion summary:
107
+
108
+ ```
109
+ Compact-docs complete.
110
+
111
+ Archived:
112
+ - [N] elaboration sessions → process-onboarding-agent/ops/inception/elaborations/archive/
113
+ - [N] units → process-onboarding-agent/ops/build/units/archive/
114
+ - [N] bolts → process-onboarding-agent/ops/build/bolts/archive/
115
+ - [N] retros → process-onboarding-agent/ops/operate/retros/archive/
116
+ - [N] incidents → process-onboarding-agent/ops/operate/incidents/archive/
117
+ - [N] improvements → process-onboarding-agent/ops/operate/improvements/archive/
118
+
119
+ Digest files updated: [list of digest.md paths]
120
+ Backlog links updated: [yes / no changes needed]
121
+
122
+ To retrieve an archived document, look in the relevant archive/ subfolder or read the digest.md file there.
123
+ ```
@@ -0,0 +1,187 @@
1
+ # Skill: Dependency Audit
2
+
3
+ **Purpose:** Audit the project's third-party dependencies for major version drift, known vulnerability patterns, and end-of-life packages. Produces a ranked findings list and converts actionable findings into Remediation Bolts in the backlog. Runs on a scheduled cadence — at least once a month — to catch what accumulates passively between active development.
4
+
5
+ **Trigger:** Engineer-initiated, or prompted automatically by the AI at session start when the `Next dependency audit` date in the master rule file Process Configuration has been reached. Invoked by saying "run dependency audit" or "run security posture check."
6
+
7
+ **Scheduling:** The next scheduled audit date is stored in the master rule file Section 9 (Process Configuration). The AI checks this date at the start of every session. If today is on or after the scheduled date, the AI prompts the engineer before any other work begins:
8
+
9
+ > "A dependency and security audit is scheduled for today. Would you like to run it now, or set a new date to defer it?"
10
+
11
+ The engineer may run the audit immediately or defer it to a specific date. Either way, the scheduled date is updated before the session continues.
12
+
13
+ **Important limitation:** The AI analyses manifests using training knowledge and cannot browse live vulnerability databases. For accurate, current CVE data the engineer must run the appropriate ecosystem security tool and share the output — this is Step 3 of the skill. The AI's role is to interpret, classify, and convert findings into backlog items — not to replace purpose-built scanning tools.
14
+
15
+ ---
16
+
17
+ ## Step 1 — Confirm Scope
18
+
19
+ Ask the engineer:
20
+
21
+ > "Should I audit all dependency manifests in the project, or focus on a specific subset? (e.g. backend only, a specific service)"
22
+
23
+ Read the `Next dependency audit` and `Last dependency audit` dates from the master rule file Section 9. Confirm:
24
+
25
+ > "Last audit: [date or 'none recorded']. I'll now read the dependency manifests and prepare for the scan."
26
+
27
+ Do not ask further questions — proceed directly to Step 2.
28
+
29
+ ---
30
+
31
+ ## Step 2 — Read Dependency Manifests
32
+
33
+ Locate and read all dependency manifest files in the repository. Common locations by ecosystem:
34
+
35
+ | Ecosystem | Files to read |
36
+ |---|---|
37
+ | Node.js | `package.json`, `package-lock.json` or `yarn.lock` |
38
+ | Python | `requirements.txt`, `requirements-dev.txt`, `pyproject.toml`, `Pipfile.lock` |
39
+ | Ruby | `Gemfile`, `Gemfile.lock` |
40
+ | Go | `go.mod`, `go.sum` |
41
+ | Java / Kotlin | `pom.xml`, `build.gradle`, `build.gradle.kts` |
42
+ | .NET | `*.csproj`, `packages.lock.json` |
43
+ | Rust | `Cargo.toml`, `Cargo.lock` |
44
+
45
+ Read every manifest found within the agreed scope. Extract:
46
+ - Package name
47
+ - Currently pinned version
48
+ - Whether it is a production dependency or a development/test-only dependency
49
+
50
+ Produce an internal inventory list (do not present it to the engineer yet — it is input for Steps 3 and 4).
51
+
52
+ ---
53
+
54
+ ## Step 3 — Request the Tool-Assisted Scan
55
+
56
+ Ask the engineer to run their ecosystem's security scanning tool and share the output. Present the correct command for the detected ecosystem(s):
57
+
58
+ > "To get current CVE data, please run the security scanner for your stack and paste the output here. I'll classify the findings and create backlog items from them.
59
+ >
60
+ > Recommended commands for your stack:
61
+ > - **Node.js:** `npm audit` or `yarn audit`
62
+ > - **Python:** `pip-audit` or `safety check`
63
+ > - **Ruby:** `bundler-audit check --update`
64
+ > - **Go:** `govulncheck ./...`
65
+ > - **Java:** `mvn dependency-check:check` or `gradle dependencyCheckAnalyze`
66
+ > - **.NET:** `dotnet list package --vulnerable`
67
+ > - **Rust:** `cargo audit`
68
+ >
69
+ > If you use a third-party scanner (Snyk, Dependabot, OWASP Dependency-Check), share that output instead. If no scanner is available right now, type 'skip' to proceed with AI-only analysis."
70
+
71
+ Wait for the engineer to paste the scanner output or type 'skip'. Do not proceed to Step 4 until the engineer responds.
72
+
73
+ ---
74
+
75
+ ## Step 4 — AI Analysis
76
+
77
+ Using training knowledge, analyse the dependency inventory from Step 2 for the following — independently of what the security scanner found:
78
+
79
+ **Major version drift:** For each dependency, assess whether the pinned version is more than one major version behind the commonly known current stable release (as of training knowledge). Flag packages that are multiple major versions behind.
80
+
81
+ **End-of-life and deprecated packages:**
82
+ - Runtimes past their official EOL date (e.g. Node.js LTS versions, Python versions)
83
+ - Packages with known deprecation notices (e.g. `request` for Node.js, `mock` for Python pre-3.x)
84
+ - Packages superseded by a successor with a different name (note the recommended replacement)
85
+
86
+ **Known vulnerability patterns from training knowledge:**
87
+ - Flag any dependency-version combination known to have had a significant CVE or security incident, even if the scanner did not flag it. Examples: very old versions of `lodash`, `log4j`, `jackson-databind`, `struts`, `openssl`. Note that this knowledge has a cutoff date and is not a substitute for live scanning.
88
+
89
+ **Development dependency risk:**
90
+ - Flag any package that is listed as a dev dependency but is also resolvable from production code (a common misconfiguration that exposes dev tools in production builds).
91
+
92
+ ---
93
+
94
+ ## Step 5 — Classify and Rank All Findings
95
+
96
+ Combine findings from the tool-assisted scan (Step 3) and AI analysis (Step 4). Deduplicate — if the scanner and AI both flagged the same package, merge into one entry.
97
+
98
+ Classify each finding by severity:
99
+
100
+ | Severity | Criteria |
101
+ |---|---|
102
+ | **Critical** | Known CVE with a CVSS score ≥ 9.0, or active exploit known; or production dependency that is completely unmaintained and has no viable alternative |
103
+ | **High** | Known CVE with CVSS 7.0–8.9; or runtime/framework at EOL with no upgrade path confirmed |
104
+ | **Medium** | Major version drift ≥ 2 versions behind; deprecated package with a known replacement; dev dependency exposed in production build |
105
+ | **Low** | Major version drift of 1 version; minor version significantly behind latest; advisory with no confirmed exploit |
106
+
107
+ Produce the findings table:
108
+
109
+ ```
110
+ Dependency Audit Findings — YYYY-MM-DD
111
+
112
+ | # | Package | Current version | Issue | Severity | Source | Recommended action |
113
+ |---|---|---|---|---|---|---|
114
+ | 1 | [name] | [version] | [description] | Critical / High / Medium / Low | Scanner / AI | [upgrade to X / replace with Y / remove / investigate] |
115
+ ```
116
+
117
+ Sort by severity (Critical first). Within each severity level, sort production dependencies before dev dependencies.
118
+
119
+ ---
120
+
121
+ ## Step 6 — Present and Confirm Findings
122
+
123
+ Present the ranked findings table to the engineer. Then ask:
124
+
125
+ > "Which of these findings should I convert to Remediation Bolts in the backlog? You can say 'all Critical and High', list specific numbers, or say 'none' to record the findings without creating backlog items."
126
+
127
+ Wait for the engineer's response before creating any backlog items.
128
+
129
+ ---
130
+
131
+ ## Step 7 — Create Remediation Bolts
132
+
133
+ For each finding the engineer approved, create an intent and associated unit in the backlog using the Remediation Bolt classification from Phase M1.4.
134
+
135
+ For each item:
136
+
137
+ 1. Create a unit file at `process-onboarding-agent/ops/build/units/YYYY-MM-DD-<unix_timestamp>-dep-[package-slug].md` with:
138
+ - **Status:** Open
139
+ - **Context:** the dependency finding in plain language
140
+ - **Acceptance Criteria:**
141
+ - `Given the production build runs, when [package] is loaded, then it is version [target version] or later.`
142
+ - `Given the CI pipeline runs, when the security scan executes, then no [severity] or higher vulnerabilities are reported for [package].`
143
+ - **Priority:** Critical finding → High; High finding → High; Medium/Low → Medium or Low
144
+
145
+ 2. Add the unit to the Open section of `process-onboarding-agent/ops/build/backlog.md` using a reference-style link.
146
+
147
+ After creating all units, summarise:
148
+
149
+ ```
150
+ Remediation units created: [N]
151
+ Critical: [N] units
152
+ High: [N] units
153
+ Medium: [N] units
154
+ Low: [N] units
155
+
156
+ Added to backlog: [list unit names]
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Step 8 — Schedule the Next Audit and Update Process Configuration
162
+
163
+ Ask the engineer:
164
+
165
+ > "When would you like to schedule the next dependency audit? The recommended interval is 30 days. You can give a specific date or say 'in [N] weeks/months'."
166
+
167
+ Convert the answer to an absolute date (YYYY-MM-DD). If the engineer says "default" or does not specify, set the next date to 30 days from today.
168
+
169
+ Update the master rule file Section 9 (Process Configuration) — specifically the `Last dependency audit` and `Next dependency audit` rows. If these rows do not yet exist in the table, add them.
170
+
171
+ ```markdown
172
+ | **Last dependency audit** | YYYY-MM-DD | Date this audit was completed |
173
+ | **Next dependency audit** | YYYY-MM-DD | AI prompts at session start on or after this date |
174
+ ```
175
+
176
+ Confirm completion:
177
+
178
+ ```
179
+ Dependency audit complete.
180
+
181
+ Findings: [N] total ([N] Critical, [N] High, [N] Medium, [N] Low)
182
+ Backlog items: [N] Remediation units added
183
+ Findings skipped: [N] (engineer chose not to create backlog items)
184
+
185
+ Next audit scheduled: YYYY-MM-DD
186
+ Process Configuration updated in master rule file.
187
+ ```
@@ -0,0 +1,230 @@
1
+ # Skill: Design Session (Phase 0 of Mob Elaboration)
2
+
3
+ **Purpose:** Establish an agreed design foundation — API contracts, data model, and architectural pattern decisions — at the opening of a mob elaboration session before any units are proposed. The design output becomes binding constraints that govern every unit and AC produced in the session.
4
+
5
+ **Trigger:** Runs automatically at the start of every mob elaboration session, before the first unit is proposed. It is not a separate ceremony — it is the opening phase of elaboration. The `mob-elab-prompts.md` skill calls this phase explicitly.
6
+
7
+ The phase may be brief or extensive depending on the intent's complexity. For a simple, well-understood intent with no new interfaces or data entities, it may conclude in two or three questions. For an intent introducing new API surfaces or data structures, it will take longer. The length is determined by the scope questions in Step 2 — not by a fixed number of turns.
8
+
9
+ ---
10
+
11
+ ## Step 1 — Read and Anchor the Intent
12
+
13
+ Read the intent file fully before saying anything. Then open the session by reflecting the intent back to the engineer in plain language:
14
+
15
+ > "I've read the intent for [intent name]. As I understand it, we're building [one-sentence summary of goal]. Before we break this into units, I want to establish the design foundation — the interfaces, data shapes, and patterns we'll be building against. This becomes the baseline for every AC we write.
16
+ >
17
+ > If the intent is more complex than it appears, or if you want to adjust the goal before we design, now is the time."
18
+
19
+ Wait for the engineer to confirm or correct the understanding. Do not proceed until the intent goal is agreed.
20
+
21
+ ---
22
+
23
+ ## Step 2 — Scope the Design
24
+
25
+ Ask the engineer three questions to determine which design areas are relevant. Ask all three together — this is the one exception to the one-question-per-turn rule, because the answers are interdependent:
26
+
27
+ > "Before we design, I need to scope the work:
28
+ > 1. Does this feature expose or consume API endpoints or external interfaces?
29
+ > 2. Does it introduce new data entities or change the shape of existing ones?
30
+ > 3. Does it require an architectural pattern not already established in this codebase?"
31
+
32
+ Record the answers. Use this to decide which steps to run:
33
+
34
+ | Answer | Steps to include |
35
+ |---|---|
36
+ | API: yes or unsure | Step 3 |
37
+ | Data model: yes or unsure | Step 4 |
38
+ | Architectural pattern: yes or unsure | Step 5 |
39
+
40
+ Skip any step answered definitively "no". For any "unsure", include the step and mark the relevant section as provisional in the design artifact.
41
+
42
+ If all three are "no", confirm with the engineer:
43
+
44
+ > "This intent doesn't appear to introduce new interfaces, data entities, or architectural patterns — the design foundation is inherited from existing conventions. Shall I move straight to unit decomposition?"
45
+
46
+ If confirmed, skip to Step 6 (no design artifact is needed).
47
+
48
+ ---
49
+
50
+ ## Step 3 — API Contract
51
+
52
+ *Run only if Step 2 scoped in API endpoints or external interfaces.*
53
+
54
+ Work through each interface one at a time. **Never work on more than one endpoint per turn.**
55
+
56
+ For each endpoint, ask the following in sequence — one question per turn:
57
+
58
+ 1. > "Describe this endpoint in one sentence — what triggers it and what does the caller get back?"
59
+
60
+ 2. > "What is the method and path? (or the equivalent if this is not a REST interface)"
61
+
62
+ 3. > "What does the request contain? List the field names and types. Mark any that are optional."
63
+
64
+ 4. > "What does a successful response look like? List the fields and types."
65
+
66
+ 5. > "What error states must the caller handle?"
67
+
68
+ 6. > "Who can call this? What authentication or authorization does it require?"
69
+
70
+ After each endpoint, ask:
71
+
72
+ > "Is there another endpoint to design, or is the contract complete?"
73
+
74
+ **Domain term check:** Read `process-onboarding-agent/guidelines/domain-glossary.md` if it exists. If any field name is a synonym or informal variant of a glossary term, flag it before moving on:
75
+
76
+ > "The field [name] looks like a synonym for [glossary term]. Should I use [glossary term] to stay consistent with the domain language?"
77
+
78
+ ---
79
+
80
+ ## Step 4 — Data Model
81
+
82
+ *Run only if Step 2 scoped in new or changed data entities.*
83
+
84
+ Work through each entity one at a time. **Never work on more than one entity per turn.**
85
+
86
+ For each entity, ask the following in sequence — one question per turn:
87
+
88
+ 1. > "Name this entity and describe what it represents in one sentence."
89
+
90
+ 2. > "What are its fields? List each field's name, type, and whether it is required or optional."
91
+
92
+ 3. > "How does it relate to existing entities?"
93
+
94
+ 4. > "Are there any uniqueness constraints, indexes, or a soft-delete pattern?"
95
+
96
+ 5. > "Is any field derived or computed rather than stored? If so, which ones and how?"
97
+
98
+ After each entity, ask:
99
+
100
+ > "Is there another entity to design, or is the data model complete?"
101
+
102
+ **Conflict check:** Before closing the data model, read `process-onboarding-agent/rules/architecture.md`. If any proposed entity name, field name, or relationship contradicts an existing ADR, surface the conflict immediately:
103
+
104
+ > "The proposed [entity or field] conflicts with ADR-[N] which states [decision]. How should we resolve this before we continue?"
105
+
106
+ Do not proceed to Step 5 until all conflicts are resolved.
107
+
108
+ ---
109
+
110
+ ## Step 5 — Architectural Patterns
111
+
112
+ *Run only if Step 2 scoped in new architectural patterns.*
113
+
114
+ For each new pattern, ask the following in sequence — one question per turn:
115
+
116
+ 1. > "Describe the pattern in one sentence — what problem does it solve and where does it apply?"
117
+
118
+ 2. > "Is there an existing pattern in this codebase that is similar? If yes, why is it insufficient for this case?"
119
+
120
+ 3. > "What are the trade-offs of this approach versus the most obvious alternative?"
121
+
122
+ 4. > "Should this become an ADR?"
123
+
124
+ If the engineer confirms an ADR, draft it immediately and present it for confirmation before writing:
125
+
126
+ ```markdown
127
+ ### ADR-[next number] — [Decision title]
128
+ **Decision:** [what was decided]
129
+ **Why:** [the reasoning]
130
+ **Trade-off:** [what you gave up]
131
+ ```
132
+
133
+ Write confirmed ADRs to `process-onboarding-agent/rules/architecture.md` before moving to the next pattern.
134
+
135
+ After each pattern, ask:
136
+
137
+ > "Is there another pattern to document, or is this step complete?"
138
+
139
+ ---
140
+
141
+ ## Step 6 — Design Sign-off and Artifact
142
+
143
+ Present a design summary before writing any files:
144
+
145
+ ```
146
+ Design Foundation — [Intent name]
147
+
148
+ API Contract: [N endpoint(s): list METHOD /path]
149
+ Data Model: [N entity/entities: list names]
150
+ Patterns: [N pattern(s): list names and ADR numbers]
151
+ Provisional: [anything marked unsure, or "none"]
152
+
153
+ Shall I record this as the design artifact and move to unit decomposition?
154
+ ```
155
+
156
+ If the engineer confirms, create the design artifact at `process-onboarding-agent/ops/inception/designs/YYYY-MM-DD-<unix_timestamp>-[intent-slug]-design.md` and link it from the intent file under a `Design:` field in the intent header.
157
+
158
+ The artifact uses this structure:
159
+
160
+ ```markdown
161
+ # Design: [Intent name]
162
+
163
+ **Status:** Agreed
164
+ **Date:** YYYY-MM-DD
165
+ **Intent:** [relative link to intent file]
166
+ **Elaboration:** _(to be linked after elaboration runs)_
167
+
168
+ ---
169
+
170
+ ## API Contract
171
+
172
+ ### [Endpoint name] — [METHOD /path]
173
+
174
+ **Auth:** [requirement]
175
+
176
+ **Request:**
177
+ | Field | Type | Required | Notes |
178
+ |---|---|---|---|
179
+
180
+ **Response (success):**
181
+ | Field | Type | Notes |
182
+ |---|---|---|
183
+
184
+ **Error states:**
185
+ | Status | Condition |
186
+ |---|---|
187
+
188
+ ---
189
+
190
+ ## Data Model
191
+
192
+ ### [Entity name]
193
+
194
+ [one-sentence description]
195
+
196
+ **Fields:**
197
+ | Field | Type | Required | Notes |
198
+ |---|---|---|---|
199
+
200
+ **Relationships:** [description]
201
+ **Constraints:** [or "none"]
202
+
203
+ ---
204
+
205
+ ## Architectural Patterns
206
+
207
+ ### [Pattern name]
208
+
209
+ [description and trade-off]
210
+ **ADR:** [ADR-N, or "no ADR created"]
211
+
212
+ ---
213
+
214
+ ## Elaboration Constraints
215
+
216
+ The following decisions are binding during unit decomposition.
217
+ ACs must not contradict them. Surface any conflict before writing a unit — do not work around a constraint silently.
218
+
219
+ - [one binding decision per bullet]
220
+ ```
221
+
222
+ ---
223
+
224
+ ## Step 7 — Handoff to Unit Decomposition
225
+
226
+ Once the design artifact is written (or confirmed as not needed), state clearly:
227
+
228
+ > "Design foundation is set. I'll now propose units — one at a time — starting with the first logical slice of [intent name]."
229
+
230
+ Continue directly into the mob elaboration turn structure from `mob-elab-prompts.md`. Do not pause for engineer acknowledgment before proposing the first unit.