dxcomplete 0.2.1 → 0.3.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 (89) hide show
  1. package/.env.example +0 -7
  2. package/README.md +68 -103
  3. package/dist/cli.js +2 -24
  4. package/dist/validate.js +10 -26
  5. package/docs/cost-model.md +2 -2
  6. package/docs/decision-basis.md +5 -11
  7. package/docs/diagrams.md +3 -3
  8. package/docs/index.md +25 -39
  9. package/docs/model.md +15 -23
  10. package/docs/open-questions.md +1 -1
  11. package/docs/taxonomy.md +7 -8
  12. package/docs/workflows.md +3 -3
  13. package/package.json +24 -24
  14. package/templates/process/README.md +11 -11
  15. package/templates/process/controls.yml +19 -19
  16. package/templates/process/cost-model.yml +3 -3
  17. package/templates/process/decision-basis.yml +4 -4
  18. package/templates/process/diagrams/00-decision-basis.mmd +1 -1
  19. package/templates/process/diagrams/00-overview.mmd +1 -1
  20. package/templates/process/diagrams/01-intake-triage.mmd +4 -4
  21. package/templates/process/diagrams/02-product-definition.mmd +3 -3
  22. package/templates/process/diagrams/03-engineering-execution.mmd +1 -1
  23. package/templates/process/diagrams/04-qa-verification.mmd +1 -1
  24. package/templates/process/diagrams/05-product-validation.mmd +1 -1
  25. package/templates/process/diagrams/06-change-release-control.mmd +1 -1
  26. package/templates/process/diagrams/07-deployment-operations.mmd +1 -1
  27. package/templates/process/diagrams/08-support-incident-management.mmd +1 -1
  28. package/templates/process/diagrams/09-problem-improvement.mmd +1 -1
  29. package/templates/process/diagrams/10-risk-control-management.mmd +1 -1
  30. package/templates/process/diagrams/11-audit-evidence-capture.mmd +1 -1
  31. package/templates/process/roles.yml +6 -6
  32. package/templates/process/taxonomy.yml +46 -46
  33. package/templates/process/workflows.yml +29 -29
  34. package/website/account.html +57 -0
  35. package/website/app.js +177 -0
  36. package/website/flow.html +4 -0
  37. package/website/glossary.html +4 -0
  38. package/website/index.html +4 -0
  39. package/website/objects.html +4 -0
  40. package/website/operating-guide.html +4 -0
  41. package/website/outcomes.html +4 -0
  42. package/website/phase-build.html +4 -0
  43. package/website/phase-elicit.html +4 -0
  44. package/website/phase-go-live.html +4 -0
  45. package/website/phase-measure.html +4 -0
  46. package/website/phase-operate.html +4 -0
  47. package/website/phase-orient.html +4 -0
  48. package/website/phase-weigh.html +4 -0
  49. package/website/roles.html +4 -0
  50. package/website/styles.css +217 -1
  51. package/dist/http/service.d.ts +0 -7
  52. package/dist/http/service.js +0 -725
  53. package/dist/mcp/docs.d.ts +0 -114
  54. package/dist/mcp/docs.js +0 -626
  55. package/dist/mcp/server.d.ts +0 -20
  56. package/dist/mcp/server.js +0 -3059
  57. package/dist/runtime/auth.d.ts +0 -162
  58. package/dist/runtime/auth.js +0 -394
  59. package/dist/runtime/check.d.ts +0 -7
  60. package/dist/runtime/check.js +0 -16
  61. package/dist/runtime/config.d.ts +0 -17
  62. package/dist/runtime/config.js +0 -93
  63. package/dist/runtime/mongo.d.ts +0 -9
  64. package/dist/runtime/mongo.js +0 -56
  65. package/dist/runtime/records.d.ts +0 -427
  66. package/dist/runtime/records.js +0 -2092
  67. package/scripts/check-env-surface.mjs +0 -136
  68. package/scripts/check-public-copy.mjs +0 -263
  69. package/scripts/check-service-boundary.mjs +0 -63
  70. package/scripts/runtime-work-order.mjs +0 -506
  71. package/scripts/smoke-mcp-http.mjs +0 -4026
  72. package/src/cli.ts +0 -268
  73. package/src/http/server.ts +0 -314
  74. package/src/http/service.ts +0 -934
  75. package/src/init.ts +0 -262
  76. package/src/install-manifest.ts +0 -144
  77. package/src/mcp/docs.ts +0 -777
  78. package/src/mcp/server.ts +0 -4580
  79. package/src/package-root.ts +0 -31
  80. package/src/runtime/actor.ts +0 -61
  81. package/src/runtime/auth.ts +0 -673
  82. package/src/runtime/check.ts +0 -18
  83. package/src/runtime/config.ts +0 -128
  84. package/src/runtime/mongo.ts +0 -89
  85. package/src/runtime/records.ts +0 -3205
  86. package/src/runtime/workspace.ts +0 -155
  87. package/src/upgrade.ts +0 -356
  88. package/src/validate.ts +0 -141
  89. package/src/version.ts +0 -16
package/.env.example CHANGED
@@ -1,10 +1,3 @@
1
- # Central service deployment
2
- DXC_MONGODB_URI=
3
- DXC_DATABASE_NAME=dxcomplete
4
- DXC_GOOGLE_CLIENT_ID=
5
- DXC_GOOGLE_CLIENT_SECRET=
6
- DXC_SERVICE_PROVISIONING_SECRET=
7
-
8
1
  # Workspace MCP deployment
9
2
  DXC_SERVICE_URL=
10
3
  DXC_SERVICE_CLIENT_ID=
package/README.md CHANGED
@@ -1,51 +1,63 @@
1
1
  # DX Complete
2
2
 
3
- DX Complete installs a process, documentation, and MCP route scaffold into a Next.js workspace so a service can track decisions, requirements, tasks, changes, incidents, support, operations, and measurement over time.
3
+ DX Complete installs the workspace-side documentation, process files, and MCP route needed for a service to use the hosted DX Complete record system.
4
4
 
5
- ## Quick Start
5
+ This npm package is the installer for a client workspace. It is not the central DX Complete service. The hosted service stores records, manages Google OAuth, checks workspace membership, assigns readable IDs, and executes MCP tools. An installed workspace must be provisioned in DX Complete and configured with its service URL, client ID, and client secret before its MCP route can be used.
6
6
 
7
- Install the scaffold into the current Next.js project:
7
+ Create those credentials by signing in at `https://dxcomplete.directeddomains.com/account.html`. Store the secret in the client workspace hosting environment; it is shown once.
8
+
9
+ For the full DX Complete method and browser documentation, see `https://dxcomplete.directeddomains.com`.
10
+
11
+ ## Install A Workspace
12
+
13
+ 1. Create or open the Next.js project repo that will expose the DX Complete route for this service.
14
+
15
+ 2. Install DX Complete into that project:
8
16
 
9
17
  ```sh
10
18
  npx dxcomplete init
11
19
  ```
12
20
 
13
- The command creates editable DX Complete documentation and process files under `dxcomplete/`, installs Next.js route wrappers under `pages/api/`, writes `vercel.json` compatibility settings, and creates `dxcomplete/workspace.json` as the workspace identity for that service.
21
+ 3. Sign in at `https://dxcomplete.directeddomains.com/account.html`.
14
22
 
15
- The broader product premise is:
23
+ 4. Create a workspace for the service.
16
24
 
17
- ```text
18
- DX Complete = Decision Basis + Complete Engineering + Operations Measurement
25
+ 5. Replace the generated `dxcomplete/workspace.json` with the workspace JSON shown by the account page.
26
+
27
+ 6. Store the service values shown by the account page in the client workspace hosting environment:
28
+
29
+ ```sh
30
+ DXC_SERVICE_URL=https://dxcomplete.directeddomains.com
31
+ DXC_SERVICE_CLIENT_ID=...
32
+ DXC_SERVICE_CLIENT_SECRET=...
19
33
  ```
20
34
 
21
- The scaffold is intended to help a team describe and revise a full engineering and service lifecycle model. It deliberately does not present the current model as decided. Roles, workflows, object taxonomy, and diagrams are draft material that should be edited as the operating model becomes clearer.
35
+ 7. Deploy the workspace app and verify its MCP route at `/api/mcp`.
36
+
37
+ The init command creates editable DX Complete documentation and process files under `dxcomplete/`, installs Next.js route wrappers under `pages/api/`, writes Vercel compatibility settings, and creates an initial `dxcomplete/workspace.json` file. The hosted account page is the source of the provisioned workspace JSON and one-time service secret.
22
38
 
23
- ## Product Outcome
39
+ `DXC_SERVICE_URL` is environment-specific, `DXC_SERVICE_CLIENT_ID` is a provisioning detail, and `DXC_SERVICE_CLIENT_SECRET` is a secret. Workspace deployments do not need database credentials, OAuth provider secrets, or central-service provisioning secrets.
24
40
 
25
- Running `dxcomplete init` in a Next.js project creates an editable starting point for process documentation, Mermaid diagrams, taxonomy files, decision-basis templates, cost-model templates, workflow templates, placeholder controls, evidence folders, workspace configuration, Next-compatible MCP route wrappers, and optional GitHub workflow checks.
41
+ ## What It Installs
26
42
 
27
- The current draft model covers:
43
+ DX Complete adds a workspace-side scaffold for one service scope:
28
44
 
29
- - Direction
30
- - Product definition
31
- - Engineering execution
32
- - Engineer implementation, including Codex-assisted work where appropriate
33
- - QA verification
34
- - Product validation
35
- - Change and release control
36
- - Deployment
37
- - Operation
38
- - User support
39
- - Administration as part of operation
40
- - Audit and evidence
45
+ - Editable process documentation under `dxcomplete/docs/`.
46
+ - Editable process data under `dxcomplete/process/`.
47
+ - Workspace identity in `dxcomplete/workspace.json`.
48
+ - Install metadata in `dxcomplete/.install-manifest.json`.
49
+ - Next.js route wrappers under `pages/api/`.
50
+ - Vercel compatibility settings in `vercel.json`.
51
+ - An optional basic GitHub workflow.
52
+ - A root `AGENTS.md` only when the target project does not already have one.
41
53
 
42
- ## Current Framing
54
+ The documentation and process files are intentionally local to the installed workspace. Teams can adapt them to match how their service is actually governed, built, released, operated, supported, and measured.
43
55
 
44
- The working hypothesis is that DX Complete describes a full decision-basis, engineering, and service lifecycle, not only software development. It includes cost and benefit reasoning before engineering begins, both build/change responsibilities and run/service responsibilities, and actual measurement after delivery where available.
56
+ ## Current Record Set
45
57
 
46
- The current role model includes Owner, Engineer, Tester, Operator, Support Agent, and End User. The model keeps outcome authority, requirements, product validation, and risk acceptance visible inside Owner; implementation responsibilities inside Engineer; and administration responsibilities inside Operator.
58
+ The hosted DX Complete runtime stores records for the service lifecycle. Current runtime records include Workspace, Statement, Journal, Environment, Component, Maintenance Schedule, Expectation, Requirement, Estimate, Benefits, Value Realization, Commitment, Deferral, Task, Change, Incident, Problem, Support Request, Decision, Risk, and DX Complete Ticket.
47
59
 
48
- Current runtime records include Workspace, Statement, Journal, Environment, Component, Maintenance Schedule, Expectation, Requirement, Estimate, Benefits, Value Realization, Commitment, Deferral, Task, Change, Incident, Problem, Support Request, Decision, Risk, and DX Complete Ticket. Other lifecycle concepts such as Feedback, Feature Request, Release, Deployment, Control, and Evidence remain useful language but are not all current records. They are represented in editable YAML and Markdown so the model can evolve deliberately.
60
+ Workspace-scoped lifecycle records receive readable references such as `REQ-0001` while UUID remains the primary key and link target. DX Complete keeps ledger-style records appendable where history matters, and state-style records versioned where the current shape matters.
49
61
 
50
62
  ## Usage
51
63
 
@@ -85,14 +97,19 @@ Validate the scaffold shape:
85
97
  npx dxcomplete validate
86
98
  ```
87
99
 
88
- By default, the scaffold is written to `dxcomplete/` and a placeholder workflow is written to `.github/workflows/dxcomplete.yml`. Existing files are not overwritten unless `--force` is provided.
100
+ By default, the scaffold is written to `dxcomplete/` and a basic workflow is written to `.github/workflows/dxcomplete.yml`. Existing files are not overwritten unless `--force` is provided.
89
101
 
90
- If the target project does not already have a root `AGENTS.md`, `dxcomplete init` also writes a small Codex guidance file that points future engineering agents to `dxcomplete/docs/operating-guide.md` and `dxcomplete/docs/codex-integration.md`. If a root `AGENTS.md` already exists, it is skipped. `dxcomplete upgrade` does not overwrite a user-owned `AGENTS.md`.
102
+ If the target project does not already have a root `AGENTS.md`, `dxcomplete init` writes a small Codex guidance file that points future engineering agents to `dxcomplete/docs/operating-guide.md` and `dxcomplete/docs/codex-integration.md`. If a root `AGENTS.md` already exists, it is skipped. `dxcomplete upgrade` does not overwrite a user-owned `AGENTS.md`.
103
+
104
+ `dxcomplete upgrade` previews by default. It manages the installed route wrappers, Vercel compatibility configuration, and `dxcomplete/.install-manifest.json`. It does not overwrite `dxcomplete/workspace.json`. It reports drift in `dxcomplete/docs` and `dxcomplete/process` because those files become user-owned after installation.
91
105
 
92
- `dxcomplete upgrade` previews by default. It manages the installed route wrappers, Vercel compatibility configuration, and `dxcomplete/.install-manifest.json`. It does not overwrite `dxcomplete/workspace.json`. It reports drift in `dxcomplete/docs` and `dxcomplete/process` because those files are expected to become user-owned after installation.
93
106
  Run `dxcomplete init` before `dxcomplete upgrade`; upgrade refuses targets that do not already have `dxcomplete/workspace.json`.
94
107
 
95
- The installed MCP route wrappers are written under `pages/api/` so the workspace can remain a normal Next.js app on Vercel:
108
+ ## Workspace Runtime and MCP
109
+
110
+ The installed workspace exposes a Model Context Protocol route for that workspace. The route does not open the database directly and does not run the hosted DX Complete service. It proxies auth and MCP requests to the hosted service. Access is scoped by the installed repo's `dxcomplete/workspace.json`, authenticated actor identity, and workspace membership.
111
+
112
+ The installed route wrappers are written under `pages/api/` so the workspace can remain a normal Next.js app on Vercel:
96
113
 
97
114
  ```text
98
115
  pages/api/mcp.js
@@ -101,56 +118,17 @@ pages/api/dxcomplete/[...path].js
101
118
  pages/api/auth/callback/google.js
102
119
  ```
103
120
 
104
- The workspace identity is written to `dxcomplete/workspace.json` inside the installed project. That file belongs to the workspace app repo, not to the central DX Complete repo.
121
+ Hosted MCP is exposed in the installed workspace app at `/api/mcp`. The workspace route uses Streamable HTTP, advertises OAuth metadata for remote MCP clients, proxies OAuth through the hosted DX Complete service, and returns DX Complete bearer tokens scoped to the configured workspace. The installed repo supplies workspace identity through `dxcomplete/workspace.json`; the hosted service stores workspace memberships and executes MCP tools.
105
122
 
106
- ## Package and Compatibility Versioning
107
-
108
- DX Complete uses one package version, one workspace compatibility gate, and one surface fingerprint:
109
-
110
- - `packageVersion` is the npm package release version from `package.json`.
111
- - `workspaceCompatibility` is the installed workspace compatibility gate. It changes only when an installed workspace must update its route/proxy surface to keep talking safely to the central service.
112
- - `surfaceFingerprint` is an automatic hash of the live MCP tools, tool schemas, process guide, and on-demand doc references. It can change without requiring a package release or workspace upgrade.
113
-
114
- The MCP `surfaceVersion` field is a stable surface identifier. Use `surfaceFingerprint` for exact surface reconciliation and `workspaceCompatibility` for upgrade decisions.
115
-
116
- ## Runtime and MCP
117
-
118
- The documentation scaffold is the first milestone. The next layer is a hosted runtime and MCP server so DX Complete can coordinate its own records. The runtime now treats Workspace as the boundary for one service scope.
119
-
120
- The default MCP deployment model is one endpoint per workspace. A Next.js project repo installs DX Complete and exposes an MCP route for that workspace, but that workspace server does not open the database directly. It proxies auth and MCP requests to the central DX Complete service. Access is scoped by the installed repo's `dxcomplete/workspace.json`, authenticated actor identity, and workspace membership. Do not use a workspace environment variable for this boundary.
121
-
122
- For the central service deployment, provide the database and Google OAuth configuration:
123
-
124
- ```sh
125
- DXC_MONGODB_URI=mongodb+srv://...
126
- DXC_DATABASE_NAME=dxcomplete
127
- DXC_GOOGLE_CLIENT_ID=...
128
- DXC_GOOGLE_CLIENT_SECRET=...
129
- DXC_SERVICE_PROVISIONING_SECRET=...
130
- ```
123
+ The hosted DX Complete service uses Google OAuth for account sign-in. Its Google OAuth callback URL is:
131
124
 
132
- `DXC_MONGODB_URI` is a secret, `DXC_DATABASE_NAME` is environment-specific, `DXC_GOOGLE_CLIENT_ID` is a provisioning detail, `DXC_GOOGLE_CLIENT_SECRET` is a secret, and `DXC_SERVICE_PROVISIONING_SECRET` is a secret.
133
-
134
- For a workspace MCP deployment, provide only the central-service connection:
135
-
136
- ```sh
137
- DXC_SERVICE_URL=https://dxcomplete.example
138
- DXC_SERVICE_CLIENT_ID=...
139
- DXC_SERVICE_CLIENT_SECRET=...
140
- ```
141
-
142
- `DXC_SERVICE_URL` is environment-specific, `DXC_SERVICE_CLIENT_ID` is a provisioning detail, and `DXC_SERVICE_CLIENT_SECRET` is a secret. Workspace MCP deployments must not require `DXC_MONGODB_URI`, `DXC_GOOGLE_CLIENT_ID`, or `DXC_GOOGLE_CLIENT_SECRET`.
143
-
144
- Then build and check the runtime:
145
-
146
- ```sh
147
- npm run build
148
- npm run runtime:check
125
+ ```text
126
+ https://dxcomplete.directeddomains.com/api/dxcomplete/web/auth/google/callback
149
127
  ```
150
128
 
151
- The first runtime collections cover workspaces, statements, journal entries, environments, components, estimates, benefits, expectations, requirements, commitments, deferrals, tasks, changes, decisions, and risks. Use the MCP tools to create and link those records inside the intended workspace. Workspace-scoped lifecycle records receive a human-readable reference such as `REQ-0001` while UUID remains the primary key and link target.
129
+ On Vercel, `vercel.json` must include `dxcomplete/workspace.json` in the API function bundle. The scaffold includes this by default with `functions["pages/api/**/*.js"].includeFiles`. Vercel reserves `/.well-known`, so the installed Next app rewrites the OAuth discovery metadata paths to the DX Complete route wrapper.
152
130
 
153
- Environment and Component records form the Operational Registry. The registry is an inventory of operational state: what exists in each environment, where it lives, and which secret names or locations are relevant. It is not monitoring, diagnostics, a secret vault, an event log, or a runbook engine. Secret pointers should identify stores and keys only; do not record secret values.
131
+ ## MCP Tools
154
132
 
155
133
  Useful MCP tools include:
156
134
 
@@ -161,7 +139,7 @@ Useful MCP tools include:
161
139
  - `list_unread_dxcomplete_ticket_replies` to see which tickets have unread DX Complete replies without returning the reply body, and `read_dxcomplete_ticket` to open a ticket and mark those replies read.
162
140
  - `append_journal_note`, `read_journal`, `get_journal_entry`, and `append_journal_summary` for shared workspace context that has no dedicated record home.
163
141
  - `get_record`, `list_records`, and `list_linked_records` to inspect records and relationships.
164
- - `create_workspace`, `create_statement`, and `update_statement` to establish the workspace, service scope, and traceable source wording.
142
+ - `create_statement` and `update_statement` to capture service-scope source wording.
165
143
  - `create_environment`, `update_environment`, `list_environments`, `create_component`, `update_component`, and `list_components` for the Operational Registry.
166
144
  - `create_expectation` and `update_expectation` for user-facing conditions of satisfaction, with prior versions preserved on update.
167
145
  - `create_requirement` and `update_requirement` for requirement work, with prior requirement versions preserved on update.
@@ -175,41 +153,28 @@ Useful MCP tools include:
175
153
  - `link_records` and `unlink_records` for explicit relationships when a typed tool does not already create or remove the link.
176
154
  - `archive_record` for cleanup without deleting evidence.
177
155
 
178
- Hosted MCP is exposed at `/api/mcp`. The workspace route uses Streamable HTTP, advertises OAuth metadata for remote MCP clients, proxies OAuth through the central service, sends users through Google OAuth, and then returns DX Complete bearer tokens scoped to the configured workspace. The installed repo supplies workspace identity through `dxcomplete/workspace.json`; the central service stores workspace memberships and executes MCP tools.
179
-
180
- The central service exposes internal routes under `/api/dxcomplete/service/*`. Workspace servers authenticate to those routes with `DXC_SERVICE_CLIENT_ID` and `DXC_SERVICE_CLIENT_SECRET`. The provisioning route creates the workspace record, seeds the Owner membership, and returns the one-time workspace service-client secret.
181
-
182
- For Google OAuth provisioning, set the callback URL to `/api/auth/callback/google` on the hosted workspace domain.
156
+ A DX Complete Ticket is the private place for an MCP client user to raise a question, report, request, correction, or follow-up with DX Complete. It has an ID and can receive appended entries over time. The durable content is the title plus entries; summary is optional and is not generated automatically. DX Complete replies can be tracked as unread or read by the submitting actor. Formal shared work should be created or linked separately when someone decides the ticket needs process follow-up.
183
157
 
184
- Use `runtime_status` to reconcile the MCP-facing contract. `surfaceFingerprint` is the single client-facing identity for the tools, tool schemas, process guide, and on-demand doc references together. `get_process_guide` and `get_doc` return the same `surfaceVersion` and `surfaceFingerprint`, so an MCP client can treat a mismatch as a stale or inconsistent surface and refresh before continuing.
185
-
186
- On Vercel, `vercel.json` must include `dxcomplete/workspace.json` in the API function bundle. The scaffold includes this by default with `functions["pages/api/**/*.js"].includeFiles`. Vercel reserves `/.well-known`, so the installed Next app rewrites the OAuth discovery metadata paths to the DX Complete route wrapper.
187
-
188
- A DX Complete Ticket is the private place for an MCP client user to raise a question, report, request, correction, or follow-up with DX Complete. It has an ID and can receive appended entries over time. The durable content is the title plus entries; summary is optional and is not generated automatically. DX Complete replies can be tracked as unread or read by the submitting actor. The unread list identifies tickets that need attention; reading the ticket opens the full content and marks addressed replies read. A ticket does not ingest files or assets, and does not automatically create a requirement, task, incident, or decision. Formal shared work should be created or linked separately when someone decides the ticket needs process follow-up.
189
-
190
- The Journal is shared workspace context, not a private ticket. It is for useful notes that do not already belong in a dedicated record such as Statement, Expectation, Requirement, Decision, Risk, Change, or Task. The routing test is: will another record reference or depend on this? If yes, prefer a dedicated record. Journal content that becomes load-bearing should be promoted to the appropriate record and linked back where useful. Journal entries are append-only and can be linked as decision inputs or provenance. The default journal read returns the hot tier: active summaries plus active raw notes. Summary entries point back to covered raw notes, and covered notes are archived out of the hot read without being deleted.
158
+ The Journal is shared workspace context, not a private ticket. It is for useful notes that do not already belong in a dedicated record such as Statement, Expectation, Requirement, Decision, Risk, Change, or Task. Journal content that becomes load-bearing should be promoted to the appropriate record and linked back where useful.
191
159
 
192
160
  The Operating Guide explains record routing by role. Engineer/Codex work defaults to Requirement -> Task. Tester evidence usually belongs in Task entries, review notes, Risk, Decision, or Journal. Operator work uses Change for run-side alterations, Incident for specific service-impacting occurrences, Problem for underlying or recurring causes, and Environment or Component for operational inventory. Support Agent work starts with DX Complete Ticket, then promotes to shared records only when needed.
193
161
 
194
- Run the hosted MCP smoke test after runtime changes:
162
+ ## Package and Compatibility Versioning
195
163
 
196
- ```sh
197
- npm run smoke:mcp:http
198
- ```
164
+ DX Complete uses one package version, one workspace compatibility gate, and one surface fingerprint:
165
+
166
+ - `packageVersion` is the npm package release version from `package.json`.
167
+ - `workspaceCompatibility` is the installed workspace compatibility gate. It changes only when an installed workspace must update its route/proxy surface to keep talking safely to the hosted DX Complete service.
168
+ - `surfaceFingerprint` is an automatic hash of the live MCP tools, tool schemas, process guide, and on-demand doc references. It can change without requiring a package release or workspace upgrade.
199
169
 
200
- After updating a remote connector, compare its `runtime_status` fingerprint with the hosted smoke-test fingerprint before relying on newly added tools.
170
+ The MCP `surfaceVersion` field is a stable surface identifier. Use `surfaceFingerprint` for exact surface reconciliation and `workspaceCompatibility` for upgrade decisions. `runtime_status`, `get_process_guide`, and `get_doc` return the same `surfaceVersion` and `surfaceFingerprint`, so an MCP client can refresh when the surface is stale or inconsistent.
201
171
 
202
172
  ## Repository Structure
203
173
 
204
174
  ```text
205
- docs/ Package documentation and draft model notes
206
- templates/process/ Installed process scaffold
175
+ docs/ Installed DX Complete documentation
176
+ templates/process/ Installed editable process files
207
177
  templates/next/ Installed Next.js route wrappers
208
- templates/github/ Optional GitHub workflow placeholder
209
- src/ TypeScript CLI, runtime, and MCP source
210
- dist/ Runtime JavaScript CLI
178
+ templates/github/ Optional basic GitHub workflow
179
+ dist/ Published CLI and workspace MCP proxy handler
211
180
  ```
212
-
213
- ## Design Principle
214
-
215
- Use the scaffold to preserve the current thinking without freezing it. Prefer explicit draft status, open questions, TODOs, and editable configuration over hardcoded claims about how the model must work.
package/dist/cli.js CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import { initProject } from "./init.js";
3
- import { checkRuntime } from "./runtime/check.js";
4
3
  import { upgradeProject } from "./upgrade.js";
5
4
  import { validateScaffold } from "./validate.js";
6
5
  import { DXCOMPLETE_PACKAGE_VERSION } from "./version.js";
@@ -35,7 +34,7 @@ async function main(argv) {
35
34
  console.log(`Initialized DX Complete scaffold in ${result.targetDir}`);
36
35
  printList("Written", result.written);
37
36
  printList("Skipped existing", result.skipped);
38
- console.log("Review dxcomplete/docs/open-questions.md before treating the draft model as policy.");
37
+ console.log("Next: sign in at https://dxcomplete.directeddomains.com/account.html, create the workspace, replace dxcomplete/workspace.json with the returned workspace JSON, and store the service values in the hosting environment.");
39
38
  return;
40
39
  }
41
40
  if (args.command === "upgrade") {
@@ -82,11 +81,6 @@ async function main(argv) {
82
81
  process.exitCode = 1;
83
82
  return;
84
83
  }
85
- if (args.command === "check-runtime") {
86
- const result = await checkRuntime({ envFile: args.envFile });
87
- console.log(JSON.stringify(result, null, 2));
88
- return;
89
- }
90
84
  throw new Error(`Unknown command "${args.command}".`);
91
85
  }
92
86
  function parseArgs(argv) {
@@ -128,19 +122,6 @@ function parseArgs(argv) {
128
122
  parsed.targetDir = arg.slice("--target=".length);
129
123
  continue;
130
124
  }
131
- if (arg === "--env") {
132
- const value = argv[index + 1];
133
- if (!value) {
134
- throw new Error("--env requires a file path.");
135
- }
136
- parsed.envFile = value;
137
- index += 1;
138
- continue;
139
- }
140
- if (arg.startsWith("--env=")) {
141
- parsed.envFile = arg.slice("--env=".length);
142
- continue;
143
- }
144
125
  if (arg === "--force") {
145
126
  parsed.force = true;
146
127
  continue;
@@ -181,17 +162,14 @@ Usage:
181
162
  dxcomplete init [--target <dir>] [--force] [--dry-run] [--no-github-workflow]
182
163
  dxcomplete upgrade [--target <dir>] [--apply] [--force]
183
164
  dxcomplete validate [--target <dir>]
184
- dxcomplete check-runtime [--env <file>]
185
165
 
186
166
  Commands:
187
- init Install the editable draft scaffold into a project.
167
+ init Install the editable DX Complete workspace scaffold into a project.
188
168
  upgrade Preview or apply compatibility-critical scaffold updates.
189
169
  validate Validate the expected scaffold file shape.
190
- check-runtime Verify MongoDB connectivity and required collections.
191
170
 
192
171
  Options:
193
172
  --target <dir> Target project directory. Defaults to the current directory.
194
- --env <file> Runtime env file. Defaults to .env.local when present.
195
173
  --apply Write upgrade changes. Upgrade previews by default.
196
174
  --force Overwrite existing scaffold files.
197
175
  --dry-run Show what would be written without changing files.
package/dist/validate.js CHANGED
@@ -62,39 +62,23 @@ function packageRequiredFiles() {
62
62
  ...processFiles.map((file) => path.join("templates", "process", file)),
63
63
  ...diagrams.map((file) => path.join("templates", "process", "diagrams", file)),
64
64
  ".env.example",
65
- path.join("api", "mcp.js"),
66
- path.join("api", "dxcomplete.js"),
67
- path.join("api", "dxcomplete-service.js"),
68
- path.join("api", "auth", "callback", "google.js"),
69
- path.join("dxcomplete", "workspace.json"),
70
65
  path.join("templates", "AGENTS.md"),
71
- path.join("scripts", "check-env-surface.mjs"),
72
- path.join("scripts", "smoke-mcp-http.mjs"),
73
- path.join("scripts", "runtime-work-order.mjs"),
74
- path.join("scripts", "check-public-copy.mjs"),
75
- path.join("scripts", "check-service-boundary.mjs"),
76
66
  path.join("templates", "next", "pages", "api", "mcp.js"),
77
67
  path.join("templates", "next", "pages", "api", "dxcomplete.js"),
78
68
  path.join("templates", "next", "pages", "api", "dxcomplete", "[...path].js"),
79
69
  path.join("templates", "next", "pages", "api", "auth", "callback", "google.js"),
80
70
  path.join("templates", "next", "vercel.json"),
81
71
  path.join("templates", "github", "workflows", "dxcomplete.yml"),
82
- path.join("src", "cli.ts"),
83
- path.join("src", "install-manifest.ts"),
84
- path.join("src", "init.ts"),
85
- path.join("src", "package-root.ts"),
86
- path.join("src", "http", "server.ts"),
87
- path.join("src", "http", "service.ts"),
88
- path.join("src", "mcp", "server.ts"),
89
- path.join("src", "runtime", "auth.ts"),
90
- path.join("src", "runtime", "check.ts"),
91
- path.join("src", "runtime", "config.ts"),
92
- path.join("src", "runtime", "mongo.ts"),
93
- path.join("src", "runtime", "records.ts"),
94
- path.join("src", "runtime", "workspace.ts"),
95
- path.join("src", "upgrade.ts"),
96
- path.join("src", "version.ts"),
97
- path.join("src", "validate.ts")
72
+ path.join("dist", "cli.js"),
73
+ path.join("dist", "init.js"),
74
+ path.join("dist", "install-manifest.js"),
75
+ path.join("dist", "package-root.js"),
76
+ path.join("dist", "http", "server.js"),
77
+ path.join("dist", "runtime", "actor.js"),
78
+ path.join("dist", "runtime", "workspace.js"),
79
+ path.join("dist", "upgrade.js"),
80
+ path.join("dist", "version.js"),
81
+ path.join("dist", "validate.js")
98
82
  ];
99
83
  }
100
84
  function installedRequiredFiles() {
@@ -1,4 +1,4 @@
1
- # Draft Cost Model
1
+ # Cost Model
2
2
 
3
3
  Cost modeling is first-class in DX Complete. Do not reduce the top-level model to OPEX. OPEX/CAPEX-like categories may exist inside the cost model, but the top-level concept should remain Cost Model / Decision Basis.
4
4
 
@@ -27,7 +27,7 @@ The structured `Estimate` record is cost-only. It keeps one-time and recurring c
27
27
 
28
28
  Expected value belongs in `Benefits`. Benefits may include quantified items with amounts, or qualitative items that are complete without an amount.
29
29
 
30
- ## Draft Cost Objects
30
+ ## Cost Records
31
31
 
32
32
  Current-state cost context should be attempted where relevant. It may be complete, partial, unavailable, or limited by disclosure, but it is no longer a separate runtime record in the current model.
33
33
 
@@ -1,14 +1,8 @@
1
- # Draft Decision Basis
1
+ # Decision Basis
2
2
 
3
- DX Complete should be modeled as:
3
+ A DX effort implies a decision to improve or create a digital capability with some expected business benefit. DX Complete therefore keeps cost and benefit reasoning before engineering work begins, plus actual measurement after delivery where possible.
4
4
 
5
- ```text
6
- Decision Basis + Complete Engineering + Operations Measurement
7
- ```
8
-
9
- This is a working hypothesis, but the need is first-class. A DX effort implies a decision to improve or create a digital capability with some expected business benefit. The model therefore needs cost and benefit reasoning before engineering work begins, plus actual measurement after delivery where possible.
10
-
11
- ## Draft Purpose
5
+ ## Purpose
12
6
 
13
7
  The decision basis explains whether there is enough reason and confidence to commit after expectations and the requirement set have been elicited, or whether the work should be deferred until named conditions are addressed.
14
8
 
@@ -34,7 +28,7 @@ Actual cost and benefit measurements should be captured after launch where avail
34
28
 
35
29
  Weigh should preserve the Owner outcome: a Commitment if the work moves forward, or a Deferral if conditions must be addressed first. Decision records can still preserve decision entries, loose argument entries, notes, and linked inputs where a separate decision trail is useful. DX Complete should not require numeric weights or treat the recorded rationale as proof that the choice was objectively correct.
36
30
 
37
- ## Draft Decision Basis Flow
31
+ ## Decision Basis Flow
38
32
 
39
33
  1. Statement capture
40
34
  2. Capture statement and expectations
@@ -54,4 +48,4 @@ Weigh should preserve the Owner outcome: a Commitment if the work moves forward,
54
48
 
55
49
  The decision basis should not pretend that every DX effort has clean financial data. It should create visibility into what is known, estimated, unavailable, or deliberately undisclosed.
56
50
 
57
- The terms and object names are draft. The concepts are important.
51
+ The workspace process files can adapt the terms and local guidance, but the decision basis should keep cost, benefit, risk, confidence, and the Owner outcome visible.
package/docs/diagrams.md CHANGED
@@ -1,6 +1,6 @@
1
- # Draft Diagrams
1
+ # Diagrams
2
2
 
3
- The Mermaid diagrams are draft visualizations. They should be revised as roles, workflows, and object relationships change.
3
+ The Mermaid diagrams visualize the current DX Complete workflow and record relationships. Revise them when local role, workflow, or record decisions change.
4
4
 
5
5
  Installed diagram files:
6
6
 
@@ -20,7 +20,7 @@ Installed diagram files:
20
20
 
21
21
  ## Diagram Policy
22
22
 
23
- Each diagram should stay editable in plain Mermaid. Avoid diagrams that imply the model is final unless the related Markdown and YAML have been updated to match that decision.
23
+ Each diagram should stay editable in plain Mermaid. Keep related Markdown, YAML, and Mermaid files aligned when a workspace policy changes.
24
24
 
25
25
  ## Revision Questions
26
26
 
package/docs/index.md CHANGED
@@ -1,61 +1,47 @@
1
- # DX Complete Draft Scaffold
1
+ # DX Complete Workspace Docs
2
2
 
3
3
  ## Goal
4
4
 
5
- Build a Node package that installs a reusable DX Complete documentation and scaffold kit into a project.
5
+ These files describe how this workspace uses DX Complete to decide what is worth doing, deliver it with control, run it safely, and learn from the results.
6
6
 
7
- ## Important Context
7
+ DX Complete is installed into a service repo as workspace-owned documentation, process files, and route wrappers. The hosted DX Complete service stores records, manages sign-in, checks workspace membership, assigns readable IDs, and executes MCP tools.
8
8
 
9
- This is exploratory design work. The product goal is stable, but the engineering/service model, roles, workflows, object taxonomy, and diagrams are still being discovered.
9
+ ## Install And Provisioning Context
10
10
 
11
- Do not treat the current model as final. Preserve it as draft material and make it easy to revise.
11
+ The npm package installs the workspace-side files. It does not install the hosted DX Complete service.
12
12
 
13
- ## Core Product Outcome
13
+ For a new workspace:
14
14
 
15
- The package should initialize a repo with process documentation, Mermaid diagrams, taxonomy files, decision-basis templates, cost-model templates, workflow templates, and placeholder configuration for a full end-to-end DX engineering and service control model.
15
+ 1. Run `npx dxcomplete init` in the Next.js project repo.
16
+ 2. Sign in at `https://dxcomplete.directeddomains.com/account.html`.
17
+ 3. Create a workspace for the service.
18
+ 4. Replace `dxcomplete/workspace.json` with the workspace JSON shown by the account page.
19
+ 5. Store `DXC_SERVICE_URL`, `DXC_SERVICE_CLIENT_ID`, and `DXC_SERVICE_CLIENT_SECRET` in the workspace app hosting environment.
20
+ 6. Deploy the workspace app and verify the MCP route at `/api/mcp`.
16
21
 
17
- The broader product premise is:
22
+ The service secret is shown once by the account page. Store it in the hosting environment, not in the repo.
18
23
 
19
- ```text
20
- DX Complete = Decision Basis + Complete Engineering + Operations Measurement
21
- ```
24
+ ## Current Product Model
22
25
 
23
- Command target:
24
-
25
- ```sh
26
- npx dxcomplete init
27
- ```
28
-
29
- ## Scope Of The Draft Model
30
-
31
- The installed scaffold should help describe and evolve a model covering:
26
+ The installed model covers:
32
27
 
33
28
  - Workspace and service context
34
29
  - Statement capture
35
30
  - Shared Journal context
36
- - Current-state cost context attempts
37
- - Itemized cost estimates
38
- - Benefits
31
+ - Cost context, itemized estimates, benefits, and measured value
39
32
  - Decision basis for Weigh
40
- - Weigh outcomes with Commitment or Deferral records, plus decisions with linked inputs where useful
41
- - Direction
42
- - Product definition
43
- - Engineering execution
44
- - Engineer implementation, including Codex-assisted work where appropriate
45
- - QA verification
46
- - Product validation
33
+ - Weigh outcomes with Commitment or Deferral records
34
+ - Decisions with linked inputs where useful
35
+ - Direction and product definition
36
+ - Engineering execution and task work
37
+ - QA verification and product validation
47
38
  - Change and release control
48
- - Deployment
49
- - Operation
50
- - User support
39
+ - Deployment and operation
40
+ - User support, incidents, and problems
51
41
  - Administration as part of operation
52
- - Audit and evidence
53
- - Actual cost / benefit measurement where available
54
- - Estimate refinement for future projects
42
+ - Audit, evidence, risk, and measurement
55
43
  - Role-by-role operating guidance
56
44
 
57
45
  ## How To Read These Docs
58
46
 
59
- These documents record the current working hypotheses. They are not requirements for how every organization must operate.
60
-
61
- Use `operating-guide.md` to see how each role should choose records in normal work. Use `open-questions.md` to capture uncertain areas before turning them into policy. Use the YAML files in `templates/process/` as the editable source for roles, objects, workflows, and controls.
47
+ Use `operating-guide.md` to see how each role should choose records in normal work. Use `taxonomy.md` to understand the current record set. Use `open-questions.md` for genuine unresolved policy questions. Use the YAML files in `dxcomplete/process/` as editable workspace process data.