dxcomplete 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +18 -10
  2. package/dist/init.js +19 -0
  3. package/dist/mcp/docs.d.ts +18 -2
  4. package/dist/mcp/docs.js +201 -13
  5. package/dist/mcp/server.js +761 -47
  6. package/dist/runtime/check.d.ts +1 -1
  7. package/dist/runtime/records.d.ts +95 -4
  8. package/dist/runtime/records.js +640 -11
  9. package/dist/validate.js +2 -0
  10. package/docs/codex-integration.md +45 -18
  11. package/docs/glossary.md +39 -7
  12. package/docs/index.md +2 -1
  13. package/docs/model.md +3 -3
  14. package/docs/operating-guide.md +116 -0
  15. package/docs/taxonomy.md +12 -6
  16. package/docs/workflows.md +5 -3
  17. package/package.json +20 -2
  18. package/scripts/smoke-mcp-http.mjs +460 -6
  19. package/src/init.ts +35 -0
  20. package/src/mcp/docs.ts +234 -14
  21. package/src/mcp/server.ts +1138 -83
  22. package/src/runtime/records.ts +914 -12
  23. package/src/validate.ts +2 -0
  24. package/templates/AGENTS.md +30 -0
  25. package/templates/process/controls.yml +10 -6
  26. package/templates/process/diagrams/01-intake-triage.mmd +5 -5
  27. package/templates/process/diagrams/02-product-definition.mmd +1 -1
  28. package/templates/process/diagrams/06-change-release-control.mmd +5 -7
  29. package/templates/process/diagrams/07-deployment-operations.mmd +2 -2
  30. package/templates/process/diagrams/08-support-incident-management.mmd +5 -4
  31. package/templates/process/diagrams/09-problem-improvement.mmd +4 -3
  32. package/templates/process/diagrams/10-risk-control-management.mmd +6 -4
  33. package/templates/process/diagrams/11-audit-evidence-capture.mmd +1 -1
  34. package/templates/process/taxonomy.yml +91 -17
  35. package/templates/process/workflows.yml +10 -9
  36. package/website/flow.html +1 -0
  37. package/website/glossary.html +37 -8
  38. package/website/index.html +2 -1
  39. package/website/objects.html +68 -11
  40. package/website/operating-guide.html +165 -0
  41. package/website/outcomes.html +1 -0
  42. package/website/phase-build.html +1 -0
  43. package/website/phase-elicit.html +1 -0
  44. package/website/phase-go-live.html +2 -1
  45. package/website/phase-measure.html +1 -0
  46. package/website/phase-operate.html +1 -0
  47. package/website/phase-orient.html +1 -0
  48. package/website/phase-weigh.html +1 -0
  49. package/website/roles.html +1 -0
@@ -3,5 +3,5 @@ export declare function checkRuntime(options?: RuntimeOptions): Promise<{
3
3
  ok: boolean;
4
4
  databaseName: string;
5
5
  envFilePath: string | undefined;
6
- collections: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "decisions", "risks"];
6
+ collections: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "incidents", "problems", "maintenance_schedules", "support_requests", "value_realizations", "decisions", "risks"];
7
7
  }>;
@@ -1,12 +1,12 @@
1
1
  import type { Db } from "mongodb";
2
2
  import type { ActorContext } from "./actor.js";
3
- export declare const COLLECTION_NAMES: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "decisions", "risks"];
3
+ export declare const COLLECTION_NAMES: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "incidents", "problems", "maintenance_schedules", "support_requests", "value_realizations", "decisions", "risks"];
4
4
  export declare const LEGACY_COLLECTION_NAMES: readonly ["engagements", "initiatives", "service_charters", "cost_baselines", "cost_actuals", "benefit_measurements"];
5
5
  export declare const DXCOMPLETE_TICKET_COLLECTION_NAME = "dxcomplete_tickets";
6
6
  export declare const LEGACY_INTAKE_COLLECTION_NAME = "intake_items";
7
7
  export declare const LEGACY_PRIVATE_COLLECTION_NAMES: readonly ["intake_items"];
8
- export declare const INDEX_COLLECTION_NAMES: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "decisions", "risks", "dxcomplete_tickets"];
9
- export declare const LINK_SCAN_COLLECTION_NAMES: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "decisions", "risks", "engagements", "initiatives", "service_charters", "cost_baselines", "cost_actuals", "benefit_measurements"];
8
+ export declare const INDEX_COLLECTION_NAMES: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "incidents", "problems", "maintenance_schedules", "support_requests", "value_realizations", "decisions", "risks", "dxcomplete_tickets"];
9
+ export declare const LINK_SCAN_COLLECTION_NAMES: readonly ["workspaces", "statements", "journal_entries", "environments", "components", "estimates", "benefits", "expectations", "requirements", "tasks", "commitments", "deferrals", "changes", "incidents", "problems", "maintenance_schedules", "support_requests", "value_realizations", "decisions", "risks", "engagements", "initiatives", "service_charters", "cost_baselines", "cost_actuals", "benefit_measurements"];
10
10
  export declare const READABLE_ID_SEQUENCES_COLLECTION = "readable_id_sequences";
11
11
  export declare const READABLE_ID_TYPE_CODES: {
12
12
  readonly statements: "STM";
@@ -20,6 +20,11 @@ export declare const READABLE_ID_TYPE_CODES: {
20
20
  readonly deferrals: "DFR";
21
21
  readonly decisions: "DEC";
22
22
  readonly changes: "CHG";
23
+ readonly incidents: "INC";
24
+ readonly problems: "PRB";
25
+ readonly maintenance_schedules: "MNT";
26
+ readonly support_requests: "SUP";
27
+ readonly value_realizations: "VAL";
23
28
  readonly risks: "RSK";
24
29
  readonly estimates: "EST";
25
30
  readonly benefits: "BFT";
@@ -56,6 +61,7 @@ export type DxcRecord = {
56
61
  createdBy: string;
57
62
  updatedAt: string;
58
63
  updatedBy: string;
64
+ derived?: Record<string, unknown>;
59
65
  };
60
66
  export type ReviewableRecordType = "expectations" | "requirements";
61
67
  export type ReviewNote = {
@@ -81,7 +87,7 @@ export type RecordVersionHistoryEntry = {
81
87
  nextSnapshot: RecordVersionSnapshot;
82
88
  revisionNote?: string;
83
89
  };
84
- export type ChangeEventType = "notice_given" | "veto_recorded" | "emergency_declared" | "decision_recorded" | "result_reported" | "recovery_recorded" | "plan_revised" | "note_added";
90
+ export type ChangeEventType = "notice_given" | "veto_recorded" | "decision_recorded" | "result_reported" | "recovery_recorded" | "plan_revised" | "note_added";
85
91
  export type ChangeEvent = {
86
92
  id: string;
87
93
  eventType: ChangeEventType;
@@ -124,6 +130,48 @@ export type TaskEntry = {
124
130
  createdBy: string;
125
131
  status?: TaskStatus;
126
132
  };
133
+ export type RiskEntryType = "identified" | "assessment" | "treatment" | "monitor_note" | "closed" | "reopened";
134
+ export type RiskLevel = "low" | "medium" | "high";
135
+ export type RiskTreatment = "accept" | "mitigate" | "transfer" | "avoid";
136
+ export type RiskEntry = {
137
+ id: string;
138
+ entryType: RiskEntryType;
139
+ body: string;
140
+ createdAt: string;
141
+ createdBy: string;
142
+ likelihood?: RiskLevel;
143
+ impact?: RiskLevel;
144
+ treatment?: RiskTreatment;
145
+ treatmentRationale?: string;
146
+ };
147
+ export type IncidentEntryType = "detected" | "update" | "severity" | "resolved" | "reopened" | "note";
148
+ export type IncidentSeverity = "low" | "medium" | "high" | "critical";
149
+ export type IncidentEntry = {
150
+ id: string;
151
+ entryType: IncidentEntryType;
152
+ body: string;
153
+ createdAt: string;
154
+ createdBy: string;
155
+ severity?: IncidentSeverity;
156
+ };
157
+ export type ProblemEntryType = "identified" | "investigation" | "root_cause" | "known_error" | "resolved" | "reopened" | "note";
158
+ export type ProblemEntry = {
159
+ id: string;
160
+ entryType: ProblemEntryType;
161
+ body: string;
162
+ createdAt: string;
163
+ createdBy: string;
164
+ rootCause?: string;
165
+ };
166
+ export type SupportRequestEntryType = "raised" | "triage" | "update" | "escalated" | "resolved" | "reopened" | "note";
167
+ export type SupportRequestEntry = {
168
+ id: string;
169
+ entryType: SupportRequestEntryType;
170
+ body: string;
171
+ createdAt: string;
172
+ createdBy: string;
173
+ incidentId?: string;
174
+ };
127
175
  export type JournalEntryKind = "note" | "summary";
128
176
  export type AppendJournalNoteInput = {
129
177
  workspaceId: string;
@@ -208,6 +256,37 @@ export type AppendTaskEntryInput = {
208
256
  body: string;
209
257
  status?: TaskStatus;
210
258
  };
259
+ export type AppendRiskEntryInput = {
260
+ workspaceId: string;
261
+ riskId: string;
262
+ entryType: RiskEntryType;
263
+ body: string;
264
+ likelihood?: RiskLevel;
265
+ impact?: RiskLevel;
266
+ treatment?: RiskTreatment;
267
+ treatmentRationale?: string;
268
+ };
269
+ export type AppendIncidentEntryInput = {
270
+ workspaceId: string;
271
+ incidentId: string;
272
+ entryType: IncidentEntryType;
273
+ body: string;
274
+ severity?: IncidentSeverity;
275
+ };
276
+ export type AppendProblemEntryInput = {
277
+ workspaceId: string;
278
+ problemId: string;
279
+ entryType: ProblemEntryType;
280
+ body: string;
281
+ rootCause?: string;
282
+ };
283
+ export type AppendSupportRequestEntryInput = {
284
+ workspaceId: string;
285
+ supportRequestId: string;
286
+ entryType: SupportRequestEntryType;
287
+ body: string;
288
+ incidentId?: string;
289
+ };
211
290
  export type UnlinkRecordsInput = {
212
291
  fromType: CollectionName;
213
292
  fromId: string;
@@ -318,8 +397,20 @@ export declare function appendChangeEvent(db: Db, input: AppendChangeEventInput,
318
397
  export declare function appendDeferralEvent(db: Db, input: AppendDeferralEventInput, actorId: string): Promise<DxcRecord>;
319
398
  export declare function appendDecisionEntry(db: Db, input: AppendDecisionEntryInput, actorId: string): Promise<DxcRecord>;
320
399
  export declare function appendTaskEntry(db: Db, input: AppendTaskEntryInput, actorId: string): Promise<DxcRecord>;
400
+ export declare function appendRiskEntry(db: Db, input: AppendRiskEntryInput, actorId: string): Promise<DxcRecord>;
401
+ export declare function appendIncidentEntry(db: Db, input: AppendIncidentEntryInput, actorId: string): Promise<DxcRecord>;
402
+ export declare function appendProblemEntry(db: Db, input: AppendProblemEntryInput, actorId: string): Promise<DxcRecord>;
403
+ export declare function appendSupportRequestEntry(db: Db, input: AppendSupportRequestEntryInput, actorId: string): Promise<DxcRecord>;
321
404
  export declare function decisionEntryToCurrentDecision(entry: DecisionEntry): Record<string, unknown>;
322
405
  export declare function taskEntryToCurrentStatus(entry: TaskEntry): Record<string, unknown>;
406
+ export declare function riskEntryToCurrentStatus(entry: RiskEntry, status: "open" | "closed"): Record<string, unknown>;
407
+ export declare function riskEntryToCurrentAssessment(entry: RiskEntry): Record<string, unknown>;
408
+ export declare function riskEntryToCurrentTreatment(entry: RiskEntry): Record<string, unknown>;
409
+ export declare function incidentEntryToCurrentStatus(entry: IncidentEntry, status: "open" | "resolved"): Record<string, unknown>;
410
+ export declare function incidentEntryToCurrentSeverity(entry: IncidentEntry): Record<string, unknown>;
411
+ export declare function problemEntryToCurrentStatus(entry: ProblemEntry, status: "open" | "known_error" | "resolved"): Record<string, unknown>;
412
+ export declare function problemEntryToCurrentRootCause(entry: ProblemEntry): Record<string, unknown>;
413
+ export declare function supportRequestEntryToCurrentStatus(entry: SupportRequestEntry, previousStatus?: Record<string, unknown>): Record<string, unknown> | undefined;
323
414
  export declare function listUnreadDxcompleteTicketReplies(db: Db, actor: ActorContext, limit: number): Promise<DxcompleteTicketUnreadReplyResult[]>;
324
415
  export declare function readDxcompleteTicket(db: Db, input: ReadDxcompleteTicketInput, actor: ActorContext): Promise<DxcRecord>;
325
416
  export declare function archiveDxcompleteTicket(db: Db, input: ArchiveDxcompleteTicketInput, actor: ActorContext): Promise<DxcRecord>;