devworkspace 0.3.0 → 0.3.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 (119) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/README.md +8 -5
  3. package/dist/agents/claude/adapter.d.ts +3 -14
  4. package/dist/agents/claude/adapter.js +46 -49
  5. package/dist/agents/claude/adapter.js.map +1 -1
  6. package/dist/agents/codex/adapter.d.ts +2 -0
  7. package/dist/agents/codex/adapter.js +61 -0
  8. package/dist/agents/codex/adapter.js.map +1 -0
  9. package/dist/agents/copilot/adapter.d.ts +2 -0
  10. package/dist/agents/copilot/adapter.js +62 -0
  11. package/dist/agents/copilot/adapter.js.map +1 -0
  12. package/dist/agents/cursor/adapter.d.ts +2 -0
  13. package/dist/agents/cursor/adapter.js +127 -0
  14. package/dist/agents/cursor/adapter.js.map +1 -0
  15. package/dist/agents/index.d.ts +15 -0
  16. package/dist/agents/index.js +54 -0
  17. package/dist/agents/index.js.map +1 -0
  18. package/dist/agents/shared.d.ts +20 -0
  19. package/dist/agents/shared.js +76 -0
  20. package/dist/agents/shared.js.map +1 -0
  21. package/dist/agents/types.d.ts +16 -1
  22. package/dist/agents/types.js.map +1 -1
  23. package/dist/cli/args.d.ts +42 -0
  24. package/dist/cli/args.js +12 -0
  25. package/dist/cli/args.js.map +1 -1
  26. package/dist/cli/help.js +64 -10
  27. package/dist/cli/help.js.map +1 -1
  28. package/dist/cli/render.d.ts +12 -1
  29. package/dist/cli/render.js +188 -0
  30. package/dist/cli/render.js.map +1 -1
  31. package/dist/cli/run.js +100 -9
  32. package/dist/cli/run.js.map +1 -1
  33. package/dist/config/schemas.d.ts +6 -0
  34. package/dist/config/schemas.js +6 -0
  35. package/dist/config/schemas.js.map +1 -1
  36. package/dist/core/version.d.ts +7 -0
  37. package/dist/core/version.js +13 -0
  38. package/dist/core/version.js.map +1 -1
  39. package/dist/core/workspace.d.ts +1 -0
  40. package/dist/core/workspace.js +1 -0
  41. package/dist/core/workspace.js.map +1 -1
  42. package/dist/discovery/commands.d.ts +1 -0
  43. package/dist/discovery/commands.js +3 -1
  44. package/dist/discovery/commands.js.map +1 -1
  45. package/dist/features/schema.d.ts +3 -0
  46. package/dist/features/schema.js +79 -0
  47. package/dist/features/schema.js.map +1 -0
  48. package/dist/features/types.d.ts +77 -0
  49. package/dist/features/types.js +2 -0
  50. package/dist/features/types.js.map +1 -0
  51. package/dist/features/validate.d.ts +14 -0
  52. package/dist/features/validate.js +124 -0
  53. package/dist/features/validate.js.map +1 -0
  54. package/dist/index.d.ts +8 -2
  55. package/dist/index.js +4 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/integrations/adapters/claudePlugin.d.ts +12 -0
  58. package/dist/integrations/adapters/claudePlugin.js +37 -8
  59. package/dist/integrations/adapters/claudePlugin.js.map +1 -1
  60. package/dist/integrations/adapters/pluginSkill.js +5 -0
  61. package/dist/integrations/adapters/pluginSkill.js.map +1 -1
  62. package/dist/security/files.js +10 -2
  63. package/dist/security/files.js.map +1 -1
  64. package/dist/security/redact.js +1 -1
  65. package/dist/security/redact.js.map +1 -1
  66. package/dist/services/agent.d.ts +12 -2
  67. package/dist/services/agent.js +96 -14
  68. package/dist/services/agent.js.map +1 -1
  69. package/dist/services/analysis.js +3 -3
  70. package/dist/services/analysis.js.map +1 -1
  71. package/dist/services/doctor.js +65 -14
  72. package/dist/services/doctor.js.map +1 -1
  73. package/dist/services/drift.d.ts +21 -0
  74. package/dist/services/drift.js +89 -0
  75. package/dist/services/drift.js.map +1 -0
  76. package/dist/services/features.d.ts +22 -0
  77. package/dist/services/features.js +105 -0
  78. package/dist/services/features.js.map +1 -0
  79. package/dist/services/graph.d.ts +97 -0
  80. package/dist/services/graph.js +342 -0
  81. package/dist/services/graph.js.map +1 -0
  82. package/dist/services/refresh.js +15 -0
  83. package/dist/services/refresh.js.map +1 -1
  84. package/dist/services/reset.js +45 -5
  85. package/dist/services/reset.js.map +1 -1
  86. package/dist/services/setup.d.ts +56 -0
  87. package/dist/services/setup.js +116 -0
  88. package/dist/services/setup.js.map +1 -0
  89. package/dist/services/status.d.ts +8 -0
  90. package/dist/services/status.js +78 -10
  91. package/dist/services/status.js.map +1 -1
  92. package/dist/services/tasks.js +6 -1
  93. package/dist/services/tasks.js.map +1 -1
  94. package/dist/services/verify.d.ts +11 -0
  95. package/dist/services/verify.js +64 -2
  96. package/dist/services/verify.js.map +1 -1
  97. package/dist/tasks/routing.js +14 -10
  98. package/dist/tasks/routing.js.map +1 -1
  99. package/dist/tasks/task.js +6 -2
  100. package/dist/tasks/task.js.map +1 -1
  101. package/dist/verification/scope.js +1 -1
  102. package/dist/verification/scope.js.map +1 -1
  103. package/docs/agents.md +60 -0
  104. package/docs/architecture-report/01-executive-summary.md +168 -0
  105. package/docs/architecture-report/02-system-architecture.md +356 -0
  106. package/docs/architecture-report/03-tools-and-technologies.md +112 -0
  107. package/docs/architecture-report/04-execution-flows.md +257 -0
  108. package/docs/architecture-report/05-codebase-map.md +150 -0
  109. package/docs/architecture-report/06-command-reference.md +446 -0
  110. package/docs/architecture-report/07-data-flow-and-integrations.md +268 -0
  111. package/docs/architecture-report/08-build-test-deployment.md +185 -0
  112. package/docs/architecture-report/09-security-and-reliability.md +165 -0
  113. package/docs/architecture-report/10-feature-status.md +110 -0
  114. package/docs/architecture-report/11-glossary.md +97 -0
  115. package/docs/architecture-report/README.md +103 -0
  116. package/docs/architecture-report/diagrams.md +446 -0
  117. package/docs/architecture.md +2 -2
  118. package/docs/getting-started.md +38 -1
  119. package/package.json +1 -1
@@ -0,0 +1,446 @@
1
+ # Visual Architecture Diagrams Catalog
2
+
3
+ > **Consolidated visual reference catalog containing all 8 core Mermaid architecture, sequence, and workflow diagrams for DevWorkspace v0.3.1.**
4
+
5
+ ---
6
+
7
+ ## Catalog Index
8
+
9
+ | # | Diagram Title | Type | Source Chapter |
10
+ |:---:|---|---|---|
11
+ | **1** | [High-Level System Architecture](#diagram-1-high-level-system-architecture) | Flowchart | [Chapter 2: System Architecture](./02-system-architecture.md) |
12
+ | **2** | [CLI Startup and Command Dispatch Workflow](#diagram-2-cli-startup-and-command-dispatch-workflow) | Sequence Diagram | [Chapter 4: Execution Flows](./04-execution-flows.md) |
13
+ | **3** | [Project Analysis & Discovery Engine Workflow](#diagram-3-project-analysis--discovery-engine-workflow) | Flowchart | [Chapter 4: Execution Flows](./04-execution-flows.md) |
14
+ | **4** | [Tool and Integration Ecosystem Map](#diagram-4-tool-and-integration-ecosystem-map) | Flowchart | [Chapter 2: System Architecture](./02-system-architecture.md) |
15
+ | **5** | [Agent Skills Lifecycle & Execution Flow](#diagram-5-agent-skills-lifecycle--execution-flow) | Sequence Diagram | [Chapter 4: Execution Flows](./04-execution-flows.md) |
16
+ | **6** | [Build, Test & Deployment Pipeline](#diagram-6-build-test--deployment-pipeline) | Flowchart | [Chapter 8: Build, Test & Deployment](./08-build-test-deployment.md) |
17
+ | **7** | [Repository Structure Map](#diagram-7-repository-structure-map) | Graph | [Chapter 5: Codebase Map](./05-codebase-map.md) |
18
+ | **8** | [Feature Implementation Map](#diagram-8-feature-implementation-map) | Flowchart | [Chapter 10: Feature Status](./10-feature-status.md) |
19
+
20
+ ---
21
+
22
+ ## Diagram 1: High-Level System Architecture
23
+
24
+ Illustrates the 4-layer subsystem architecture (Presentation, Service Orchestration, Domain Engines, Core Foundation & Security):
25
+
26
+ ```mermaid
27
+ flowchart TD
28
+ subgraph UI_Layer["1. Presentation Layer"]
29
+ CLI_Entry["CLI Entrypoint\n(src/cli/main.ts)"]
30
+ ArgParser["Arg Parser\n(src/cli/args.ts)"]
31
+ CommandRouter["Command Dispatcher\n(src/cli/run.ts)"]
32
+ TerminalRenderer["Terminal / JSON Renderer\n(src/cli/render.ts)"]
33
+ end
34
+
35
+ subgraph Service_Layer["2. Service Orchestration Layer"]
36
+ SvcInit["initWorkspace()"]
37
+ SvcAnalyze["analyzeWorkspace()"]
38
+ SvcStatus["getStatus()"]
39
+ SvcDoctor["runDoctor()"]
40
+ SvcAgent["installAgent()"]
41
+ SvcTask["createTask() / runTaskCheck()"]
42
+ SvcKnowledge["addFact() / getContext()"]
43
+ SvcIntegrations["setupIntegrations()"]
44
+ end
45
+
46
+ subgraph Engine_Layer["3. Domain Engine Subsystems"]
47
+ subgraph DiscoverySub["Discovery Engine"]
48
+ Scanner["Filesystem Scanner\n(src/discovery/scan.ts)"]
49
+ Detector["Stack & Framework Detector\n(src/discovery/detect.ts)"]
50
+ CommandBuilder["Testing Contract Builder\n(src/discovery/commands.ts)"]
51
+ DocScanner["Documentation Detector\n(src/discovery/docs.ts)"]
52
+ EntryScanner["Entry Points Detector\n(src/discovery/entrypoints.ts)"]
53
+ end
54
+
55
+ subgraph AgentsSub["Multi-Agent Compatibility Engine"]
56
+ AgentRegistry["Agent Registry\n(src/agents/index.ts)"]
57
+ ClaudeAdapter["Claude Code Adapter\n(CLAUDE.md & SKILL.md)"]
58
+ CodexAdapter["OpenAI Codex Adapter\n(AGENTS.md)"]
59
+ CursorAdapter["Cursor Adapter\n(.cursor/rules/)"]
60
+ CopilotAdapter["Copilot Adapter\n(.github/copilot-instructions.md)"]
61
+ SectionMerger["Non-Destructive Section Merger\n(src/agents/shared.ts)"]
62
+ end
63
+
64
+ subgraph TasksSub["Task & Verification Engine"]
65
+ TaskRouter["Request Classifier\n(src/tasks/routing.ts)"]
66
+ TaskLifecycle["Task State Machine\n(src/tasks/task.ts)"]
67
+ GateEvaluator["evaluateGate()\n(src/tasks/task.ts)"]
68
+ SafetyClassifier["classifyCommand()\n(src/verification/safety.ts)"]
69
+ ScopeTracker["Scope & Baseline Tracker\n(src/verification/scope.ts)"]
70
+ end
71
+
72
+ subgraph IntegrationsSub["External Integration Manager"]
73
+ IntManager["Integration Manager\n(src/integrations/manager.ts)"]
74
+ GraphifyAdapter["Graphify Adapter\n(graphifyy PyPI)"]
75
+ AgentSkillsAdapter["Agent Skills Adapter\n(addyosmani/agent-skills)"]
76
+ PonytailAdapter["Ponytail Adapter\n(DietrichGebert/ponytail)"]
77
+ OmniRouteAdapter["OmniRoute Adapter\n(Observed optional)"]
78
+ end
79
+ end
80
+
81
+ subgraph Foundation_Layer["4. Core Foundation & Security"]
82
+ WorkspaceCore["Workspace Root & Paths\n(src/core/workspace.ts)"]
83
+ SecurityFiles["safeReadText() & Path Guard\n(src/security/files.ts)"]
84
+ SecretRedact["findSecrets() & redact()\n(src/security/redact.ts)"]
85
+ AtomicFs["atomicWriteJson() & Lockfile\n(src/utils/fs.ts, lock.ts)"]
86
+ Schemas["Data Contracts & Validation\n(src/config/schemas.ts)"]
87
+ end
88
+
89
+ CLI_Entry --> ArgParser
90
+ ArgParser --> CommandRouter
91
+ CommandRouter --> Service_Layer
92
+ CommandRouter --> TerminalRenderer
93
+
94
+ SvcInit --> WorkspaceCore
95
+ SvcAnalyze --> DiscoverySub
96
+ SvcAgent --> AgentsSub
97
+ SvcTask --> TasksSub
98
+ SvcIntegrations --> IntegrationsSub
99
+
100
+ DiscoverySub --> SecurityFiles
101
+ TasksSub --> SafetyClassifier
102
+ TasksSub --> ScopeTracker
103
+ AgentsSub --> SectionMerger
104
+ IntegrationsSub --> AtomicFs
105
+
106
+ SecurityFiles --> WorkspaceCore
107
+ AtomicFs --> Schemas
108
+ SecretRedact --> AtomicFs
109
+ ```
110
+
111
+ *Detailed Analysis*: [Chapter 2: System Architecture & Subsystem Model](./02-system-architecture.md)
112
+
113
+ ---
114
+
115
+ ## Diagram 2: CLI Startup and Command Dispatch Workflow
116
+
117
+ Traces the execution sequence from terminal command invocation to exit code:
118
+
119
+ ```mermaid
120
+ sequenceDiagram
121
+ autonumber
122
+ actor User as Developer / Agent
123
+ participant OS as Operating System / Shell
124
+ participant Main as CLI Entry (src/cli/main.ts)
125
+ participant Parser as Arg Parser (src/cli/args.ts)
126
+ participant Dispatcher as Dispatcher (src/cli/run.ts)
127
+ participant Service as Service Function (src/services/*)
128
+ participant Renderer as Renderer (src/cli/render.ts)
129
+
130
+ User->>OS: Runs "devworkspace analyze --cwd . --json"
131
+ OS->>Main: Launches node dist/cli/main.js
132
+ Note over Main: Hooks SIGINT & SIGTERM<br/>to run cleanups & release locks
133
+ Main->>Dispatcher: run(process.argv.slice(2))
134
+ Dispatcher->>Parser: parseCli(argv)
135
+ Note over Parser: Strict validation using node:util<br/>Rejects unknown flags immediately
136
+ Parser-->>Dispatcher: ParsedArgs { values, positionals }
137
+ Dispatcher->>Dispatcher: Resolve command alias ("tasks" -> "task list")
138
+ Dispatcher->>Dispatcher: Initialize Ctx (logger, styles, stdout/stderr, cwd)
139
+ Dispatcher->>Service: Call handler (e.g. analyzeWorkspace(ws, svc))
140
+ Service-->>Dispatcher: Returns structured result object
141
+ Dispatcher->>Renderer: Format output (JSON or styled ANSI/ASCII text)
142
+ Renderer-->>Main: Write to stdout / stderr
143
+ Main->>OS: Set process.exitCode (0, 1, 2, 3, or 130)
144
+ OS-->>User: Process terminates with output
145
+ ```
146
+
147
+ *Detailed Analysis*: [Chapter 4: Execution Flows & Lifecycles](./04-execution-flows.md#1-workflow-a-cli-startup-and-dispatch)
148
+
149
+ ---
150
+
151
+ ## Diagram 3: Project Analysis & Discovery Engine Workflow
152
+
153
+ Details the 3-phase repository analysis pipeline:
154
+
155
+ ```mermaid
156
+ flowchart TD
157
+ Start["devworkspace analyze"] --> CheckWs["Find .devworkspace/<br/>(src/core/workspace.ts)"]
158
+ CheckWs --> Lock["Acquire File Lock<br/>(.devworkspace/local/workspace.lock)"]
159
+
160
+ subgraph ScanningPhase["1. Bounded Filesystem Scan"]
161
+ Scan["scan.ts: readdirRecursive()<br/>• Max 10,000 files<br/>• Ignore node_modules, .git, dist<br/>• Detect symlinks (skip to prevent loops)"]
162
+ end
163
+
164
+ subgraph DetectionPhase["2. Deterministic Detection"]
165
+ DetectStack["detect.ts:<br/>• Language extensions (.ts, .py, .go)<br/>• Frameworks from manifests<br/>• Monorepo structure"]
166
+ DetectCommands["commands.ts:<br/>• Inspect scripts in package.json<br/>• Map typecheck, unit, integration, build<br/>• Record exact cwd per command"]
167
+ DetectDocs["docs.ts:<br/>• Identify READMEs, docs/, ADRs (max 25)"]
168
+ DetectEntry["entrypoints.ts:<br/>• Identify server.ts, workers, CLIs"]
169
+ DetectSens["files.ts:<br/>• Record names of .env files (never read content)"]
170
+ end
171
+
172
+ subgraph OutputPhase["3. State & Prompt Generation"]
173
+ WriteDiscovery[".devworkspace/analysis/discovery.json"]
174
+ WriteCommands[".devworkspace/context/commands.json"]
175
+ GenPrompt["prompts/onboarding.ts:<br/>Generate onboarding-prompt.md"]
176
+ ValidateReqs["prompts/requirements.ts:<br/>Validate prompt against 21 requirements"]
177
+ SaveFacts["knowledge/facts.ts:<br/>Record 10+ DETECTED facts in facts.json"]
178
+ end
179
+
180
+ Lock --> ScanningPhase
181
+ ScanningPhase --> DetectionPhase
182
+ DetectionPhase --> OutputPhase
183
+ OutputPhase --> ReleaseLock["Release File Lock"]
184
+ ReleaseLock --> Finish["Render Analysis Summary to stdout"]
185
+ ```
186
+
187
+ *Detailed Analysis*: [Chapter 4: Execution Flows & Lifecycles](./04-execution-flows.md#2-workflow-b-project-analysis-workflow)
188
+
189
+ ---
190
+
191
+ ## Diagram 4: Tool and Integration Ecosystem Map
192
+
193
+ Illustrates connections between internal DevWorkspace modules, Node.js built-ins, and external toolchains:
194
+
195
+ ```mermaid
196
+ flowchart LR
197
+ subgraph InternalModules["Internal DevWorkspace Modules"]
198
+ CLI["src/cli/"]
199
+ SvcAnal["src/services/analysis.ts"]
200
+ SvcAgent["src/services/agent.ts"]
201
+ SvcInt["src/services/integrations.ts"]
202
+ SvcVer["src/services/verify.ts"]
203
+ Sec["src/security/"]
204
+ end
205
+
206
+ subgraph NodeBuiltins["Node.js 20+ Built-in APIs"]
207
+ FS["node:fs / node:fs/promises"]
208
+ Path["node:path"]
209
+ Proc["node:child_process (spawnSync)"]
210
+ Crypto["node:crypto (createHash, randomUUID)"]
211
+ Util["node:util (parseArgs)"]
212
+ OS["node:os (tmpdir, platform)"]
213
+ end
214
+
215
+ subgraph ExternalAgents["Coding Agent Instruction Targets"]
216
+ ClaudeCode["Claude Code (CLAUDE.md)"]
217
+ Codex["OpenAI Codex / Antigravity (AGENTS.md)"]
218
+ Cursor["Cursor IDE (.cursor/rules/)"]
219
+ Copilot["GitHub Copilot (.github/copilot-instructions.md)"]
220
+ end
221
+
222
+ subgraph ExternalToolchains["External Subprocesses (Observed / Coordinated)"]
223
+ Git["git (git status, rev-parse, diff)"]
224
+ GraphifyCli["graphify (Python / pipx / uv)"]
225
+ ClaudeCli["claude (plugin list, plugin install)"]
226
+ SkillsCli["skills (npx skills add)"]
227
+ NodeExe["node (for Ponytail lifecycle hooks)"]
228
+ ProjectNPM["npm / pnpm / yarn (running contract tests)"]
229
+ end
230
+
231
+ CLI --> Util
232
+ CLI --> FS
233
+ SvcAnal --> FS
234
+ SvcAnal --> Path
235
+ SvcAgent --> ExternalAgents
236
+ SvcInt --> Proc
237
+ SvcInt --> GraphifyCli
238
+ SvcInt --> ClaudeCli
239
+ SvcInt --> SkillsCli
240
+ SvcInt --> NodeExe
241
+ SvcVer --> Git
242
+ SvcVer --> ProjectNPM
243
+ Sec --> Crypto
244
+ Sec --> Path
245
+ Sec --> FS
246
+ ```
247
+
248
+ *Detailed Analysis*: [Chapter 2: System Architecture & Subsystem Model](./02-system-architecture.md#4-diagram-4-tool-and-integration-map)
249
+
250
+ ---
251
+
252
+ ## Diagram 5: Agent Skills Lifecycle & Execution Flow
253
+
254
+ Details how external integrations are inspected, snapshotted, and installed safely:
255
+
256
+ ```mermaid
257
+ sequenceDiagram
258
+ autonumber
259
+ actor User as Developer / Agent
260
+ participant Svc as setupIntegrations()
261
+ participant Mgr as IntegrationManager (src/integrations/manager.ts)
262
+ participant Adapter as Adapter (Graphify / Agent Skills / Ponytail)
263
+ participant Exec as Process Runner (src/integrations/exec.ts)
264
+ participant Protect as Snapshot Guard (src/integrations/protect.ts)
265
+ participant FS as Local Filesystem
266
+
267
+ User->>Svc: devworkspace setup --integrations [--yes]
268
+ Svc->>Mgr: run(options)
269
+
270
+ loop For each adapter (Graphify, Agent Skills, Ponytail, OmniRoute)
271
+ Mgr->>Adapter: inspect(AdapterContext, deep=true)
272
+ Adapter->>Exec: which(toolName), run(tool --version)
273
+ Exec-->>Adapter: Tool status, version string
274
+ Adapter-->>Mgr: IntegrationReport { status: INSTALLED | NOT_INSTALLED | DEGRADED }
275
+
276
+ Mgr->>Adapter: plan(AdapterContext, targetScope)
277
+ Adapter-->>Mgr: PlanResult { steps, protectPaths, blockers }
278
+ end
279
+
280
+ alt Dry-Run or Missing --yes
281
+ Mgr-->>User: Output planned steps & require confirmation (Exit Code 2)
282
+ else User Confirmed (--yes)
283
+ loop For each planned step
284
+ Mgr->>Protect: Take snapshot of protectPaths (e.g. CLAUDE.md)
285
+ Mgr->>Exec: Run installation command (e.g. "graphify install --project")
286
+ Mgr->>Protect: Verify snapshot; rollback if user changes overwritten
287
+ Mgr->>Adapter: Re-inspect to verify successful installation
288
+ end
289
+ Mgr->>FS: Save state to .devworkspace/state/integrations.json
290
+ Mgr-->>User: Report outcomes (VERIFIED, RESTART_REQUIRED, or DEGRADED)
291
+ end
292
+ ```
293
+
294
+ *Detailed Analysis*: [Chapter 4: Execution Flows & Lifecycles](./04-execution-flows.md#3-workflow-c-agent-skills--integrations-lifecycle)
295
+
296
+ ---
297
+
298
+ ## Diagram 6: Build, Test & Deployment Pipeline
299
+
300
+ Traces the entire verification and publishing lifecycle:
301
+
302
+ ```mermaid
303
+ flowchart TD
304
+ subgraph Developer["Local Development"]
305
+ Source["TypeScript Source (src/)"]
306
+ Tests["Test Suites (tests/unit, integration, e2e)"]
307
+ Clean["scripts/clean.mjs\n(Purges dist/)"]
308
+ end
309
+
310
+ subgraph BuildPipeline["Compilation & Packaging"]
311
+ TSC["TypeScript Compiler (tsc -p tsconfig.build.json)\nES2022, NodeNext, Declarations (.d.ts), Maps (.js.map)"]
312
+ Pack["npm pack --ignore-scripts\n(Generates devworkspace-<version>.tgz)"]
313
+ end
314
+
315
+ subgraph TestGates["Quality & Verification Gates"]
316
+ Typecheck["npm run typecheck\n(Strict TS validation)"]
317
+ ESLint["npm run lint\n(ESLint flat config)"]
318
+ Vitest["npm run coverage\n(778 tests across Unit, Integration, E2E)"]
319
+ Audit["npm run audit:security\n(Production dependency audit)"]
320
+ ReleaseCheck["scripts/release-check.mjs\n(Hygiene, Semver, Docs, Tags, Clean Git)"]
321
+ Smoke["scripts/smoke.mjs\n(Tarball inspection & isolated CLI run)"]
322
+ end
323
+
324
+ subgraph CICD["GitHub Actions Automation"]
325
+ CIWorkflow[".github/workflows/ci.yml\n(Ubuntu, Windows, macOS on Node 20 & 22)"]
326
+ ReleaseWorkflow[".github/workflows/release.yml\n(Manual dispatch, OIDC Trusted Publishing)"]
327
+ end
328
+
329
+ subgraph Registry["Distribution"]
330
+ NPMRegistry["npm Registry (Public)\nhttps://www.npmjs.com/package/devworkspace"]
331
+ end
332
+
333
+ Source --> Clean
334
+ Clean --> TSC
335
+ TSC --> Pack
336
+ Source --> Typecheck
337
+ Source --> ESLint
338
+ Tests --> Vitest
339
+ Pack --> Smoke
340
+ Typecheck & ESLint & Vitest & Audit & Smoke --> ReleaseCheck
341
+
342
+ ReleaseCheck --> CIWorkflow
343
+ CIWorkflow --> ReleaseWorkflow
344
+ ReleaseWorkflow -->|"npm publish --access public (OIDC Token)"| NPMRegistry
345
+ ```
346
+
347
+ *Detailed Analysis*: [Chapter 8: Build, Test & Deployment Architecture](./08-build-test-deployment.md)
348
+
349
+ ---
350
+
351
+ ## Diagram 7: Repository Structure Map
352
+
353
+ Visualizes directory hierarchy and module organization:
354
+
355
+ ```mermaid
356
+ graph TD
357
+ Root["devworkspace/"]
358
+
359
+ subgraph Src["src/ (TypeScript Source Code)"]
360
+ CLI["cli/ - Entrypoints, argument parsing, command dispatch, and formatting"]
361
+ Services["services/ - Pure service orchestration layer (16 command handlers)"]
362
+ Discovery["discovery/ - Deterministic repository scanning and stack detection"]
363
+ Agents["agents/ - Multi-agent adapters (Claude, Codex, Cursor, Copilot)"]
364
+ Integrations["integrations/ - External tool management (Graphify, Skills, Ponytail)"]
365
+ Tasks["tasks/ - Task routing, state machines, and completion gates"]
366
+ Knowledge["knowledge/ - Facts engine, authority ranking, and staleness detection"]
367
+ Decisions["decisions/ - Architecture Decision Records (ADRs) management"]
368
+ Sessions["sessions/ - Compact engineering session handover logs"]
369
+ Verification["verification/ - Command safety checks and scope tracking"]
370
+ Security["security/ - Path traversal defense, symlink containment, secret redaction"]
371
+ Core["core/ - Workspace discovery, schema migrations, and versioning"]
372
+ Config["config/ - Type-safe data contracts and schema validators"]
373
+ Git["git/ - Read-only Git state and tracked file discovery"]
374
+ Prompts["prompts/ - Onboarding and refresh prompt generators and validators"]
375
+ Portability["portability/ - JSON export/import bundling and validation"]
376
+ Utils["utils/ - Atomic file operations, lockfiles, loggers, and cleanup"]
377
+ Errors["errors/ - Typed error hierarchy and exit code definitions"]
378
+ end
379
+
380
+ subgraph Scripts["scripts/ (Build & Release Automation)"]
381
+ Clean["clean.mjs - Build directory cleanup"]
382
+ ReleaseCheck["release-check.mjs - Pre-release quality gate"]
383
+ Smoke["smoke.mjs - Fresh-install smoke testing"]
384
+ Bench["bench.mjs - Performance and token usage benchmarking"]
385
+ end
386
+
387
+ subgraph Tests["tests/ (Automated Test Suites)"]
388
+ Unit["unit/ - 21 unit test suites for individual modules"]
389
+ Integration["integration/ - 5 integration suites testing full flows and shims"]
390
+ E2E["e2e/ - 2 end-to-end scenario suites testing real CLI execution"]
391
+ Helpers["helpers/ - Fake process runners and tool mocks"]
392
+ end
393
+
394
+ subgraph Docs["docs/ (Project Documentation)"]
395
+ UserDocs["User & Developer Guides (getting-started, architecture, security, etc.)"]
396
+ ReportDir["architecture-report/ - This comprehensive architecture documentation"]
397
+ ImplNotes["implementation/ - Internal design notes and historical ADRs"]
398
+ end
399
+
400
+ Root --> Src
401
+ Root --> Scripts
402
+ Root --> Tests
403
+ Root --> Docs
404
+ ```
405
+
406
+ *Detailed Analysis*: [Chapter 5: Codebase Map & Module Responsibilities](./05-codebase-map.md)
407
+
408
+ ---
409
+
410
+ ## Diagram 8: Feature Implementation Map
411
+
412
+ Visualizes feature status partitioning across implementation tiers:
413
+
414
+ ```mermaid
415
+ flowchart TD
416
+ subgraph FullyImplemented["🟢 Fully Implemented & Verified in Source"]
417
+ CoreInit["Workspace Init & Reset\n(src/services/init.ts, reset.ts)"]
418
+ DiscoveryScan["Deterministic Discovery Scanner\n(src/discovery/scan.ts, detect.ts)"]
419
+ TestingContract["Testing Contract Mapping\n(src/discovery/commands.ts)"]
420
+ TaskEngine["Task Lifecycle & Verification Gates\n(src/tasks/task.ts, routing.ts)"]
421
+ SafeExecution["Safe Task Run (ReadOnly Checks)\n(src/services/verify.ts)"]
422
+ FactsEngine["Knowledge Facts & Authority Ranks\n(src/knowledge/facts.ts)"]
423
+ ADRRecords["Architecture Decision Records (ADRs)\n(src/services/records.ts)"]
424
+ MultiAgentAdapters["Agent Adapters (Claude, Codex, Cursor, Copilot)\n(src/agents/*)"]
425
+ SecretsRedaction["Secrets Redaction & Symlink Containment\n(src/security/*)"]
426
+ PortabilityBundle["Import / Export Knowledge Bundles\n(src/services/portability.ts)"]
427
+ end
428
+
429
+ subgraph PartialOrGuarded["🟡 Partial / Guarded by Design"]
430
+ DBExecution["Service & DB-Touching Test Execution\n(src/verification/safety.ts: requires testenv declare)"]
431
+ DeepIntegrations["Integration Auto-Repair & Verification\n(src/integrations/manager.ts: requires --yes)"]
432
+ end
433
+
434
+ subgraph OptionalOrDelegated["🔵 Optional / Ecosystem-Delegated"]
435
+ GraphifyGraph["Graphify Graph Construction\n(src/integrations/adapters/graphify.ts: delegated to Claude Code /graphify .)"]
436
+ OmniRouteObs["OmniRoute Model Routing\n(src/integrations/adapters/omniroute.ts: observed on PATH only, never invoked)"]
437
+ end
438
+
439
+ subgraph UnverifiedOrPlanned["⚪ External / Unimplemented in Core"]
440
+ LiveTranscripts["Live Interactive Transcripts\n(Explicitly avoided: only summary handoffs stored)"]
441
+ NetworkTelemetry["Cloud Telemetry / Remote Analytics\n(Explicitly avoided: zero network calls)"]
442
+ end
443
+ ```
444
+
445
+ *Detailed Analysis*: [Chapter 10: Feature Implementation Status & Discrepancy Analysis](./10-feature-status.md)
446
+
@@ -27,7 +27,7 @@ The CLI contains no business logic. `src/index.ts` exports the services so a fut
27
27
  | `security/` | Sensitive-file rules, secret detection/redaction, safe reading |
28
28
  | `git/` | Porcelain parsing and state (no mutating Git commands anywhere) |
29
29
  | `integrations/` | Integration manager: one `IntegrationAdapter` per tool (observe, plan, verify), consent levels, file protection, state, runner abstraction (Windows shims, npx) |
30
- | `agents/` | `AgentAdapter` interface + the Claude adapter (managed `CLAUDE.md` block, skill) |
30
+ | `agents/` | `AgentAdapter` contract, shared section-merging engine, and concrete adapters for Claude Code, OpenAI Codex (`AGENTS.md`), Cursor (`.cursor/rules` and `.cursorrules`), and GitHub Copilot (`.github/copilot-instructions.md`) |
31
31
  | `prompts/` | Onboarding/refresh prompt builders and the behavioural requirement checker |
32
32
  | `portability/` | Export bundle format and hostile-input validation |
33
33
  | `utils/` | Atomic writes, locking, safe paths, subprocess runner, logger |
@@ -36,7 +36,7 @@ The CLI contains no business logic. `src/index.ts` exports the services so a fut
36
36
 
37
37
  - **Zero runtime dependencies.** Argument parsing uses `node:util`, validation is hand-written, hashing/locking use Node built-ins. Smaller supply-chain surface; dev-only tooling.
38
38
  - **Deterministic core, AI at the edges.** Everything DevWorkspace does itself is reproducible and testable. Reasoning is delegated to the agent through generated prompts, and the prompts are themselves tested against a requirement list (`prompts/requirements.ts`).
39
- - **Adapters at every external boundary.** Core code sees `IntegrationStatus` and `PlannedChange`, never Graphify internals or Claude paths. Adding Cursor/Codex means a new `AgentAdapter`.
39
+ - **Adapters at every external boundary.** Core code sees `IntegrationStatus` and `PlannedChange`, never external agent-specific paths. Coding agent adapters (Claude Code, OpenAI Codex, Cursor, GitHub Copilot) implement the common `AgentAdapter` contract.
40
40
  - **Single routing source.** `tasks/routing.ts` is the table from which the generated skill and `docs/routing.md` are derived.
41
41
  - **State is portable by default.** Anything machine-specific lives in `.devworkspace/local/`. Project identity is a UUID, paths are relative everywhere, and doctor flags absolute paths.
42
42
  - **Fail closed on the future.** Files with a newer `schemaVersion` are never modified; commands refuse with an upgrade hint.
@@ -1,6 +1,25 @@
1
1
  # Getting started
2
2
 
3
- ## 1. Set up
3
+ ## Quick Start (One Command)
4
+
5
+ ```bash
6
+ cd path/to/your/project
7
+ npx devworkspace setup
8
+ ```
9
+
10
+ `devworkspace setup` inspects your repository, initializes `.devworkspace/` non-destructively, discovers package verification commands, detects command-contract drift against manifests and directories, verifies feature knowledge, and displays a comprehensive health and readiness report with actionable next steps.
11
+
12
+ To also install and verify optional integrations (Graphify, Agent Skills, Ponytail), run:
13
+
14
+ ```bash
15
+ npx devworkspace setup --integrations --yes
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Step-by-Step Workflow
21
+
22
+ ### 1. Set up
4
23
 
5
24
  ```bash
6
25
  cd path/to/your/project
@@ -58,6 +77,24 @@ npx devworkspace doctor
58
77
 
59
78
  Ask Claude for what you want. See [routing](routing.md) for how requests are handled and [claude.md](claude.md) for what was installed. After meaningful work Claude records durable knowledge; you can inspect it any time with `devworkspace context`, and run `devworkspace refresh` after large changes (or after pulling) to catch stale knowledge.
60
79
 
80
+ ## Feature Map & Graph Navigation
81
+
82
+ Connect frontend entry points, backend routes, services, database tables, and tests into verifiable feature slices:
83
+
84
+ ```bash
85
+ devworkspace feature list
86
+ devworkspace feature show auth.login
87
+ devworkspace feature validate
88
+ devworkspace feature add --id sales.orders --name "Sales Orders" --entry src/pages/Orders.tsx --route src/routes/sales.ts --symbol OrderController
89
+ ```
90
+
91
+ Navigate relationships safely with bounded Graphify tracing:
92
+
93
+ ```bash
94
+ devworkspace graph status
95
+ devworkspace graph trace src/routes/sales.ts --depth 2
96
+ ```
97
+
61
98
  ## Start over
62
99
 
63
100
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devworkspace",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Project-local AI engineering workspace: deterministic repository discovery, portable project knowledge, tasks, decisions and verification gates for AI coding agents.",
5
5
  "type": "module",
6
6
  "bin": {