devworkspace 0.5.0 → 0.5.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 (384) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +57 -509
  3. package/dist/agents/claude/adapter.js +0 -1
  4. package/dist/agents/claude/content.js +0 -1
  5. package/dist/agents/codex/adapter.js +0 -1
  6. package/dist/agents/copilot/adapter.js +0 -1
  7. package/dist/agents/cursor/adapter.js +0 -1
  8. package/dist/agents/index.js +0 -1
  9. package/dist/agents/shared.js +0 -1
  10. package/dist/agents/types.js +0 -1
  11. package/dist/cli/args.d.ts +16 -0
  12. package/dist/cli/args.js +5 -1
  13. package/dist/cli/help.js +59 -17
  14. package/dist/cli/main.js +0 -1
  15. package/dist/cli/prompt.d.ts +15 -0
  16. package/dist/cli/prompt.js +113 -0
  17. package/dist/cli/render.d.ts +10 -0
  18. package/dist/cli/render.js +174 -4
  19. package/dist/cli/run.d.ts +3 -0
  20. package/dist/cli/run.js +366 -17
  21. package/dist/config/feature-gate.d.ts +15 -0
  22. package/dist/config/feature-gate.js +77 -0
  23. package/dist/config/feature-registry.d.ts +49 -0
  24. package/dist/config/feature-registry.js +451 -0
  25. package/dist/config/schemas.js +0 -1
  26. package/dist/config/settings.d.ts +54 -0
  27. package/dist/config/settings.js +293 -0
  28. package/dist/config/validate.js +0 -1
  29. package/dist/core/artifacts.js +0 -1
  30. package/dist/core/contracts.js +0 -1
  31. package/dist/core/migrations.js +0 -1
  32. package/dist/core/version.js +0 -1
  33. package/dist/core/versioned.js +0 -1
  34. package/dist/core/workspace.d.ts +1 -0
  35. package/dist/core/workspace.js +1 -1
  36. package/dist/decisions/decision.js +0 -1
  37. package/dist/discovery/cache.js +0 -1
  38. package/dist/discovery/commands.js +0 -1
  39. package/dist/discovery/detect.js +0 -1
  40. package/dist/discovery/docs.js +0 -1
  41. package/dist/discovery/entrypoints.js +0 -1
  42. package/dist/discovery/ignore.js +0 -1
  43. package/dist/discovery/scan.js +0 -1
  44. package/dist/discovery/types.js +0 -1
  45. package/dist/dx/dashboard.js +2 -1
  46. package/dist/dx/guidance.js +0 -1
  47. package/dist/dx/guided-setup.d.ts +102 -0
  48. package/dist/dx/guided-setup.js +508 -0
  49. package/dist/dx/index.js +0 -1
  50. package/dist/dx/onboarding.js +0 -1
  51. package/dist/dx/types.js +0 -1
  52. package/dist/errors/index.js +0 -1
  53. package/dist/features/schema.js +0 -1
  54. package/dist/features/types.js +0 -1
  55. package/dist/features/validate.js +0 -1
  56. package/dist/git/git.js +0 -1
  57. package/dist/index.d.ts +15 -5
  58. package/dist/index.js +10 -2
  59. package/dist/integrations/adapters/agent-skills.js +0 -1
  60. package/dist/integrations/adapters/claudePlugin.js +0 -1
  61. package/dist/integrations/adapters/graphify.js +0 -1
  62. package/dist/integrations/adapters/omniroute.js +0 -1
  63. package/dist/integrations/adapters/pluginSkill.js +0 -1
  64. package/dist/integrations/adapters/ponytail.js +0 -1
  65. package/dist/integrations/exec.js +0 -1
  66. package/dist/integrations/index.js +0 -1
  67. package/dist/integrations/manager.d.ts +2 -1
  68. package/dist/integrations/manager.js +22 -3
  69. package/dist/integrations/notices.js +0 -1
  70. package/dist/integrations/persistentPath.js +0 -1
  71. package/dist/integrations/protect.js +0 -1
  72. package/dist/integrations/state.js +0 -1
  73. package/dist/integrations/types.d.ts +1 -1
  74. package/dist/integrations/types.js +1 -1
  75. package/dist/intelligence/agents/profiles.js +0 -1
  76. package/dist/intelligence/agents/registry.js +0 -1
  77. package/dist/intelligence/agents/types.js +0 -1
  78. package/dist/intelligence/observability/tracer.js +0 -1
  79. package/dist/intelligence/observability/types.js +0 -1
  80. package/dist/intelligence/orchestration/engine.d.ts +21 -3
  81. package/dist/intelligence/orchestration/engine.js +486 -48
  82. package/dist/intelligence/orchestration/lock-manager.js +0 -1
  83. package/dist/intelligence/orchestration/store.js +0 -1
  84. package/dist/intelligence/orchestration/types.d.ts +40 -2
  85. package/dist/intelligence/orchestration/types.js +2 -3
  86. package/dist/intelligence/routing/matcher.js +0 -1
  87. package/dist/intelligence/routing/router.js +0 -1
  88. package/dist/intelligence/routing/types.js +0 -1
  89. package/dist/intelligence/runtime/adk/adapter.js +21 -33
  90. package/dist/intelligence/runtime/adk/detector.js +0 -1
  91. package/dist/intelligence/runtime/auth-provider.d.ts +63 -0
  92. package/dist/intelligence/runtime/auth-provider.js +201 -0
  93. package/dist/intelligence/runtime/boundary.d.ts +142 -0
  94. package/dist/intelligence/runtime/boundary.js +845 -0
  95. package/dist/intelligence/runtime/changes.d.ts +59 -0
  96. package/dist/intelligence/runtime/changes.js +362 -0
  97. package/dist/intelligence/runtime/external.d.ts +1 -0
  98. package/dist/intelligence/runtime/external.js +38 -61
  99. package/dist/intelligence/runtime/native.js +23 -56
  100. package/dist/intelligence/runtime/types.d.ts +91 -1
  101. package/dist/intelligence/runtime/types.js +11 -2
  102. package/dist/intelligence/security/audit.js +8 -2
  103. package/dist/intelligence/security/policy.js +0 -1
  104. package/dist/intelligence/security/types.d.ts +8 -0
  105. package/dist/intelligence/security/types.js +0 -1
  106. package/dist/intelligence/skills/builtins.js +0 -1
  107. package/dist/intelligence/skills/loader.js +0 -1
  108. package/dist/intelligence/skills/registry.js +0 -1
  109. package/dist/intelligence/skills/types.js +0 -1
  110. package/dist/intelligence/verification/engine.d.ts +30 -8
  111. package/dist/intelligence/verification/engine.js +126 -21
  112. package/dist/intelligence/verification/reviewer.d.ts +18 -2
  113. package/dist/intelligence/verification/reviewer.js +356 -4
  114. package/dist/intelligence/verification/types.d.ts +71 -0
  115. package/dist/intelligence/verification/types.js +0 -1
  116. package/dist/knowledge/facts.js +0 -1
  117. package/dist/mcp/protocol.js +0 -1
  118. package/dist/mcp/server.js +38 -2
  119. package/dist/mcp/setup.js +5 -2
  120. package/dist/mcp/tools.js +0 -1
  121. package/dist/mcp/types.js +0 -1
  122. package/dist/mcp/verify.js +0 -1
  123. package/dist/portability/bundle.js +0 -1
  124. package/dist/prompts/onboarding.js +0 -1
  125. package/dist/prompts/refresh.js +0 -1
  126. package/dist/prompts/requirements.js +0 -1
  127. package/dist/security/files.js +0 -1
  128. package/dist/security/redact.js +0 -1
  129. package/dist/services/agent.js +2 -1
  130. package/dist/services/analysis.js +0 -1
  131. package/dist/services/common.js +0 -1
  132. package/dist/services/doctor.js +13 -2
  133. package/dist/services/drift.js +0 -1
  134. package/dist/services/features.js +5 -1
  135. package/dist/services/graph.js +4 -1
  136. package/dist/services/init.js +0 -1
  137. package/dist/services/integrations.d.ts +2 -1
  138. package/dist/services/integrations.js +29 -6
  139. package/dist/services/intelligence.d.ts +2 -2
  140. package/dist/services/intelligence.js +38 -36
  141. package/dist/services/knowledge.js +0 -1
  142. package/dist/services/migrate.js +0 -1
  143. package/dist/services/modules.d.ts +85 -0
  144. package/dist/services/modules.js +313 -0
  145. package/dist/services/portability.js +0 -1
  146. package/dist/services/records.js +5 -1
  147. package/dist/services/refresh.js +0 -1
  148. package/dist/services/reset.js +0 -1
  149. package/dist/services/settings.d.ts +36 -0
  150. package/dist/services/settings.js +102 -0
  151. package/dist/services/setup.d.ts +4 -5
  152. package/dist/services/setup.js +40 -28
  153. package/dist/services/standards.js +10 -1
  154. package/dist/services/status.js +0 -1
  155. package/dist/services/taskContext.js +0 -1
  156. package/dist/services/tasks.js +9 -1
  157. package/dist/services/verify.js +7 -2
  158. package/dist/sessions/session.js +0 -1
  159. package/dist/standards/acquisition/ingest.js +0 -1
  160. package/dist/standards/applicability/engine.js +0 -1
  161. package/dist/standards/builtin/code-quality.js +0 -1
  162. package/dist/standards/builtin/database-safety.js +0 -1
  163. package/dist/standards/builtin/index.js +0 -1
  164. package/dist/standards/builtin/security-baseline.js +0 -1
  165. package/dist/standards/builtin/testing-contracts.js +0 -1
  166. package/dist/standards/builtin/undo-kit.js +0 -1
  167. package/dist/standards/config/config.js +0 -1
  168. package/dist/standards/distribution/cache.d.ts +1 -0
  169. package/dist/standards/distribution/cache.js +199 -186
  170. package/dist/standards/distribution/index.js +0 -1
  171. package/dist/standards/distribution/keys.js +0 -1
  172. package/dist/standards/distribution/package.js +6 -1
  173. package/dist/standards/distribution/server.js +0 -1
  174. package/dist/standards/distribution/sync.d.ts +7 -2
  175. package/dist/standards/distribution/sync.js +41 -9
  176. package/dist/standards/distribution/types.js +0 -1
  177. package/dist/standards/engine/compliance.js +0 -1
  178. package/dist/standards/engine/engine.js +0 -1
  179. package/dist/standards/engine/reporter.js +0 -1
  180. package/dist/standards/index.js +0 -1
  181. package/dist/standards/registry/registry.js +0 -1
  182. package/dist/standards/schema/types.js +0 -1
  183. package/dist/standards/schema/validate.js +0 -1
  184. package/dist/standards/templates/index.js +0 -1
  185. package/dist/standards/validators/database.js +0 -1
  186. package/dist/standards/validators/quality.js +0 -1
  187. package/dist/standards/validators/registry.js +0 -1
  188. package/dist/standards/validators/security.js +0 -1
  189. package/dist/standards/validators/testing.js +0 -1
  190. package/dist/standards/validators/types.js +0 -1
  191. package/dist/standards/validators/undo-kit.js +0 -1
  192. package/dist/tasks/routing.js +0 -1
  193. package/dist/tasks/task.js +0 -1
  194. package/dist/utils/cleanup.js +0 -1
  195. package/dist/utils/fs.js +0 -1
  196. package/dist/utils/lock.js +92 -49
  197. package/dist/utils/logger.js +0 -1
  198. package/dist/utils/paths.js +0 -1
  199. package/dist/utils/proc.d.ts +12 -0
  200. package/dist/utils/proc.js +106 -44
  201. package/dist/verification/safety.js +0 -1
  202. package/dist/verification/scope.js +0 -1
  203. package/docs/agents.md +15 -0
  204. package/docs/architecture/global-standards-architecture.md +287 -0
  205. package/docs/archive/global-standards/GLOBAL_STANDARDS_AUDIT.md +99 -0
  206. package/docs/archive/global-standards/GLOBAL_STANDARDS_FINAL_STATUS.md +138 -0
  207. package/docs/archive/global-standards/GLOBAL_STANDARDS_IMPLEMENTATION_PLAN.md +100 -0
  208. package/docs/archive/global-standards/GLOBAL_STANDARDS_INDEPENDENT_AUDIT.md +219 -0
  209. package/docs/archive/global-standards/GLOBAL_STANDARDS_SECURITY_REPORT.md +184 -0
  210. package/docs/configuration.md +67 -0
  211. package/docs/contributing.md +15 -5
  212. package/docs/development/EXECUTION_STATE.md +50 -0
  213. package/docs/features.md +80 -0
  214. package/docs/getting-started.md +69 -111
  215. package/docs/guides/global-standards-migration.md +100 -0
  216. package/docs/integrations.md +7 -0
  217. package/docs/mcp.md +13 -0
  218. package/docs/security/THIRD_PARTY_LICENSES.md +41 -0
  219. package/docs/security.md +8 -2
  220. package/docs/testing/FINAL_CORRECTION_AND_CLEANUP_REPORT.md +92 -0
  221. package/docs/testing/global-standards-real-project-tests.md +218 -0
  222. package/docs/testing/global-standards-test-report.md +89 -0
  223. package/docs/testing/global-standards-verification-matrix.md +174 -0
  224. package/docs/troubleshooting.md +3 -0
  225. package/package.json +1 -1
  226. package/dist/agents/claude/adapter.js.map +0 -1
  227. package/dist/agents/claude/content.js.map +0 -1
  228. package/dist/agents/codex/adapter.js.map +0 -1
  229. package/dist/agents/copilot/adapter.js.map +0 -1
  230. package/dist/agents/cursor/adapter.js.map +0 -1
  231. package/dist/agents/index.js.map +0 -1
  232. package/dist/agents/shared.js.map +0 -1
  233. package/dist/agents/types.js.map +0 -1
  234. package/dist/cli/args.js.map +0 -1
  235. package/dist/cli/help.js.map +0 -1
  236. package/dist/cli/main.js.map +0 -1
  237. package/dist/cli/render.js.map +0 -1
  238. package/dist/cli/run.js.map +0 -1
  239. package/dist/config/schemas.js.map +0 -1
  240. package/dist/config/validate.js.map +0 -1
  241. package/dist/core/artifacts.js.map +0 -1
  242. package/dist/core/contracts.js.map +0 -1
  243. package/dist/core/migrations.js.map +0 -1
  244. package/dist/core/version.js.map +0 -1
  245. package/dist/core/versioned.js.map +0 -1
  246. package/dist/core/workspace.js.map +0 -1
  247. package/dist/decisions/decision.js.map +0 -1
  248. package/dist/discovery/cache.js.map +0 -1
  249. package/dist/discovery/commands.js.map +0 -1
  250. package/dist/discovery/detect.js.map +0 -1
  251. package/dist/discovery/docs.js.map +0 -1
  252. package/dist/discovery/entrypoints.js.map +0 -1
  253. package/dist/discovery/ignore.js.map +0 -1
  254. package/dist/discovery/scan.js.map +0 -1
  255. package/dist/discovery/types.js.map +0 -1
  256. package/dist/dx/dashboard.js.map +0 -1
  257. package/dist/dx/guidance.js.map +0 -1
  258. package/dist/dx/index.js.map +0 -1
  259. package/dist/dx/onboarding.js.map +0 -1
  260. package/dist/dx/types.js.map +0 -1
  261. package/dist/errors/index.js.map +0 -1
  262. package/dist/features/schema.js.map +0 -1
  263. package/dist/features/types.js.map +0 -1
  264. package/dist/features/validate.js.map +0 -1
  265. package/dist/git/git.js.map +0 -1
  266. package/dist/index.js.map +0 -1
  267. package/dist/integrations/adapters/agent-skills.js.map +0 -1
  268. package/dist/integrations/adapters/claudePlugin.js.map +0 -1
  269. package/dist/integrations/adapters/graphify.js.map +0 -1
  270. package/dist/integrations/adapters/omniroute.js.map +0 -1
  271. package/dist/integrations/adapters/pluginSkill.js.map +0 -1
  272. package/dist/integrations/adapters/ponytail.js.map +0 -1
  273. package/dist/integrations/exec.js.map +0 -1
  274. package/dist/integrations/index.js.map +0 -1
  275. package/dist/integrations/manager.js.map +0 -1
  276. package/dist/integrations/notices.js.map +0 -1
  277. package/dist/integrations/persistentPath.js.map +0 -1
  278. package/dist/integrations/protect.js.map +0 -1
  279. package/dist/integrations/state.js.map +0 -1
  280. package/dist/integrations/types.js.map +0 -1
  281. package/dist/intelligence/agents/profiles.js.map +0 -1
  282. package/dist/intelligence/agents/registry.js.map +0 -1
  283. package/dist/intelligence/agents/types.js.map +0 -1
  284. package/dist/intelligence/observability/tracer.js.map +0 -1
  285. package/dist/intelligence/observability/types.js.map +0 -1
  286. package/dist/intelligence/orchestration/engine.js.map +0 -1
  287. package/dist/intelligence/orchestration/lock-manager.js.map +0 -1
  288. package/dist/intelligence/orchestration/store.js.map +0 -1
  289. package/dist/intelligence/orchestration/types.js.map +0 -1
  290. package/dist/intelligence/routing/matcher.js.map +0 -1
  291. package/dist/intelligence/routing/router.js.map +0 -1
  292. package/dist/intelligence/routing/types.js.map +0 -1
  293. package/dist/intelligence/runtime/adk/adapter.js.map +0 -1
  294. package/dist/intelligence/runtime/adk/detector.js.map +0 -1
  295. package/dist/intelligence/runtime/external.js.map +0 -1
  296. package/dist/intelligence/runtime/native.js.map +0 -1
  297. package/dist/intelligence/runtime/types.js.map +0 -1
  298. package/dist/intelligence/security/audit.js.map +0 -1
  299. package/dist/intelligence/security/policy.js.map +0 -1
  300. package/dist/intelligence/security/types.js.map +0 -1
  301. package/dist/intelligence/skills/builtins.js.map +0 -1
  302. package/dist/intelligence/skills/loader.js.map +0 -1
  303. package/dist/intelligence/skills/registry.js.map +0 -1
  304. package/dist/intelligence/skills/types.js.map +0 -1
  305. package/dist/intelligence/verification/engine.js.map +0 -1
  306. package/dist/intelligence/verification/reviewer.js.map +0 -1
  307. package/dist/intelligence/verification/types.js.map +0 -1
  308. package/dist/knowledge/facts.js.map +0 -1
  309. package/dist/mcp/protocol.js.map +0 -1
  310. package/dist/mcp/server.js.map +0 -1
  311. package/dist/mcp/setup.js.map +0 -1
  312. package/dist/mcp/tools.js.map +0 -1
  313. package/dist/mcp/types.js.map +0 -1
  314. package/dist/mcp/verify.js.map +0 -1
  315. package/dist/portability/bundle.js.map +0 -1
  316. package/dist/prompts/onboarding.js.map +0 -1
  317. package/dist/prompts/refresh.js.map +0 -1
  318. package/dist/prompts/requirements.js.map +0 -1
  319. package/dist/security/files.js.map +0 -1
  320. package/dist/security/redact.js.map +0 -1
  321. package/dist/services/agent.js.map +0 -1
  322. package/dist/services/analysis.js.map +0 -1
  323. package/dist/services/common.js.map +0 -1
  324. package/dist/services/doctor.js.map +0 -1
  325. package/dist/services/drift.js.map +0 -1
  326. package/dist/services/features.js.map +0 -1
  327. package/dist/services/graph.js.map +0 -1
  328. package/dist/services/init.js.map +0 -1
  329. package/dist/services/integrations.js.map +0 -1
  330. package/dist/services/intelligence.js.map +0 -1
  331. package/dist/services/knowledge.js.map +0 -1
  332. package/dist/services/migrate.js.map +0 -1
  333. package/dist/services/portability.js.map +0 -1
  334. package/dist/services/records.js.map +0 -1
  335. package/dist/services/refresh.js.map +0 -1
  336. package/dist/services/reset.js.map +0 -1
  337. package/dist/services/setup.js.map +0 -1
  338. package/dist/services/standards.js.map +0 -1
  339. package/dist/services/status.js.map +0 -1
  340. package/dist/services/taskContext.js.map +0 -1
  341. package/dist/services/tasks.js.map +0 -1
  342. package/dist/services/verify.js.map +0 -1
  343. package/dist/sessions/session.js.map +0 -1
  344. package/dist/standards/acquisition/ingest.js.map +0 -1
  345. package/dist/standards/applicability/engine.js.map +0 -1
  346. package/dist/standards/builtin/code-quality.js.map +0 -1
  347. package/dist/standards/builtin/database-safety.js.map +0 -1
  348. package/dist/standards/builtin/index.js.map +0 -1
  349. package/dist/standards/builtin/security-baseline.js.map +0 -1
  350. package/dist/standards/builtin/testing-contracts.js.map +0 -1
  351. package/dist/standards/builtin/undo-kit.js.map +0 -1
  352. package/dist/standards/config/config.js.map +0 -1
  353. package/dist/standards/distribution/cache.js.map +0 -1
  354. package/dist/standards/distribution/index.js.map +0 -1
  355. package/dist/standards/distribution/keys.js.map +0 -1
  356. package/dist/standards/distribution/package.js.map +0 -1
  357. package/dist/standards/distribution/server.js.map +0 -1
  358. package/dist/standards/distribution/sync.js.map +0 -1
  359. package/dist/standards/distribution/types.js.map +0 -1
  360. package/dist/standards/engine/compliance.js.map +0 -1
  361. package/dist/standards/engine/engine.js.map +0 -1
  362. package/dist/standards/engine/reporter.js.map +0 -1
  363. package/dist/standards/index.js.map +0 -1
  364. package/dist/standards/registry/registry.js.map +0 -1
  365. package/dist/standards/schema/types.js.map +0 -1
  366. package/dist/standards/schema/validate.js.map +0 -1
  367. package/dist/standards/templates/index.js.map +0 -1
  368. package/dist/standards/validators/database.js.map +0 -1
  369. package/dist/standards/validators/quality.js.map +0 -1
  370. package/dist/standards/validators/registry.js.map +0 -1
  371. package/dist/standards/validators/security.js.map +0 -1
  372. package/dist/standards/validators/testing.js.map +0 -1
  373. package/dist/standards/validators/types.js.map +0 -1
  374. package/dist/standards/validators/undo-kit.js.map +0 -1
  375. package/dist/tasks/routing.js.map +0 -1
  376. package/dist/tasks/task.js.map +0 -1
  377. package/dist/utils/cleanup.js.map +0 -1
  378. package/dist/utils/fs.js.map +0 -1
  379. package/dist/utils/lock.js.map +0 -1
  380. package/dist/utils/logger.js.map +0 -1
  381. package/dist/utils/paths.js.map +0 -1
  382. package/dist/utils/proc.js.map +0 -1
  383. package/dist/verification/safety.js.map +0 -1
  384. package/dist/verification/scope.js.map +0 -1
@@ -0,0 +1,451 @@
1
+ import { DevWorkspaceError } from '../errors/index.js';
2
+ export const SETUP_PRESETS = ['minimal', 'recommended', 'full', 'custom'];
3
+ export const FEATURE_REGISTRY = [
4
+ {
5
+ id: 'core.workspace',
6
+ name: 'Workspace & Identity',
7
+ description: 'Initialize, validate, migrate, export/import, and safely reset .devworkspace/.',
8
+ category: 'core',
9
+ availability: 'core',
10
+ defaultEnabled: true,
11
+ requires: [],
12
+ installKind: 'bundled',
13
+ dataPolicy: 'local-only',
14
+ canDisable: false,
15
+ preserveDataOnDisable: true,
16
+ entryPoints: ['init', 'status', 'doctor', 'migrate', 'export', 'import', 'reset', 'settings', 'modules'],
17
+ dataPaths: ['.devworkspace/project.json', '.devworkspace/settings.json', '.devworkspace/local/backups/'],
18
+ },
19
+ {
20
+ id: 'core.discovery',
21
+ name: 'Discovery & Basic Context',
22
+ description: 'Offline repository discovery, basic context retrieval, and test contract generation.',
23
+ category: 'core',
24
+ availability: 'core',
25
+ defaultEnabled: true,
26
+ requires: ['core.workspace'],
27
+ installKind: 'bundled',
28
+ dataPolicy: 'local-only',
29
+ canDisable: false,
30
+ preserveDataOnDisable: true,
31
+ entryPoints: ['analyze', 'refresh', 'context', 'fact', 'mcp:get_project_overview', 'mcp:get_task_context', 'mcp:get_file_context'],
32
+ dataPaths: ['.devworkspace/analysis/discovery.json', '.devworkspace/context/facts.json', '.devworkspace/context/commands.json'],
33
+ },
34
+ {
35
+ id: 'core.security',
36
+ name: 'Privacy, Security & Verification Truthfulness',
37
+ description: 'Secret redaction, path/symlink bounds, shell-less execution guards, and honest test verification.',
38
+ category: 'core',
39
+ availability: 'core',
40
+ defaultEnabled: true,
41
+ requires: ['core.workspace'],
42
+ installKind: 'bundled',
43
+ dataPolicy: 'local-only',
44
+ canDisable: false,
45
+ preserveDataOnDisable: true,
46
+ entryPoints: ['always-on'],
47
+ dataPaths: ['.devworkspace/orchestration/security-audit.jsonl'],
48
+ },
49
+ {
50
+ id: 'agent.mcp',
51
+ name: 'MCP Agent Connection',
52
+ description: 'Local stdio Model Context Protocol server and agent client config (.mcp.json, .codex/config.toml, Antigravity).',
53
+ category: 'agent',
54
+ availability: 'optional',
55
+ defaultEnabled: false,
56
+ requires: ['core.workspace', 'core.discovery', 'core.security'],
57
+ installKind: 'agent-config',
58
+ dataPolicy: 'local-only',
59
+ canDisable: true,
60
+ preserveDataOnDisable: true,
61
+ entryPoints: ['mcp serve', 'mcp setup', 'setup --agent'],
62
+ dataPaths: ['.mcp.json', '.codex/config.toml'],
63
+ configKeys: ['launcher', 'scope'],
64
+ },
65
+ {
66
+ id: 'agent.instructions',
67
+ name: 'Agent Instruction Files',
68
+ description: 'Managed Markdown rules and skills for Cursor, Copilot, Codex, and Claude Code.',
69
+ category: 'agent',
70
+ availability: 'optional',
71
+ defaultEnabled: false,
72
+ requires: ['core.workspace'],
73
+ installKind: 'agent-config',
74
+ dataPolicy: 'local-only',
75
+ canDisable: true,
76
+ preserveDataOnDisable: true,
77
+ entryPoints: ['agent install', 'agent list'],
78
+ dataPaths: ['CLAUDE.md', 'AGENTS.md', '.cursor/rules/', '.github/copilot-instructions.md'],
79
+ },
80
+ {
81
+ id: 'workflow.tasks',
82
+ name: 'Task & Verification Tracking',
83
+ description: 'Track multi-step engineering tasks, run verification checks, and enforce completion gates.',
84
+ category: 'workflow',
85
+ availability: 'optional',
86
+ defaultEnabled: true,
87
+ requires: ['core.workspace', 'core.discovery', 'core.security'],
88
+ installKind: 'workspace-data',
89
+ dataPolicy: 'local-only',
90
+ canDisable: true,
91
+ preserveDataOnDisable: true,
92
+ entryPoints: ['task', 'testenv'],
93
+ dataPaths: ['.devworkspace/tasks/active/', '.devworkspace/tasks/completed/', '.devworkspace/state/test-env.json'],
94
+ },
95
+ {
96
+ id: 'workflow.decisions',
97
+ name: 'Architecture Decisions & Sessions',
98
+ description: 'Record lightweight architecture decision records and session notes.',
99
+ category: 'workflow',
100
+ availability: 'optional',
101
+ defaultEnabled: true,
102
+ requires: ['core.workspace'],
103
+ installKind: 'workspace-data',
104
+ dataPolicy: 'local-only',
105
+ canDisable: true,
106
+ preserveDataOnDisable: true,
107
+ entryPoints: ['decision', 'session'],
108
+ dataPaths: ['.devworkspace/decisions/', '.devworkspace/sessions/'],
109
+ },
110
+ {
111
+ id: 'workflow.standards',
112
+ name: 'Engineering Standards',
113
+ description: 'Audit code quality, database, testing, and deployment hygiene against local engineering standards.',
114
+ category: 'workflow',
115
+ availability: 'optional',
116
+ defaultEnabled: false,
117
+ requires: ['core.workspace', 'core.security'],
118
+ installKind: 'bundled',
119
+ dataPolicy: 'local-only',
120
+ canDisable: true,
121
+ preserveDataOnDisable: true,
122
+ entryPoints: ['standards'],
123
+ dataPaths: ['.devworkspace/standards/config.json'],
124
+ configKeys: ['autoDetect'],
125
+ },
126
+ {
127
+ id: 'intelligence.features',
128
+ name: 'Feature Maps',
129
+ description: 'Map product features across frontend entry points, backend routes, services, models, and tests.',
130
+ category: 'intelligence',
131
+ availability: 'optional',
132
+ defaultEnabled: false,
133
+ requires: ['core.workspace', 'core.discovery'],
134
+ installKind: 'workspace-data',
135
+ dataPolicy: 'local-only',
136
+ canDisable: true,
137
+ preserveDataOnDisable: true,
138
+ entryPoints: ['feature'],
139
+ dataPaths: ['.devworkspace/context/features.json'],
140
+ },
141
+ {
142
+ id: 'intelligence.graph',
143
+ name: 'Offline Symbol Dependency Graph',
144
+ description: 'Generate and trace TypeScript/Python symbol call and import dependencies offline.',
145
+ category: 'intelligence',
146
+ availability: 'optional',
147
+ defaultEnabled: false,
148
+ requires: ['intelligence.features', 'core.security'],
149
+ installKind: 'bundled',
150
+ dataPolicy: 'local-only',
151
+ canDisable: true,
152
+ preserveDataOnDisable: true,
153
+ entryPoints: ['graph', 'mcp:trace_symbol_dependencies'],
154
+ dataPaths: ['.devworkspace/graph/graph.json'],
155
+ },
156
+ {
157
+ id: 'intelligence.orchestration',
158
+ name: 'Multi-Agent Orchestration',
159
+ description: 'Plan, cryptographically approve, and verify multi-stage agent execution pipelines.',
160
+ category: 'intelligence',
161
+ availability: 'optional',
162
+ defaultEnabled: false,
163
+ requires: ['core.workspace', 'core.security', 'workflow.tasks'],
164
+ installKind: 'bundled',
165
+ dataPolicy: 'local-only',
166
+ canDisable: true,
167
+ preserveDataOnDisable: true,
168
+ entryPoints: ['orchestrate', 'agents', 'skills', 'intelligence'],
169
+ dataPaths: ['.devworkspace/orchestration/'],
170
+ configKeys: ['maxRetries'],
171
+ },
172
+ {
173
+ id: 'dx.dashboard',
174
+ name: 'Local Accessible HTML Dashboard',
175
+ description: 'Generate an offline, CSP-locked HTML summary of workspace health, recommendations, and doctor checks.',
176
+ category: 'experience',
177
+ availability: 'optional',
178
+ defaultEnabled: false,
179
+ requires: ['core.workspace', 'core.discovery'],
180
+ installKind: 'bundled',
181
+ dataPolicy: 'local-only',
182
+ canDisable: true,
183
+ preserveDataOnDisable: true,
184
+ entryPoints: ['dashboard'],
185
+ dataPaths: ['.devworkspace/local/dashboard.html'],
186
+ },
187
+ {
188
+ id: 'integration.graphify',
189
+ name: 'Graphify Helper',
190
+ description: 'External structural knowledge-graph tool (optional third-party install; requires explicit consent).',
191
+ category: 'integration',
192
+ availability: 'optional',
193
+ defaultEnabled: false,
194
+ requires: ['core.workspace'],
195
+ prerequisites: ['Python 3.10+ or uv/pipx', 'Explicit install consent (--yes)'],
196
+ installKind: 'external-tool',
197
+ dataPolicy: 'external-tool-may-run',
198
+ canDisable: true,
199
+ preserveDataOnDisable: true,
200
+ entryPoints: ['setup --integrations --only graphify --yes', 'integrations status'],
201
+ dataPaths: ['.claude/skills/graphify/', '.devworkspace/state/integrations.json'],
202
+ },
203
+ {
204
+ id: 'integration.agent-skills',
205
+ name: 'Agent Skills Helper',
206
+ description: 'External engineering skill templates plugin (optional third-party install; requires explicit consent).',
207
+ category: 'integration',
208
+ availability: 'optional',
209
+ defaultEnabled: false,
210
+ requires: ['core.workspace'],
211
+ prerequisites: ['Claude Code CLI or npx', 'Explicit install consent (--yes)'],
212
+ installKind: 'external-tool',
213
+ dataPolicy: 'external-tool-may-run',
214
+ canDisable: true,
215
+ preserveDataOnDisable: true,
216
+ entryPoints: ['setup --integrations --only agent-skills --yes', 'integrations status'],
217
+ dataPaths: ['.claude/skills/', '.devworkspace/state/integrations.json'],
218
+ },
219
+ {
220
+ id: 'integration.ponytail',
221
+ name: 'Ponytail Helper',
222
+ description: 'External code-quality review plugin (optional third-party install; requires explicit consent).',
223
+ category: 'integration',
224
+ availability: 'optional',
225
+ defaultEnabled: false,
226
+ requires: ['core.workspace'],
227
+ prerequisites: ['Claude Code CLI', 'Explicit install consent (--yes)'],
228
+ installKind: 'external-tool',
229
+ dataPolicy: 'external-tool-may-run',
230
+ canDisable: true,
231
+ preserveDataOnDisable: true,
232
+ entryPoints: ['setup --integrations --only ponytail --yes', 'integrations status'],
233
+ dataPaths: ['.devworkspace/state/integrations.json'],
234
+ },
235
+ {
236
+ id: 'integration.omniroute',
237
+ name: 'OmniRoute Helper',
238
+ description: 'Experimental optional local model-router integration (explicit opt-in only).',
239
+ category: 'integration',
240
+ availability: 'experimental',
241
+ defaultEnabled: false,
242
+ requires: ['core.workspace'],
243
+ prerequisites: ['Local OmniRoute CLI', 'Explicit install consent (--yes)'],
244
+ installKind: 'external-tool',
245
+ dataPolicy: 'external-tool-may-run',
246
+ canDisable: true,
247
+ preserveDataOnDisable: true,
248
+ entryPoints: ['setup --integrations --only omniroute --yes', 'integrations status'],
249
+ dataPaths: ['.devworkspace/state/integrations.json'],
250
+ },
251
+ ];
252
+ export function getFeatureDefinition(id, defs = FEATURE_REGISTRY) {
253
+ return defs.find((d) => d.id === id);
254
+ }
255
+ /** Validate registry uniqueness, references, conflict symmetry, and acyclicity. */
256
+ export function validateFeatureRegistry(defs = FEATURE_REGISTRY) {
257
+ const byId = new Map();
258
+ for (const def of defs) {
259
+ if (!def.id || !def.id.trim()) {
260
+ throw new DevWorkspaceError('SCHEMA', 'Feature definition has empty id.');
261
+ }
262
+ if (byId.has(def.id)) {
263
+ throw new DevWorkspaceError('SCHEMA', `Duplicate feature definition ID "${def.id}".`);
264
+ }
265
+ byId.set(def.id, def);
266
+ }
267
+ for (const def of defs) {
268
+ for (const dep of def.requires) {
269
+ if (!byId.has(dep)) {
270
+ throw new DevWorkspaceError('SCHEMA', `Feature "${def.id}" requires unknown feature "${dep}".`);
271
+ }
272
+ if (dep === def.id) {
273
+ throw new DevWorkspaceError('SCHEMA', `Feature dependency cycle detected: ${def.id} -> ${def.id}`);
274
+ }
275
+ }
276
+ for (const conf of def.conflicts ?? []) {
277
+ if (!byId.has(conf)) {
278
+ throw new DevWorkspaceError('SCHEMA', `Feature "${def.id}" conflicts with unknown feature "${conf}".`);
279
+ }
280
+ if (conf === def.id) {
281
+ throw new DevWorkspaceError('SCHEMA', `Feature "${def.id}" cannot conflict with itself.`);
282
+ }
283
+ }
284
+ }
285
+ // DFS cycle detection across the full graph
286
+ const state = new Map();
287
+ const stack = [];
288
+ const visit = (id) => {
289
+ const st = state.get(id);
290
+ if (st === 'visited')
291
+ return;
292
+ if (st === 'visiting') {
293
+ const start = stack.indexOf(id);
294
+ const cycle = [...stack.slice(start), id].join(' -> ');
295
+ throw new DevWorkspaceError('SCHEMA', `Feature dependency cycle detected: ${cycle}`);
296
+ }
297
+ state.set(id, 'visiting');
298
+ stack.push(id);
299
+ const def = byId.get(id);
300
+ for (const dep of def.requires) {
301
+ visit(dep);
302
+ }
303
+ stack.pop();
304
+ state.set(id, 'visited');
305
+ };
306
+ for (const def of defs) {
307
+ visit(def.id);
308
+ }
309
+ }
310
+ /** Deterministic topological ordering where every dependency precedes its dependents. */
311
+ export function topologicalSortFeatures(ids, defs = FEATURE_REGISTRY) {
312
+ validateFeatureRegistry(defs);
313
+ const byId = new Map(defs.map((d) => [d.id, d]));
314
+ const included = new Set(ids);
315
+ for (const id of included) {
316
+ if (!byId.has(id)) {
317
+ throw new DevWorkspaceError('USAGE', `Unknown feature ID "${id}".`);
318
+ }
319
+ }
320
+ const visited = new Set();
321
+ const ordered = [];
322
+ const visit = (id) => {
323
+ if (visited.has(id) || !included.has(id))
324
+ return;
325
+ visited.add(id);
326
+ const def = byId.get(id);
327
+ for (const dep of def.requires) {
328
+ if (included.has(dep))
329
+ visit(dep);
330
+ }
331
+ ordered.push(id);
332
+ };
333
+ for (const id of [...included].sort()) {
334
+ visit(id);
335
+ }
336
+ return ordered;
337
+ }
338
+ /**
339
+ * Resolve requested enable/disable changes against dependencies, conflicts, and non-disableable core rules.
340
+ */
341
+ export function resolveFeatureSelectionGraph(opts) {
342
+ const defs = opts.defs ?? FEATURE_REGISTRY;
343
+ validateFeatureRegistry(defs);
344
+ const byId = new Map(defs.map((d) => [d.id, d]));
345
+ for (const id of [...(opts.requestedEnable ?? []), ...(opts.requestedDisable ?? []), ...(opts.currentEnabled ?? [])]) {
346
+ if (!byId.has(id)) {
347
+ throw new DevWorkspaceError('USAGE', `Unknown module/feature "${id}".`, {
348
+ hint: `Valid IDs: ${defs.map((d) => d.id).join(', ')}`,
349
+ });
350
+ }
351
+ }
352
+ for (const id of opts.requestedDisable ?? []) {
353
+ const def = byId.get(id);
354
+ if (!def.canDisable) {
355
+ throw new DevWorkspaceError('SECURITY', `Core capability "${id}" (${def.name}) is mandatory and cannot be disabled.`);
356
+ }
357
+ }
358
+ const nextEnabled = new Set(opts.currentEnabled ?? []);
359
+ for (const def of defs) {
360
+ if (!def.canDisable)
361
+ nextEnabled.add(def.id);
362
+ }
363
+ // Apply explicit disables
364
+ const autoDisabledDependents = [];
365
+ for (const id of opts.requestedDisable ?? []) {
366
+ nextEnabled.delete(id);
367
+ const dependents = defs.filter((d) => d.requires.includes(id) && nextEnabled.has(d.id) && !(opts.requestedDisable ?? []).includes(d.id));
368
+ if (dependents.length > 0) {
369
+ if (!opts.cascadeDisable) {
370
+ throw new DevWorkspaceError('USAGE', `Cannot disable "${id}" because enabled module(s) depend on it: ${dependents.map((d) => d.id).join(', ')}.`, { hint: `Disable dependent modules first or pass --force to disable them safely without deleting data.` });
371
+ }
372
+ const queue = [...dependents.map((d) => d.id)];
373
+ while (queue.length > 0) {
374
+ const depId = queue.shift();
375
+ if (!nextEnabled.has(depId))
376
+ continue;
377
+ const depDef = byId.get(depId);
378
+ if (!depDef.canDisable)
379
+ continue;
380
+ nextEnabled.delete(depId);
381
+ autoDisabledDependents.push(depId);
382
+ for (const child of defs) {
383
+ if (child.requires.includes(depId) && nextEnabled.has(child.id))
384
+ queue.push(child.id);
385
+ }
386
+ }
387
+ }
388
+ }
389
+ // Apply explicit enables + transitive dependency closure
390
+ const requestedSet = new Set(opts.requestedEnable ?? []);
391
+ const autoEnabledDependencies = [];
392
+ const enableQueue = [...(opts.requestedEnable ?? [])];
393
+ while (enableQueue.length > 0) {
394
+ const id = enableQueue.shift();
395
+ if ((opts.requestedDisable ?? []).includes(id)) {
396
+ throw new DevWorkspaceError('USAGE', `Conflicting request: "${id}" cannot be both enabled and disabled.`);
397
+ }
398
+ const def = byId.get(id);
399
+ if (!nextEnabled.has(id)) {
400
+ nextEnabled.add(id);
401
+ if (!requestedSet.has(id))
402
+ autoEnabledDependencies.push(id);
403
+ }
404
+ for (const reqId of def.requires) {
405
+ if (!nextEnabled.has(reqId)) {
406
+ if ((opts.requestedDisable ?? []).includes(reqId)) {
407
+ throw new DevWorkspaceError('USAGE', `Cannot disable "${reqId}" because enabled module "${id}" requires it.`);
408
+ }
409
+ enableQueue.push(reqId);
410
+ }
411
+ }
412
+ }
413
+ // Symmetric conflict detection
414
+ for (const id of nextEnabled) {
415
+ const def = byId.get(id);
416
+ for (const conflictId of def.conflicts ?? []) {
417
+ if (nextEnabled.has(conflictId)) {
418
+ throw new DevWorkspaceError('USAGE', `Conflicting modules selected: "${id}" conflicts with "${conflictId}".`);
419
+ }
420
+ }
421
+ }
422
+ const orderedEnabled = topologicalSortFeatures([...nextEnabled], defs);
423
+ const disabled = defs.map((d) => d.id).filter((id) => !nextEnabled.has(id));
424
+ const disableOrder = [...autoDisabledDependents, ...(opts.requestedDisable ?? [])].filter((v, i, a) => a.indexOf(v) === i);
425
+ return {
426
+ enabled: orderedEnabled,
427
+ disabled,
428
+ autoEnabledDependencies: [...new Set(autoEnabledDependencies)],
429
+ autoDisabledDependents: [...new Set(autoDisabledDependents)],
430
+ disableOrder,
431
+ };
432
+ }
433
+ /** Deterministically derive built-in preset module lists from the authoritative registry. */
434
+ export function presetFeaturesFromRegistry(preset) {
435
+ if (preset === 'minimal') {
436
+ return topologicalSortFeatures(FEATURE_REGISTRY.filter((f) => !f.canDisable).map((f) => f.id));
437
+ }
438
+ if (preset === 'recommended') {
439
+ return resolveFeatureSelectionGraph({
440
+ requestedEnable: ['workflow.tasks', 'workflow.decisions'],
441
+ }).enabled;
442
+ }
443
+ // Full enables all bundled/workspace built-in optional capabilities; external integrations remain opt-in
444
+ return resolveFeatureSelectionGraph({
445
+ requestedEnable: FEATURE_REGISTRY
446
+ .filter((f) => f.category !== 'integration' && f.category !== 'agent')
447
+ .map((f) => f.id),
448
+ }).enabled;
449
+ }
450
+ // Validate built-in registry integrity on module initialization
451
+ validateFeatureRegistry(FEATURE_REGISTRY);
@@ -98,4 +98,3 @@ export function validateAnalysisState(v, file = 'analysis.json') {
98
98
  c.at_('discoveryHash').str(o.discoveryHash, { max: 100 });
99
99
  return o;
100
100
  }
101
- //# sourceMappingURL=schemas.js.map
@@ -0,0 +1,54 @@
1
+ import { type Ws } from '../core/workspace.js';
2
+ import { SETUP_PRESETS, type SetupPreset } from './feature-registry.js';
3
+ export { SETUP_PRESETS, type SetupPreset };
4
+ export declare const SETTINGS_SCHEMA_VERSION = 1;
5
+ export declare const SETUP_AGENT_CHOICES: readonly ["auto", "claude-code", "codex", "cursor", "copilot", "antigravity", "all", "none"];
6
+ export type SetupAgentChoice = (typeof SETUP_AGENT_CHOICES)[number];
7
+ export declare const CORE_FEATURE_IDS: readonly ["core.workspace", "core.discovery", "core.security"];
8
+ export declare const PRESET_DESCRIPTIONS: Record<SetupPreset, {
9
+ title: string;
10
+ summary: string;
11
+ }>;
12
+ export declare const PRESET_DEFAULT_FEATURES: Record<Exclude<SetupPreset, 'custom'>, string[]>;
13
+ export interface WorkspaceSettings {
14
+ schemaVersion: number;
15
+ preset: SetupPreset;
16
+ agent: {
17
+ selected: string | null;
18
+ method: 'mcp' | 'instructions' | 'both' | 'none';
19
+ scope: 'project' | 'user';
20
+ };
21
+ enabledFeatures: string[];
22
+ disabledFeatures: string[];
23
+ integrationsConsented: string[];
24
+ featureConfig: Record<string, Record<string, string | number | boolean>>;
25
+ updatedAt: string;
26
+ source: 'wizard' | 'cli' | 'migration' | 'default';
27
+ }
28
+ export declare function validateWorkspaceSettings(v: unknown, file?: string): WorkspaceSettings;
29
+ export declare function defaultSettingsForPreset(preset: SetupPreset, opts?: {
30
+ agentSelected?: string | null;
31
+ agentMethod?: 'mcp' | 'instructions' | 'both' | 'none';
32
+ scope?: 'project' | 'user';
33
+ integrationsConsented?: string[];
34
+ customFeatures?: string[];
35
+ source?: WorkspaceSettings['source'];
36
+ updatedAt?: string;
37
+ }): WorkspaceSettings;
38
+ /** Infer non-destructive defaults for an existing workspace created before settings.json existed. */
39
+ export declare function inferLegacyWorkspaceSettings(ws: Ws): Promise<WorkspaceSettings>;
40
+ export interface LoadedSettingsResult {
41
+ settings: WorkspaceSettings;
42
+ persisted: boolean;
43
+ migratedFromLegacy: boolean;
44
+ recoveryWarning?: string;
45
+ }
46
+ /** Strictly load and validate .devworkspace/settings.json, failing closed if persisted settings are invalid. */
47
+ export declare function loadWorkspaceSettingsStrict(ws: Ws): Promise<{
48
+ settings: WorkspaceSettings;
49
+ persisted: boolean;
50
+ migratedFromLegacy: boolean;
51
+ }>;
52
+ /** Load .devworkspace/settings.json safely for inspection without overwriting malformed user data. */
53
+ export declare function loadWorkspaceSettingsSafe(ws: Ws): Promise<LoadedSettingsResult>;
54
+ export declare function saveWorkspaceSettings(ws: Ws, next: WorkspaceSettings): Promise<void>;