dxcomplete 0.2.0 → 0.2.2

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 (47) hide show
  1. package/.env.example +0 -7
  2. package/README.md +18 -54
  3. package/dist/cli.js +0 -22
  4. package/dist/validate.js +10 -26
  5. package/docs/model.md +3 -3
  6. package/docs/taxonomy.md +1 -1
  7. package/package.json +23 -23
  8. package/templates/process/README.md +1 -1
  9. package/dist/http/service.d.ts +0 -7
  10. package/dist/http/service.js +0 -725
  11. package/dist/mcp/docs.d.ts +0 -114
  12. package/dist/mcp/docs.js +0 -626
  13. package/dist/mcp/server.d.ts +0 -20
  14. package/dist/mcp/server.js +0 -3059
  15. package/dist/runtime/auth.d.ts +0 -162
  16. package/dist/runtime/auth.js +0 -394
  17. package/dist/runtime/check.d.ts +0 -7
  18. package/dist/runtime/check.js +0 -16
  19. package/dist/runtime/config.d.ts +0 -17
  20. package/dist/runtime/config.js +0 -93
  21. package/dist/runtime/mongo.d.ts +0 -9
  22. package/dist/runtime/mongo.js +0 -56
  23. package/dist/runtime/records.d.ts +0 -427
  24. package/dist/runtime/records.js +0 -2092
  25. package/scripts/check-env-surface.mjs +0 -136
  26. package/scripts/check-public-copy.mjs +0 -263
  27. package/scripts/check-service-boundary.mjs +0 -63
  28. package/scripts/dogfood-work-order.mjs +0 -506
  29. package/scripts/smoke-mcp-http.mjs +0 -4026
  30. package/src/cli.ts +0 -268
  31. package/src/http/server.ts +0 -314
  32. package/src/http/service.ts +0 -934
  33. package/src/init.ts +0 -262
  34. package/src/install-manifest.ts +0 -144
  35. package/src/mcp/docs.ts +0 -777
  36. package/src/mcp/server.ts +0 -4580
  37. package/src/package-root.ts +0 -31
  38. package/src/runtime/actor.ts +0 -61
  39. package/src/runtime/auth.ts +0 -673
  40. package/src/runtime/check.ts +0 -18
  41. package/src/runtime/config.ts +0 -128
  42. package/src/runtime/mongo.ts +0 -89
  43. package/src/runtime/records.ts +0 -3205
  44. package/src/runtime/workspace.ts +0 -155
  45. package/src/upgrade.ts +0 -356
  46. package/src/validate.ts +0 -141
  47. package/src/version.ts +0 -16
package/src/mcp/docs.ts DELETED
@@ -1,777 +0,0 @@
1
- export const DOC_SOURCE_BASE_URL = "https://dxcomplete.directeddomains.com";
2
-
3
- export const DOC_PAGE_IDS = ["start_here", "outcomes", "flow", "records", "roles", "operating_guide", "glossary"] as const;
4
-
5
- export type DocPageId = (typeof DOC_PAGE_IDS)[number];
6
-
7
- type BaseDocPage = {
8
- page: DocPageId;
9
- title: string;
10
- sourceUrl: string;
11
- summary: string;
12
- };
13
-
14
- type StartHereDoc = BaseDocPage & {
15
- page: "start_here";
16
- phases: Array<{
17
- number: string;
18
- name: string;
19
- description: string;
20
- }>;
21
- };
22
-
23
- type OutcomesDoc = BaseDocPage & {
24
- page: "outcomes";
25
- outcomes: Array<{
26
- name: string;
27
- description: string;
28
- }>;
29
- transformationValue: Array<{
30
- state: string;
31
- focus: string;
32
- description: string;
33
- }>;
34
- goodLooksLike: Array<{
35
- statement: string;
36
- description: string;
37
- }>;
38
- };
39
-
40
- type FlowDoc = BaseDocPage & {
41
- page: "flow";
42
- phases: Array<{
43
- number: string;
44
- name: string;
45
- description: string;
46
- sourceUrl: string;
47
- }>;
48
- };
49
-
50
- type RecordsDoc = BaseDocPage & {
51
- page: "records";
52
- routingGuidance: {
53
- principle: string;
54
- sharpTest: string;
55
- axes: Array<{
56
- name: string;
57
- test: string;
58
- }>;
59
- routingOrder: Array<{
60
- signal: string;
61
- record: string;
62
- }>;
63
- edgeCases: string[];
64
- promotion: string;
65
- futureContainers: Array<{
66
- name: string;
67
- status: string;
68
- use: string;
69
- }>;
70
- };
71
- groups: Array<{
72
- group: string;
73
- purpose: string;
74
- records: Array<{
75
- name: string;
76
- summary: string;
77
- }>;
78
- }>;
79
- concepts: Array<{
80
- name: string;
81
- summary: string;
82
- }>;
83
- };
84
-
85
- type RolesDoc = BaseDocPage & {
86
- page: "roles";
87
- roles: Array<{
88
- name: string;
89
- responsibility: string;
90
- }>;
91
- };
92
-
93
- type OperatingGuideDoc = BaseDocPage & {
94
- page: "operating_guide";
95
- roles: Array<{
96
- name: string;
97
- use: string;
98
- defaultRecords: string[];
99
- avoid: string[];
100
- }>;
101
- recordRouting: Array<{
102
- situation: string;
103
- use: string;
104
- why: string;
105
- }>;
106
- itsmBoundaries: string[];
107
- freshAgentGuidance: string[];
108
- };
109
-
110
- export type GlossaryTerm = {
111
- term: string;
112
- category: string;
113
- definition: string;
114
- };
115
-
116
- type GlossaryDoc = BaseDocPage & {
117
- page: "glossary";
118
- terms: GlossaryTerm[];
119
- };
120
-
121
- export type DocPage =
122
- | StartHereDoc
123
- | OutcomesDoc
124
- | FlowDoc
125
- | RecordsDoc
126
- | RolesDoc
127
- | OperatingGuideDoc
128
- | GlossaryDoc;
129
-
130
- export const DOC_REFERENCE: Record<DocPageId, DocPage> = {
131
- start_here: {
132
- page: "start_here",
133
- title: "DX Complete",
134
- sourceUrl: `${DOC_SOURCE_BASE_URL}/index.html`,
135
- summary:
136
- "A practical way to decide what is worth doing, deliver it with control, run it safely, and learn from the results.",
137
- phases: [
138
- {
139
- number: "01",
140
- name: "Orient",
141
- description: "Capture the desired outcome, restate expectations, and confirm how success will be recognized."
142
- },
143
- {
144
- number: "02",
145
- name: "Elicit",
146
- description: "Turn expectations into requirements, dependencies, unknowns, and risk."
147
- },
148
- {
149
- number: "03",
150
- name: "Weigh",
151
- description: "Compare expected cost, expected value, risks, and confidence before recording a Commitment or Deferral."
152
- },
153
- {
154
- number: "04",
155
- name: "Build",
156
- description: "Turn committed requirements into working changes."
157
- },
158
- {
159
- number: "05",
160
- name: "Go Live",
161
- description: "Prepare the change, confirm readiness, and put it into use."
162
- },
163
- {
164
- number: "06",
165
- name: "Operate",
166
- description: "Run the service, help users, and respond when something goes wrong."
167
- },
168
- {
169
- number: "07",
170
- name: "Measure",
171
- description: "Compare expected and actual cost or benefit when data is available."
172
- }
173
- ]
174
- },
175
- outcomes: {
176
- page: "outcomes",
177
- title: "Why DX Complete exists",
178
- sourceUrl: `${DOC_SOURCE_BASE_URL}/outcomes.html`,
179
- summary:
180
- "DX Complete gives teams a shared way to decide what is worth doing, control how it changes, run it safely, and learn from the result.",
181
- outcomes: [
182
- {
183
- name: "Consistent operation",
184
- description: "Teams use the same phases, records, roles, and handoffs to manage work and service signals."
185
- },
186
- {
187
- name: "Clearer decisions",
188
- description: "Goals, requirements, estimates, risks, and decisions stay connected."
189
- },
190
- {
191
- name: "Budget clarity",
192
- description: "Current cost is attempted, future cost is estimated, and actual cost is captured when available."
193
- },
194
- {
195
- name: "Controlled change",
196
- description: "Expectations, requirements, tasks, checks, changes, releases, and deployments can be followed."
197
- },
198
- {
199
- name: "Review and compliance support",
200
- description: "Important decisions, checks, approvals, releases, and measurements have a place to be recorded."
201
- },
202
- {
203
- name: "Measured improvement",
204
- description: "Measured results can improve future assumptions about cost, value, risk, and effort."
205
- }
206
- ],
207
- transformationValue: [
208
- {
209
- state: "Before",
210
- focus: "Current cost and friction",
211
- description: "What the existing process, service, support load, risk, delay, or manual effort costs today."
212
- },
213
- {
214
- state: "Planned",
215
- focus: "Expected cost and value",
216
- description: "What the proposed change is expected to cost and what improvement it is expected to create."
217
- },
218
- {
219
- state: "After",
220
- focus: "Measured improvement",
221
- description: "What changed after launch, including actual cost and benefit when those signals are available."
222
- }
223
- ],
224
- goodLooksLike: [
225
- {
226
- statement: "People know why work is happening.",
227
- description: "The goal, problem, and requirement set are clear enough to discuss and decide."
228
- },
229
- {
230
- statement: "Cost is visible enough to make a responsible choice.",
231
- description: "Incomplete data is allowed, but unknowns and assumptions are visible."
232
- },
233
- {
234
- statement: "Change is traceable from idea to operation.",
235
- description:
236
- "Records show how a request became requirements, tasks, checks, change history, release, deployment, and support history."
237
- },
238
- {
239
- statement: "Service learning feeds future work.",
240
- description: "User support signals, incidents, actual cost, and measured value can improve the next decision."
241
- }
242
- ]
243
- },
244
- flow: {
245
- page: "flow",
246
- title: "Flow",
247
- sourceUrl: `${DOC_SOURCE_BASE_URL}/flow.html`,
248
- summary:
249
- "Flow explains each phase in detail: the main steps, the roles involved, the important choices, the records used, and the handoff to the next phase.",
250
- phases: [
251
- {
252
- number: "01",
253
- name: "Orient",
254
- description: "Capture the desired outcome, restate expectations, and confirm how success will be recognized.",
255
- sourceUrl: `${DOC_SOURCE_BASE_URL}/phase-orient.html`
256
- },
257
- {
258
- number: "02",
259
- name: "Elicit",
260
- description: "Turn expectations into requirements, dependencies, unknowns, and risk.",
261
- sourceUrl: `${DOC_SOURCE_BASE_URL}/phase-elicit.html`
262
- },
263
- {
264
- number: "03",
265
- name: "Weigh",
266
- description: "Compare expected cost, expected value, risks, and confidence before recording a Commitment or Deferral.",
267
- sourceUrl: `${DOC_SOURCE_BASE_URL}/phase-weigh.html`
268
- },
269
- {
270
- number: "04",
271
- name: "Build",
272
- description: "Turn committed requirements into working changes.",
273
- sourceUrl: `${DOC_SOURCE_BASE_URL}/phase-build.html`
274
- },
275
- {
276
- number: "05",
277
- name: "Go Live",
278
- description: "Prepare the change, confirm readiness, and put it into use.",
279
- sourceUrl: `${DOC_SOURCE_BASE_URL}/phase-go-live.html`
280
- },
281
- {
282
- number: "06",
283
- name: "Operate",
284
- description: "Run the service, help users, and respond when something goes wrong.",
285
- sourceUrl: `${DOC_SOURCE_BASE_URL}/phase-operate.html`
286
- },
287
- {
288
- number: "07",
289
- name: "Measure",
290
- description: "Compare expected and actual cost or benefit when data is available.",
291
- sourceUrl: `${DOC_SOURCE_BASE_URL}/phase-measure.html`
292
- }
293
- ]
294
- },
295
- records: {
296
- page: "records",
297
- title: "Records",
298
- sourceUrl: `${DOC_SOURCE_BASE_URL}/objects.html`,
299
- summary:
300
- "Records are information DX Complete keeps so decisions, work, service issues, and measurements can be followed over time.",
301
- routingGuidance: {
302
- principle:
303
- "Use the dedicated record first. Journal is the fallback for relevant context only when no dedicated record fits.",
304
- sharpTest:
305
- "Will anything reference or depend on this? If yes, prefer a dedicated record that can carry the relationship.",
306
- axes: [
307
- {
308
- name: "Kind of information",
309
- test: "Claims, goals, and success criteria go to Statement, Expectation, or Requirement; choices go to Decision; actions go to Task; events or controlled history go to matching records such as Change, Incident, Problem, Support Request, Maintenance Schedule, Value Realization, or Risk; otherwise relevant context may go to Journal."
310
- },
311
- {
312
- name: "Process-bound or process-free",
313
- test: "Statement, Expectation, Requirement, Decision, Task, Change, Incident, Problem, Support Request, Maintenance Schedule, Value Realization, and Risk can advance work or carry dependencies. Journal is parallel context and does not advance the process by itself."
314
- },
315
- {
316
- name: "Attachment",
317
- test: "If another record will satisfy it, derive from it, be informed by it, or depend on it, use a dedicated record. If it is only useful background, Journal may fit."
318
- }
319
- ],
320
- routingOrder: [
321
- { signal: "Desired truth, success criteria, or buildable commitment", record: "Statement, Expectation, or Requirement" },
322
- { signal: "Choice between alternatives", record: "Decision" },
323
- { signal: "Action someone needs to do", record: "Task" },
324
- { signal: "Run-side alteration to the service", record: "Change" },
325
- { signal: "Specific service-impacting occurrence", record: "Incident" },
326
- { signal: "Underlying or recurring cause behind incidents", record: "Problem" },
327
- { signal: "User-facing question, request, or issue needing shared follow-up", record: "Support Request" },
328
- { signal: "Uncertainty or exposure", record: "Risk" },
329
- { signal: "Operational infrastructure state", record: "Operational Registry through Environment and Component records" },
330
- { signal: "Recurring operational hygiene", record: "Maintenance Schedule" },
331
- { signal: "Measured before/after value", record: "Value Realization" },
332
- { signal: "Private question, report, request, correction, or follow-up with DX Complete", record: "DX Complete Ticket" },
333
- { signal: "Relevant context with no better home", record: "Journal" }
334
- ],
335
- edgeCases: [
336
- "A passing mention of a choice can stay in Journal; the choice itself, with rationale, should be a Decision.",
337
- "A reminder may look like context, but if someone needs to act on it, it should be a Task.",
338
- "A note that repeatedly informs decisions or work should be promoted from Journal to the appropriate dedicated record."
339
- ],
340
- promotion:
341
- "Journal content that becomes load-bearing should be promoted to Statement, Expectation, Requirement, Decision, Task, Change, Incident, Problem, Support Request, Maintenance Schedule, Value Realization, Risk, or another dedicated record, then linked back where useful.",
342
- futureContainers: [
343
- {
344
- name: "Operational Registry",
345
- status: "current",
346
- use: "Environment and Component records keep operational inventory out of Journal."
347
- }
348
- ]
349
- },
350
- groups: [
351
- {
352
- group: "Scope",
353
- purpose: "Set the need",
354
- records: [
355
- { name: "Workspace", summary: "The container for one service and the work connected to it." },
356
- { name: "Statement", summary: "A person's own words before they are interpreted or translated, kept as a traceable record." },
357
- {
358
- name: "Journal",
359
- summary: "Shared workspace notes for relevant background, preferences, observations, and context that has no dedicated record home."
360
- },
361
- {
362
- name: "Environment",
363
- summary: "A named operating context such as local, staging, or production."
364
- },
365
- {
366
- name: "Component",
367
- summary: "One environment-specific operational item, with kind, location details, identifiers, secret pointers, notes, and version history."
368
- },
369
- {
370
- name: "Maintenance Schedule",
371
- summary: "Recurring operational hygiene, with cadence, start date, rationale, version history, and due state derived from linked completed Changes or Tasks."
372
- },
373
- {
374
- name: "Expectation",
375
- summary: "The result a person or group expects, including how success will be recognized. Prior versions and review notes can be kept without blocking progress."
376
- },
377
- {
378
- name: "Requirement",
379
- summary: "A commitment to make something true in a buildable and checkable way. Prior versions and review notes can be kept without blocking progress."
380
- }
381
- ]
382
- },
383
- {
384
- group: "Weigh",
385
- purpose: "Decide whether to commit now or defer",
386
- records: [
387
- {
388
- name: "Estimate",
389
- summary: "An Engineer cost estimate for the scope being weighed, with itemized costs and roll-ups for one-time and recurring amounts."
390
- },
391
- {
392
- name: "Benefits",
393
- summary: "An Owner-authored view of expected benefits. Benefits may be quantified or qualitative."
394
- },
395
- {
396
- name: "Value Realization",
397
- summary: "Measured before/after value tied to expectations, requirements, or commitments, with derived comparisons for each metric."
398
- },
399
- { name: "Commitment", summary: "An Owner record that commits requirements or expectations into Build, with any reservations visible." },
400
- { name: "Deferral", summary: "An Owner record for not committing yet, with conditions that make a future Commitment possible." },
401
- { name: "Risk", summary: "Something uncertain that could affect value, delivery, service, or compliance." }
402
- ]
403
- },
404
- {
405
- group: "Work",
406
- purpose: "Act on the work",
407
- records: [
408
- {
409
- name: "Task",
410
- summary: "Concrete work with an entry history; current status comes from the latest status-change entry."
411
- },
412
- {
413
- name: "Change",
414
- summary: "A record for a specific alteration to the running service, with change type, plan sections, risk and impact including downstream impact where known, append-only event history, and optional Git commit references on result or recovery events."
415
- },
416
- {
417
- name: "Incident",
418
- summary: "A record for a specific service-impacting or potentially service-impacting occurrence, with status and severity derived from entries."
419
- },
420
- {
421
- name: "Problem",
422
- summary: "A record for an underlying or recurring cause evidenced by one or more Incidents, with root cause and status derived from entries."
423
- },
424
- {
425
- name: "Support Request",
426
- summary: "A shared support ledger for a reported user experience, question, request, or issue, with current status derived from entries."
427
- }
428
- ]
429
- },
430
- {
431
- group: "Throughout",
432
- purpose: "Decide and follow up",
433
- records: [
434
- {
435
- name: "Decision",
436
- summary: "A revisitable choice record with ordered entries and links to the records that informed it."
437
- },
438
- {
439
- name: "DX Complete Ticket",
440
- summary: "A private place to raise a question, report, request, correction, or follow-up with DX Complete."
441
- }
442
- ]
443
- }
444
- ],
445
- concepts: [
446
- {
447
- name: "Constraints, dependencies, and unknowns",
448
- summary: "Normally captured in requirements, risks, decisions, review notes, or task details."
449
- },
450
- {
451
- name: "Verification and validation",
452
- summary: "Checks and outcomes can be captured in task details, change history, decisions, or linked notes."
453
- },
454
- {
455
- name: "Release, deployment, controls, and evidence",
456
- summary: "Currently represented through Change events, risks, decisions, and supporting notes."
457
- },
458
- {
459
- name: "Support, incidents, problems, and feedback",
460
- summary:
461
- "Operational signals can be handled through tickets, incidents, problems, risks, tasks, changes, decisions, or new requirements. Use Incident for a specific occurrence and Problem for an underlying or recurring cause."
462
- },
463
- {
464
- name: "Measurement and estimate refinement",
465
- summary: "Actual cost or benefit observations can update estimates, benefits, risks, decisions, or future work."
466
- }
467
- ]
468
- },
469
- roles: {
470
- page: "roles",
471
- title: "Roles",
472
- sourceUrl: `${DOC_SOURCE_BASE_URL}/roles.html`,
473
- summary:
474
- "Roles separate responsibility so decisions, building, quality checks, support, and service operation are not confused.",
475
- roles: [
476
- { name: "Owner", responsibility: "Sets priorities, defines outcomes and requirements, commits budget and scope, validates outcomes, and accepts risk when needed." },
477
- { name: "Engineer", responsibility: "Turns committed requirements into tasks and working changes, either directly or by driving coding-capable tools." },
478
- { name: "Tester", responsibility: "Checks completed work against requirements and success criteria." },
479
- { name: "Operator", responsibility: "Releases, deploys, monitors, runs the service, and manages users, permissions, settings, provisioning, and run-side security." },
480
- { name: "Support Agent", responsibility: "Helps users, captures signals, and routes questions, feedback, and issues to the right follow-up." },
481
- {
482
- name: "End User",
483
- responsibility: "Uses the service and provides requests, feedback, corrections, and issue reports."
484
- }
485
- ]
486
- },
487
- operating_guide: {
488
- page: "operating_guide",
489
- title: "Operating Guide",
490
- sourceUrl: `${DOC_SOURCE_BASE_URL}/operating-guide.html`,
491
- summary:
492
- "How each role uses DX Complete in day-to-day work, including record routing and ITSM boundaries.",
493
- roles: [
494
- {
495
- name: "Owner",
496
- use:
497
- "Uses DX Complete to set direction, approve expectations when needed, weigh cost and benefit, record Commitment or Deferral, make Decisions, and formally accept risk when the project should own it.",
498
- defaultRecords: ["Statement", "Expectation", "Benefits", "Value Realization", "Commitment", "Deferral", "Decision", "Risk"],
499
- avoid: [
500
- "Do not turn every comment into a requirement.",
501
- "Do not use approval language for End User feedback.",
502
- "Do not hide reservations or low-confidence decisions."
503
- ]
504
- },
505
- {
506
- name: "Engineer and Codex assistance",
507
- use:
508
- "Uses Requirement to Task as the normal build path. Codex may assist the Engineer, but Codex is a coding-capable tool, not a role.",
509
- defaultRecords: ["Requirement", "Task", "Decision", "Risk", "Journal"],
510
- avoid: [
511
- "Do not create a Change just because implementation work is happening.",
512
- "Do not use Journal when a Task, Decision, Risk, or Requirement is the real record.",
513
- "Do not invent Owner intent or End User feedback."
514
- ]
515
- },
516
- {
517
- name: "Tester",
518
- use:
519
- "Uses DX Complete to keep verification tied to requirements and visible evidence. Verification can be captured through Task entries, review notes, Risk, Decision, or Journal depending on what is being learned.",
520
- defaultRecords: ["Task", "Requirement", "Risk", "Decision", "Journal"],
521
- avoid: [
522
- "Do not default to Change for testing observations.",
523
- "Do not treat a failed check as a new requirement unless the expected truth changed.",
524
- "Do not hide verification uncertainty in free text when it is a Risk."
525
- ]
526
- },
527
- {
528
- name: "Operator and administration",
529
- use:
530
- "Uses DX Complete to keep run-side state, service changes, incidents, problems, and operational inventory legible, including Environments, Components, rollout or rollback plans, user permissions, and operational security.",
531
- defaultRecords: ["Change", "Incident", "Problem", "Environment", "Component", "Maintenance Schedule", "Risk", "Decision"],
532
- avoid: [
533
- "Do not paste secret values into records.",
534
- "Do not use Change for ordinary build work before it alters the running service.",
535
- "Do not create Incident or Problem merely because work is happening; use them only for operational signal or service-history meaning."
536
- ]
537
- },
538
- {
539
- name: "Support Agent",
540
- use:
541
- "Uses DX Complete Ticket as the first stop for user questions, reports, requests, corrections, and follow-ups, then promotes shared follow-up only when needed.",
542
- defaultRecords: ["Support Request", "DX Complete Ticket", "Statement", "Task", "Incident", "Problem", "Risk", "Decision", "Change", "Journal"],
543
- avoid: [
544
- "Do not promote every ticket into shared process work.",
545
- "Do not use DX Complete Ticket for shared support follow-up when Support Request is the better record.",
546
- "Do not call a user signal an approval.",
547
- "Do not create ITSM-style records merely because a user reported something; promote only when the signal has operational or shared follow-up meaning."
548
- ]
549
- },
550
- {
551
- name: "End User",
552
- use:
553
- "Uses the service and provides input. Another role captures that input as a Statement, report, request, correction, feedback signal, or ticket when it needs to enter DX Complete.",
554
- defaultRecords: ["Statement", "DX Complete Ticket"],
555
- avoid: [
556
- "Do not treat the End User as a DX Complete operator.",
557
- "Do not treat End User feedback as authority approval.",
558
- "Do not expect the End User to choose process records."
559
- ]
560
- }
561
- ],
562
- recordRouting: [
563
- {
564
- situation: "Normal implementation work",
565
- use: "Task",
566
- why: "A Task is the default record for concrete work someone needs to do."
567
- },
568
- {
569
- situation: "Meaningful choice between alternatives",
570
- use: "Decision",
571
- why: "A Decision preserves what was chosen and which records informed it."
572
- },
573
- {
574
- situation: "Uncertainty, exposure, or possible harm",
575
- use: "Risk",
576
- why: "A Risk keeps the uncertainty visible without pretending it is resolved."
577
- },
578
- {
579
- situation: "Discrete alteration to the running service",
580
- use: "Change",
581
- why: "A Change is the current ITSM-style run-side control record."
582
- },
583
- {
584
- situation: "Specific service-impacting occurrence",
585
- use: "Incident",
586
- why: "An Incident keeps response history for one occurrence visible."
587
- },
588
- {
589
- situation: "Underlying or recurring cause behind one or more incidents",
590
- use: "Problem",
591
- why: "A Problem keeps investigation and root-cause history separate from the individual incidents it explains."
592
- },
593
- {
594
- situation: "User-facing support follow-up",
595
- use: "Support Request",
596
- why: "A Support Request keeps the shared support thread visible without turning every report into an Incident."
597
- },
598
- {
599
- situation: "Operational inventory",
600
- use: "Environment or Component",
601
- why: "The Operational Registry shows what exists and where it lives."
602
- },
603
- {
604
- situation: "Recurring operational hygiene",
605
- use: "Maintenance Schedule",
606
- why: "A Maintenance Schedule keeps cadence and due state visible while completed Changes or Tasks show what happened."
607
- },
608
- {
609
- situation: "Measured value after work or operation",
610
- use: "Value Realization",
611
- why: "Value Realization compares baseline and actual metrics without replacing Benefits or Estimates."
612
- },
613
- {
614
- situation: "Useful context with no better dedicated home",
615
- use: "Journal",
616
- why: "Journal is fallback context, not the default home for load-bearing records."
617
- },
618
- {
619
- situation: "Question, report, request, correction, or follow-up with DX Complete",
620
- use: "DX Complete Ticket",
621
- why: "A ticket is private to the submitting actor until someone promotes shared follow-up."
622
- }
623
- ],
624
- itsmBoundaries: [
625
- "Change is the current first-class run-side control record. Its risk and impact section should include downstream impact where known: what else may be affected and what depends on what is changing.",
626
- "Result and recovery events on a Change may include optional Git commit references for the specific execution attempt or rollback. They are recorded as references only; DX Complete does not validate Git commits or assume a Git host.",
627
- "Incident is the current first-class record for a specific service-impacting or potentially service-impacting occurrence.",
628
- "Problem is the current first-class record for an underlying or recurring cause evidenced by one or more incidents.",
629
- "Do not create ITSM-style records merely because work is happening; use them when the information is truly run-side control, operational signal, or service history."
630
- ],
631
- freshAgentGuidance: [
632
- "Start by identifying the role being helped and the record that best matches the information.",
633
- "For Engineer/Codex work, default to Requirement -> Task unless a Decision, Risk, Journal note, or Change is specifically warranted.",
634
- "For Operator work, use Change only for run-side alteration and Environment or Component for operational inventory.",
635
- "For Support Agent work, start with DX Complete Ticket before promoting into shared records.",
636
- "When unsure, ask whether another record will reference or depend on the information. If yes, use the dedicated record."
637
- ]
638
- },
639
- glossary: {
640
- page: "glossary",
641
- title: "Glossary",
642
- sourceUrl: `${DOC_SOURCE_BASE_URL}/glossary.html`,
643
- summary: "Common DX Complete terms, written in plain language.",
644
- terms: [
645
- { term: "Approval", category: "Risk and decisions", definition: "A separate authority confirming an expectation or decision, tracked when it reduces risk." },
646
- { term: "Benefit Item", category: "Cost and benefit", definition: "One item inside Benefits. It may have an amount or range, or it may be qualitative with no amount." },
647
- { term: "Benefits", category: "Cost and benefit", definition: "An Owner-authored benefit record used during Weigh, linked to the requirements or expectations it covers. Benefits may be quantified or qualitative." },
648
- { term: "Build", category: "Delivery", definition: "Turning committed requirements into tasks, working changes, and verification." },
649
- { term: "Cadence", category: "Run and support", definition: "How often recurring operational work is expected to happen, such as every month or every quarter." },
650
- { term: "Change", category: "Delivery", definition: "A service change record for a discrete alteration to the running service. It records the change type, plan, execution, rollback, notice, veto, decision, result, recovery history, and optional Git commit references without enforcing the operation." },
651
- { term: "Change Plan", category: "Delivery", definition: "The part of a Change record that explains what is changing, why, scope, timing, and notice." },
652
- { term: "Change Type", category: "Delivery", definition: "The classification of a Change as standard, normal, or emergency. It affects scrutiny and communication but does not enforce the operation." },
653
- { term: "Checkpoint", category: "Risk and decisions", definition: "A confirmation point that reduces risk. It can be approved, formally accepted as risk by the Owner, or proceeded past with open risk visible." },
654
- { term: "Codex", category: "Delivery", definition: "A coding-capable model that may assist the Engineer. Codex is not a role." },
655
- { term: "Commitment", category: "Business context", definition: "An Owner record that says preparation is sufficient to commit requirements or expectations into Build, with any reservations kept visible." },
656
- { term: "Complete Engineering", category: "Delivery", definition: "The delivery part of DX Complete: build, check, validate, and put the change into use." },
657
- { term: "Component", category: "Run and support", definition: "One operational item in one Environment, such as an app, database, queue, storage location, or external service. It records where it lives and which non-secret identifiers or secret locations matter." },
658
- { term: "Condition", category: "Business context", definition: "Something that must be addressed before a Deferral can resolve into a Commitment." },
659
- { term: "Constraints", category: "Business context", definition: "Limits that affect the work, such as time, access, policy, budget, or risk." },
660
- { term: "Control", category: "Risk and decisions", definition: "A rule, check, or approval used to reduce risk." },
661
- { term: "Decision", category: "Risk and decisions", definition: "A revisitable choice record. The current decision comes from the latest decision entry, while earlier arguments, notes, and decisions remain visible." },
662
- { term: "Decision Entry", category: "Risk and decisions", definition: "One ordered entry in a Decision, such as an argument, note, or decision. Later decision entries can supersede earlier ones without deleting them." },
663
- { term: "Decision Input", category: "Risk and decisions", definition: "A record that informed a decision. Outgoing links from a decision show what informed it; incoming links to a record show which decisions used it." },
664
- { term: "Deferral", category: "Business context", definition: "An Owner record for not committing yet, with explicit conditions that make the path to a future Commitment clear." },
665
- { term: "Dependencies", category: "Business context", definition: "People, systems, data, or decisions the work depends on." },
666
- { term: "Deployment", category: "Delivery", definition: "Putting a release or change into use." },
667
- { term: "DX Complete Ticket", category: "Business context", definition: "A private item used to raise a question, report, request, correction, or follow-up with DX Complete." },
668
- { term: "Elicit", category: "Business context", definition: "Turning expectations into requirements, dependencies, unknowns, and risk before estimating the work." },
669
- { term: "Emergency Change", category: "Delivery", definition: "A Change where normal notice or review is shortened because the situation is important and immediate. Missing rationale remains visible but does not block the record." },
670
- { term: "End User", category: "Role", definition: "The person the service is for; uses the service and provides requests, feedback, corrections, and issue reports." },
671
- { term: "Engineer", category: "Role", definition: "The role that turns committed requirements into tasks and working changes, either directly or by driving coding-capable tools." },
672
- { term: "Environment", category: "Run and support", definition: "A named operating context such as local, staging, or production. Components belong to one Environment so each operating context can be understood separately." },
673
- { term: "Estimate", category: "Cost and benefit", definition: "An Engineer cost estimate used during Weigh, with itemized cost line items linked to the requirements or expectations it covers." },
674
- { term: "Estimate Line Item", category: "Cost and benefit", definition: "One cost item inside an Estimate, with a label, amount or range, one-time or recurring timing, and currency." },
675
- { term: "Estimate Refinement", category: "Cost and benefit", definition: "Using real results to improve future cost and benefit estimates." },
676
- { term: "Evidence", category: "Risk and decisions", definition: "Information that supports a decision, check, release, or measurement." },
677
- { term: "Execution Plan", category: "Delivery", definition: "The ordered practical steps inside a Change record for carrying out the change." },
678
- { term: "Expectation", category: "Business context", definition: "The result a person or group expects, including how success will be recognized, with approval tracked where needed." },
679
- { term: "Feedback", category: "Run and support", definition: "A signal from a user, support interaction, service issue, or observed result." },
680
- { term: "Git Commit Reference", category: "Delivery", definition: "An optional commit identifier recorded on a Change result or recovery event to show what code state was used for that execution attempt or rollback. DX Complete records the reference as provided and does not validate it." },
681
- { term: "Go Live", category: "Delivery", definition: "Putting a change into use after readiness is confirmed." },
682
- { term: "Greenfield", category: "Business context", definition: "Work that starts from a new idea rather than an existing service." },
683
- { term: "Handoff", category: "Delivery", definition: "The point where a phase has enough clarity to move into the next phase." },
684
- { term: "Incident", category: "Run and support", definition: "A specific service-impacting or potentially service-impacting occurrence with response history, current status, and severity derived from ordered entries." },
685
- { term: "Incident Entry", category: "Run and support", definition: "One ordered entry in an Incident, such as detected, update, severity, resolved, reopened, or note." },
686
- { term: "Informed By", category: "Risk and decisions", definition: "The relationship from a decision to the record that helped inform it." },
687
- { term: "Journal", category: "Business context", definition: "A shared workspace record for relevant notes that do not have a better dedicated home. Journal entries are append-only and visible to workspace members." },
688
- { term: "Journal Note", category: "Business context", definition: "A raw Journal entry with body text, author, and timestamp. It can be summarized later without being deleted." },
689
- { term: "Journal Summary", category: "Business context", definition: "A compact Journal entry that summarizes covered notes and points back to them so older detail remains retrievable." },
690
- { term: "Known Error", category: "Run and support", definition: "A Problem state showing an underlying cause is known even if the full improvement is not complete." },
691
- { term: "Limited Disclosure", category: "Business context", definition: "A situation where some information is unavailable or cannot be shared." },
692
- { term: "Locator", category: "Run and support", definition: "Structured location information for a Component, such as a URL, project, region, host, or route." },
693
- { term: "Maintenance Schedule", category: "Run and support", definition: "A recurring operational hygiene record with cadence, start date, rationale, and due state derived from linked completed Changes or Tasks." },
694
- { term: "Measure", category: "Cost and benefit", definition: "Compare expected and actual cost or benefit when data is available." },
695
- { term: "Measured At", category: "Cost and benefit", definition: "The date or time when a value metric baseline or actual value was measured." },
696
- { term: "Measurement", category: "Cost and benefit", definition: "Comparing expected and actual cost or benefit when data is available." },
697
- { term: "Normal Change", category: "Delivery", definition: "The default Change type for an assessed alteration to the running service. It may carry a minor, significant, or major impact grade." },
698
- { term: "Operate", category: "Run and support", definition: "Run the service, support users, and respond to issues." },
699
- { term: "Operational Registry", category: "Run and support", definition: "The inventory of Environments and Components that shows what exists, where it lives, and which secret locations are relevant. It is not monitoring, diagnostics, a secret vault, an event log, or a runbook." },
700
- { term: "Operator", category: "Role", definition: "The role that releases, deploys, monitors, runs the service, and manages users, permissions, settings, provisioning, and run-side security." },
701
- { term: "Outcome", category: "Business context", definition: "The result the work is meant to create or improve." },
702
- { term: "Owner", category: "Role", definition: "The role that sets authority, priority, outcome direction, requirements, product validation direction, budget commitment, escalation direction, and formal risk acceptance." },
703
- { term: "Problem", category: "Run and support", definition: "An underlying or recurring cause evidenced by one or more Incidents, with investigation, root-cause, known-error, and resolution history." },
704
- { term: "Problem Entry", category: "Run and support", definition: "One ordered entry in a Problem, such as identified, investigation, root cause, known error, resolved, reopened, or note." },
705
- { term: "Proceeding Past an Open Checkpoint", category: "Risk and decisions", definition: "Moving forward while an approval, readiness concern, or other checkpoint is still open. The risk remains visible and is not formally accepted." },
706
- { term: "Product Validation", category: "Delivery", definition: "Confirming that the completed work achieves the intended outcome." },
707
- { term: "QA Verification", category: "Delivery", definition: "Checking that completed work meets the requirements and success criteria." },
708
- { term: "Readiness Checks", category: "Delivery", definition: "The checks used before Go Live to confirm that a change is prepared, supportable, and safe enough to put into use." },
709
- { term: "Record", category: "Business context", definition: "Information kept so decisions, work, service issues, and measurements can be followed over time." },
710
- { term: "Record Link", category: "Business context", definition: "A relationship from one record to another. Links can be added or removed when the relationship changes or was recorded incorrectly." },
711
- { term: "Readable ID", category: "Business context", definition: "A short record reference such as REQ-0001. It helps people refer to records while the UUID remains the primary key." },
712
- { term: "Release", category: "Delivery", definition: "A set of changes prepared to be put into use." },
713
- { term: "Requirement", category: "Delivery", definition: "A commitment to make something true in a buildable and checkable way." },
714
- { term: "Requirement Detail", category: "Delivery", definition: "Optional behavior, edge cases, or check notes kept with a requirement." },
715
- { term: "Requirement Set", category: "Business context", definition: "The group of requirements being estimated, committed, built, or stopped together." },
716
- { term: "Reservation", category: "Business context", definition: "A concern recorded inside a Commitment when the Owner moves forward despite it." },
717
- { term: "Review Note", category: "Delivery", definition: "A free-text note on an expectation or requirement. It may be marked important, but it does not block progress or require an Owner response." },
718
- { term: "Risk", category: "Risk and decisions", definition: "Something uncertain that could affect value, delivery, service, compliance, or operations. Current risk state comes from ordered entries." },
719
- { term: "Risk Acceptance", category: "Risk and decisions", definition: "An Owner decision to own an open risk on the project's behalf. It is different from simply proceeding past an open checkpoint." },
720
- { term: "Risk Entry", category: "Risk and decisions", definition: "One ordered entry in a Risk, such as identified, assessment, treatment, monitor note, closed, or reopened." },
721
- { term: "Risk Treatment", category: "Risk and decisions", definition: "The chosen response to a Risk: accept, mitigate, transfer, or avoid. Formal acceptance is Owner-only." },
722
- { term: "Rollback Plan", category: "Delivery", definition: "The part of a Change record that explains how to reverse or recover if the change fails or should not remain in use." },
723
- { term: "Roll-up", category: "Cost and benefit", definition: "Grouped totals from quantified cost or benefit items, keeping one-time amounts, recurring amounts, periods, and currencies distinct." },
724
- { term: "Secret Pointer", category: "Run and support", definition: "A reference to where a secret is stored and what it is called. It should not contain the secret value." },
725
- { term: "Root Cause", category: "Run and support", definition: "The underlying cause recorded in a Problem when investigation identifies why one or more incidents occurred." },
726
- { term: "Standard Change", category: "Delivery", definition: "A low-risk, pre-understood, repeatable Change type for work that can use a lighter path while still preserving the record." },
727
- { term: "Statement", category: "Business context", definition: "A person's own words before they are interpreted or translated, kept as the traceable root for expectations and downstream work." },
728
- { term: "Success Criteria", category: "Delivery", definition: "The conditions used to decide whether completed work satisfies the need." },
729
- { term: "Support Agent", category: "Role", definition: "The role that helps users, captures signals, and routes questions, feedback, and issues to the right follow-up." },
730
- { term: "Support Request", category: "Run and support", definition: "A shared support record for a reported user experience, question, request, or issue that needs workspace-visible follow-up." },
731
- { term: "Support Request Entry", category: "Run and support", definition: "One ordered entry in a Support Request, such as raised, triage, update, escalated, resolved, reopened, or note." },
732
- { term: "Task", category: "Delivery", definition: "A piece of work with an entry history. The current status comes from the latest status-change entry." },
733
- { term: "Task Entry", category: "Delivery", definition: "One ordered entry in a Task, such as a comment, note, or status change." },
734
- { term: "Tester", category: "Role", definition: "The role that checks completed work against requirements and success criteria." },
735
- { term: "Transformation", category: "Business context", definition: "Improving an existing service or way of working." },
736
- { term: "Unknowns", category: "Business context", definition: "Important questions that are not answered yet." },
737
- { term: "Veto", category: "Risk and decisions", definition: "A serious recorded objection to a Change by the Owner or Engineer. It does not mechanically stop the Operator, but proceeding over it creates a strong accountability record." },
738
- { term: "Value Metric", category: "Cost and benefit", definition: "One before/after measure inside Value Realization, with a baseline, optional actual value, unit, direction, and measured dates." },
739
- { term: "Value Realization", category: "Cost and benefit", definition: "A record that compares baseline and actual value metrics after work or operation when measurement is available." },
740
- { term: "Version History", category: "Risk and decisions", definition: "Prior versions kept when an expectation or requirement changes, so the current wording can be understood without losing what came before." },
741
- { term: "Weigh", category: "Business context", definition: "The phase where cost, value, risk, and confidence are compared before recording a Commitment or Deferral." },
742
- { term: "Workspace", category: "Business context", definition: "The container for one service and the work connected to it." }
743
- ]
744
- }
745
- };
746
-
747
- export function getDocReference(page: DocPageId, term?: string): DocPage | (BaseDocPage & { term: GlossaryTerm }) {
748
- const doc = DOC_REFERENCE[page];
749
-
750
- if (term && page !== "glossary") {
751
- throw new Error("The term parameter is only valid when page is glossary.");
752
- }
753
-
754
- if (page !== "glossary" || !term) {
755
- return doc;
756
- }
757
-
758
- const normalizedTerm = normalizeTerm(term);
759
- const glossaryDoc = doc as GlossaryDoc;
760
- const glossaryTerm = glossaryDoc.terms.find((entry) => normalizeTerm(entry.term) === normalizedTerm);
761
-
762
- if (!glossaryTerm) {
763
- throw new Error(`Glossary term not found: ${term}`);
764
- }
765
-
766
- return {
767
- page: glossaryDoc.page,
768
- title: glossaryDoc.title,
769
- sourceUrl: glossaryDoc.sourceUrl,
770
- summary: glossaryDoc.summary,
771
- term: glossaryTerm
772
- };
773
- }
774
-
775
- function normalizeTerm(value: string): string {
776
- return value.trim().toLowerCase().replace(/[^a-z0-9]+/g, " ");
777
- }