superdev-cli 0.1.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 (182) hide show
  1. package/.claude-plugin/marketplace.json +33 -0
  2. package/.claude-plugin/plugin.json +21 -0
  3. package/.codex-plugin/plugin.json +27 -0
  4. package/CODE_OF_CONDUCT.md +109 -0
  5. package/CONTRIBUTING.md +205 -0
  6. package/LICENSE +202 -0
  7. package/NOTICE +11 -0
  8. package/README.md +1051 -0
  9. package/SECURITY.md +135 -0
  10. package/THIRD-PARTY-NOTICES.md +253 -0
  11. package/hooks/hooks.json +61 -0
  12. package/hooks/run.mjs +88 -0
  13. package/package.json +65 -0
  14. package/references/confidentiality.md +48 -0
  15. package/references/evidence-and-risk.md +73 -0
  16. package/references/operating-model.md +105 -0
  17. package/references/platform-capabilities.md +51 -0
  18. package/references/project-record.md +91 -0
  19. package/references/provider-contracts.md +102 -0
  20. package/scripts/doctor/doctor.mjs +539 -0
  21. package/scripts/privacy/scan-history.mjs +163 -0
  22. package/scripts/privacy/scan.mjs +368 -0
  23. package/scripts/validate/README.md +94 -0
  24. package/scripts/validate/common.mjs +149 -0
  25. package/scripts/validate/data-model.mjs +225 -0
  26. package/scripts/validate/dependencies.mjs +69 -0
  27. package/scripts/validate/docs-templates.mjs +99 -0
  28. package/scripts/validate/footprint.mjs +78 -0
  29. package/scripts/validate/imports.mjs +61 -0
  30. package/scripts/validate/manifests.mjs +173 -0
  31. package/scripts/validate/markdown.mjs +123 -0
  32. package/scripts/validate/migrations.mjs +187 -0
  33. package/scripts/validate/no-tests.mjs +136 -0
  34. package/scripts/validate/privacy.mjs +115 -0
  35. package/scripts/validate/record-links.mjs +127 -0
  36. package/scripts/validate/skill-commands.mjs +190 -0
  37. package/scripts/validate/skills.mjs +112 -0
  38. package/scripts/validate/specification.mjs +88 -0
  39. package/scripts/validate/style.mjs +78 -0
  40. package/scripts/validate/validate-all.mjs +175 -0
  41. package/skills/debug/SKILL.md +68 -0
  42. package/skills/decision/SKILL.md +99 -0
  43. package/skills/docs/SKILL.md +86 -0
  44. package/skills/docs/assets/fragments/api/events.md +14 -0
  45. package/skills/docs/assets/fragments/api/graphql.md +14 -0
  46. package/skills/docs/assets/fragments/api/local-only.md +13 -0
  47. package/skills/docs/assets/fragments/api/rest.md +13 -0
  48. package/skills/docs/assets/fragments/api/rpc.md +13 -0
  49. package/skills/docs/assets/fragments/async/event-bus.md +13 -0
  50. package/skills/docs/assets/fragments/async/none.md +11 -0
  51. package/skills/docs/assets/fragments/async/platform-jobs.md +13 -0
  52. package/skills/docs/assets/fragments/async/queue.md +13 -0
  53. package/skills/docs/assets/fragments/async/scheduler.md +13 -0
  54. package/skills/docs/assets/fragments/auth/detected-provider.md +15 -0
  55. package/skills/docs/assets/fragments/auth/neutral-base.md +14 -0
  56. package/skills/docs/assets/fragments/data/document.md +13 -0
  57. package/skills/docs/assets/fragments/data/external-saas.md +13 -0
  58. package/skills/docs/assets/fragments/data/key-value.md +13 -0
  59. package/skills/docs/assets/fragments/data/none.md +12 -0
  60. package/skills/docs/assets/fragments/data/sql-orm.md +13 -0
  61. package/skills/docs/assets/fragments/data/sql-plain.md +13 -0
  62. package/skills/docs/assets/fragments/env/conventional.md +13 -0
  63. package/skills/docs/assets/fragments/env/envx.md +13 -0
  64. package/skills/docs/assets/fragments/env/managed-platform.md +13 -0
  65. package/skills/docs/assets/fragments/env/none.md +11 -0
  66. package/skills/docs/assets/fragments/ui/api-only.md +13 -0
  67. package/skills/docs/assets/fragments/ui/cli.md +14 -0
  68. package/skills/docs/assets/fragments/ui/desktop.md +14 -0
  69. package/skills/docs/assets/fragments/ui/mobile.md +14 -0
  70. package/skills/docs/assets/fragments/ui/web.md +14 -0
  71. package/skills/docs/assets/templates/adr.md +62 -0
  72. package/skills/docs/assets/templates/api.md +30 -0
  73. package/skills/docs/assets/templates/architecture.md +52 -0
  74. package/skills/docs/assets/templates/change-impact-drift-report.md +29 -0
  75. package/skills/docs/assets/templates/compliance.md +29 -0
  76. package/skills/docs/assets/templates/data-schema.md +43 -0
  77. package/skills/docs/assets/templates/feature.md +43 -0
  78. package/skills/docs/assets/templates/foundations.md +55 -0
  79. package/skills/docs/assets/templates/jobs-webhooks.md +36 -0
  80. package/skills/docs/assets/templates/module-inventory.md +19 -0
  81. package/skills/docs/assets/templates/module.md +50 -0
  82. package/skills/docs/assets/templates/nfr.md +22 -0
  83. package/skills/docs/assets/templates/observability.md +28 -0
  84. package/skills/docs/assets/templates/pages-ui-actions.md +47 -0
  85. package/skills/docs/assets/templates/project-summary.md +44 -0
  86. package/skills/docs/assets/templates/roles-permissions.md +26 -0
  87. package/skills/docs/assets/templates/test-plan.md +23 -0
  88. package/skills/docs/assets/templates/workflow-state-machine.md +43 -0
  89. package/skills/docs/references/adr-authoring.md +24 -0
  90. package/skills/docs/references/apis-and-data.md +23 -0
  91. package/skills/docs/references/capability-fragments.md +25 -0
  92. package/skills/docs/references/change-tracking.md +62 -0
  93. package/skills/docs/references/diagrams.md +31 -0
  94. package/skills/docs/references/discovery.md +59 -0
  95. package/skills/docs/references/edge-cases.md +45 -0
  96. package/skills/docs/references/foundations-modules.md +18 -0
  97. package/skills/docs/references/ingestion.md +52 -0
  98. package/skills/docs/references/initialize-adopt.md +25 -0
  99. package/skills/docs/references/module-decomposition.md +38 -0
  100. package/skills/docs/references/profiles.md +60 -0
  101. package/skills/docs/references/quality-attributes.md +27 -0
  102. package/skills/docs/references/reverse-engineer.md +21 -0
  103. package/skills/docs/references/spec-depths.md +31 -0
  104. package/skills/docs/references/summarize.md +18 -0
  105. package/skills/docs/references/surfaces-and-actions.md +24 -0
  106. package/skills/docs/references/validation.md +47 -0
  107. package/skills/docs/references/workflows-and-jobs.md +25 -0
  108. package/skills/docs/scripts/ingest.mjs +984 -0
  109. package/skills/docs/scripts/profile-detect.mjs +299 -0
  110. package/skills/docs/scripts/screen.mjs +96 -0
  111. package/skills/docs/scripts/template-lint.mjs +143 -0
  112. package/skills/docs/scripts/validate-docs.mjs +363 -0
  113. package/skills/doctor/SKILL.md +167 -0
  114. package/skills/feature/SKILL.md +132 -0
  115. package/skills/init/SKILL.md +137 -0
  116. package/skills/project/SKILL.md +261 -0
  117. package/skills/project/references/commands.md +213 -0
  118. package/skills/resume/SKILL.md +79 -0
  119. package/skills/review/SKILL.md +91 -0
  120. package/skills/status/SKILL.md +85 -0
  121. package/skills/task/SKILL.md +183 -0
  122. package/src/cli/product-map.mjs +468 -0
  123. package/src/cli/render.mjs +544 -0
  124. package/src/cli.mjs +2774 -0
  125. package/src/cloud/crypto.mjs +118 -0
  126. package/src/cloud/merge.mjs +186 -0
  127. package/src/cloud/policy.mjs +115 -0
  128. package/src/cloud/sync.mjs +512 -0
  129. package/src/cloud/transport.mjs +116 -0
  130. package/src/db/connect.mjs +189 -0
  131. package/src/db/maintenance.mjs +419 -0
  132. package/src/db/migrate.mjs +188 -0
  133. package/src/db/migrations/001_initial.sql +1024 -0
  134. package/src/db/migrations/002_docs_coverage.sql +126 -0
  135. package/src/db/migrations/003_memory_retrieval_and_integrity.sql +168 -0
  136. package/src/db/migrations/004_task_categories.sql +59 -0
  137. package/src/db/migrations/005_executable_evidence.sql +32 -0
  138. package/src/db/migrations/006_module_and_feature_boundaries.sql +27 -0
  139. package/src/db/migrations/007_drop_redundant_module_users.sql +13 -0
  140. package/src/db/migrations/008_changes_assumptions_test_plans_api_services.sql +166 -0
  141. package/src/db/migrations/009_retired_documents.sql +54 -0
  142. package/src/db/migrations/010_test_plan_evidence.sql +20 -0
  143. package/src/db/migrations/011_criterion_waiver.sql +13 -0
  144. package/src/db/migrations/012_synchronization.sql +56 -0
  145. package/src/db/store.mjs +327 -0
  146. package/src/decisions/record.mjs +167 -0
  147. package/src/docs/proposals.mjs +871 -0
  148. package/src/docs/render.mjs +1424 -0
  149. package/src/docs/templates.mjs +1281 -0
  150. package/src/features/acceptance.mjs +315 -0
  151. package/src/features/specify.mjs +248 -0
  152. package/src/init/discovery.mjs +901 -0
  153. package/src/init/index.mjs +784 -0
  154. package/src/init/questions.mjs +562 -0
  155. package/src/memory/benchmark.mjs +171 -0
  156. package/src/memory/capture.mjs +135 -0
  157. package/src/memory/consolidate.mjs +255 -0
  158. package/src/memory/index.mjs +810 -0
  159. package/src/model/ids.mjs +185 -0
  160. package/src/model/screening.mjs +150 -0
  161. package/src/model/toolkit.mjs +258 -0
  162. package/src/model/vocabulary.mjs +190 -0
  163. package/src/product/assumptions.mjs +120 -0
  164. package/src/product/changes.mjs +180 -0
  165. package/src/product/test-plans.mjs +183 -0
  166. package/src/progress/index.mjs +1364 -0
  167. package/src/runtime/harness.mjs +264 -0
  168. package/src/runtime/hooks.mjs +1021 -0
  169. package/src/runtime/identity.mjs +305 -0
  170. package/src/runtime/resume.mjs +343 -0
  171. package/src/runtime/session.mjs +679 -0
  172. package/src/runtime/version.mjs +315 -0
  173. package/src/service/assets/control-center.html +206 -0
  174. package/src/service/assets/control-center.manifest.json +7 -0
  175. package/src/service/manage.mjs +542 -0
  176. package/src/service/mutations.mjs +860 -0
  177. package/src/service/read-model.mjs +1557 -0
  178. package/src/service/server.mjs +783 -0
  179. package/src/tasks/categories.mjs +154 -0
  180. package/src/tasks/derive.mjs +977 -0
  181. package/src/tasks/lifecycle.mjs +830 -0
  182. package/src/verify/index.mjs +236 -0
package/SECURITY.md ADDED
@@ -0,0 +1,135 @@
1
+ # Security
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ Use GitHub's private vulnerability reporting on this repository:
6
+ **Security > Report a vulnerability**, at
7
+ https://github.com/superdev-ai/superdev/security/advisories/new
8
+
9
+ That channel is private between you and the maintainer, which is what makes a
10
+ report safe before a fix exists. **Please do not open a public issue for a
11
+ security problem**, and do not describe one in a pull request, a discussion or a
12
+ fork, because there is no coordinated disclosure process running alongside it to
13
+ contain a public report.
14
+
15
+ If private reporting is unavailable to you for any reason, open a public issue
16
+ saying only that you have a security report and asking for a private channel.
17
+ Say nothing about the problem itself in it.
18
+
19
+ **What to expect, stated honestly.** This is maintained by one person and nobody
20
+ is on rota, so no response time is promised. What is promised is that a report is
21
+ read, that you are told what was concluded, and that you are credited in the fix
22
+ unless you ask not to be.
23
+
24
+ **Supported versions.** The latest released version only. There is no long-term
25
+ support branch and no backporting: a fix ships as a new release of
26
+ `superdev-cli` and a new plugin tag, which share one version number.
27
+
28
+ | Version | Supported |
29
+ |---|---|
30
+ | Latest release | Yes |
31
+ | Anything older | No, update first |
32
+
33
+ ## What Superdev is not
34
+
35
+ Superdev is a development orchestrator, not a security sandbox, and does not try
36
+ to be one. It runs inside an agent harness that already has file system access
37
+ and the ability to run commands. Destructive, outward-facing and irreversible
38
+ actions are governed by that harness's permission model, plus explicit
39
+ confirmation in the skills. If your harness is configured to approve everything,
40
+ Superdev does not add a second line of defence.
41
+
42
+ Treat the project database and the generated documentation as trusted only as
43
+ far as you trust whoever wrote to them.
44
+
45
+ ## The local service
46
+
47
+ The control center is served by one local process, started by the CLI and never
48
+ run separately.
49
+
50
+ - It binds to `127.0.0.1` on port 4317 by default.
51
+ - A request that reaches the service under a name that is not loopback is
52
+ refused with `E_FOREIGN_HOST`. That check runs ahead of every route, reads and
53
+ the event stream included, and it is what defeats DNS rebinding, where an
54
+ attacker-controlled name resolves to `127.0.0.1`.
55
+ - Any `/api/` request that is not same-origin is refused with `E_CROSS_ORIGIN`.
56
+ That covers reads, not only writes, which is what stops a page on another
57
+ origin reading your project through the browser. Verified: a request to
58
+ `/api/overview` carrying a foreign `Origin` header returns 403.
59
+ - `/health` returns an instance token so the process manager can confirm it is
60
+ talking to its own service rather than to something else that took the port.
61
+ The token is masked in text output and appears only in `--json`.
62
+
63
+ ## The write surface
64
+
65
+ The browser cannot send SQL, a shell command or a file path. Every write goes
66
+ through one endpoint, `POST /api/mutations`, taking `{ action, payload }`
67
+ against an allowlist of 22 named actions. There is no generic query endpoint and
68
+ no path parameter that reaches the file system.
69
+
70
+ The HTTP surface is fixed and small: ten read routes in a table, two resolved in
71
+ the server, `/health`, `/api/events`, `/api/mutations`, and `GET` or `HEAD` on
72
+ `/` for the interface itself.
73
+
74
+ ## History that cannot be quietly rewritten
75
+
76
+ Some tables are append-only, enforced by database triggers rather than by
77
+ convention: `activity_events`, `decision_transitions` and `status_history` each
78
+ raise `E_APPEND_ONLY` on update and on delete. Decision transitions are
79
+ hash-chained, each row storing a sha256 over the previous hash, the sequence,
80
+ the from and to status and the timestamp, so a rewritten transition breaks the
81
+ chain visibly.
82
+
83
+ This makes tampering detectable. It does not make it impossible: the database is
84
+ an ordinary SQLite file and anyone with write access to the disk can replace it.
85
+
86
+ ## Installing providers
87
+
88
+ Superdev never installs anything implicitly. `scripts/doctor/doctor.mjs plan`
89
+ computes a sha256 `planId` over the exact commands it intends to run, and
90
+ `apply` refuses unless both `--plan-id` and `--consent` are supplied and the
91
+ recomputed id still matches. Commands are executed as argument arrays, never
92
+ through a shell. A command containing shell metacharacters is rejected, as is
93
+ one carrying a blanket flag such as `--all`, `-y` or `--yes`.
94
+
95
+ ## Data leaving the machine
96
+
97
+ Superdev's own code makes no outbound network request. The only network module
98
+ imported anywhere under `src/` or `scripts/` is `node:http`, used for the
99
+ loopback server and the client that talks to it. There is no telemetry, no
100
+ analytics and no crash reporting. The committed control center bundle fetches
101
+ only `/api/` paths.
102
+
103
+ Two things do reach the network, and neither is Superdev sending your data:
104
+ `npm install` fetches the runtime dependency from the public npm registry once,
105
+ and a consented provider install runs that provider's own installer.
106
+
107
+ The agent harness Superdev runs inside is a separate program with its own
108
+ network behaviour. Superdev neither controls nor observes it.
109
+
110
+ ## Content screening
111
+
112
+ Content is screened at the storage boundary, in `src/model/screening.mjs`, so
113
+ certain shapes never reach the database: secret-shaped strings, absolute home
114
+ paths, em dashes, emoji and model reasoning fields. Screening refuses with the
115
+ exact field rather than advising. This is a hygiene measure against accidental
116
+ capture, not a secret scanner you should rely on. Handling real secrets is
117
+ routed to the envx provider.
118
+
119
+ ## Known limits
120
+
121
+ Stated because they are true, not because they are comfortable.
122
+
123
+ - The privacy scan over git history, `npm run scan:history`, passes on this
124
+ history. It did not pass on the history this repository was developed in: a
125
+ brand asset carried a third party's email address in its metadata, and a
126
+ history cannot be cleaned without rewriting it. This repository was therefore
127
+ published from a fresh initial commit rather than by rewriting a history whose
128
+ earlier state had already been distributed. The development history is not
129
+ public.
130
+ - On Codex, lifecycle hooks do not fire until each hook is explicitly trusted,
131
+ and Codex tool hooks cover shell commands only, so edit-triggered staleness
132
+ marking never fires there.
133
+ - `references/confidentiality.md` states that the denylist and staged scans run
134
+ before every commit. Nothing enforces that: there is no committed hook
135
+ installer. They are commands a maintainer runs.
@@ -0,0 +1,253 @@
1
+ # Third-party notices
2
+
3
+ Superdev itself is Copyright 2026 Rahul Retnan, licensed under the Apache
4
+ License 2.0. See `LICENSE` for the terms and `NOTICE` for the attribution
5
+ notice that accompanies them.
6
+
7
+ This file exists because Superdev redistributes other people's code. The
8
+ control center is compiled from `ui/` into a single committed file,
9
+ `src/service/assets/control-center.html`, and that file is a compiled copy of
10
+ React, Radix UI, xyflow, lucide, cmdk, dagre, zustand, d3 and the rest of the
11
+ interface dependency tree. The bundler strips upstream comments, so a search
12
+ for the word "copyright" inside that file returns nothing. MIT, ISC and
13
+ BSD-3-Clause all require the copyright notice and the permission notice to
14
+ travel with copies, including compiled copies. This file is where they travel.
15
+
16
+ The notices below cover:
17
+
18
+ - `src/service/assets/control-center.html`, which is tracked by git.
19
+ - Any package assembled from this tree, including the standalone package built
20
+ by `scripts/package/build-standalone.mjs`, which copies the same file.
21
+
22
+ They do not cover `node_modules`. That directory is git-ignored, is installed
23
+ by the consumer's own package manager from the public registry, and carries
24
+ each package's own licence file as published.
25
+
26
+ ## How this list was produced
27
+
28
+ The list is the production dependency tree of `ui/`, taken from
29
+ `npm ls --omit=dev --all` in that directory, with each package's `license`
30
+ field and the copyright lines from its own licence file. Type-only packages
31
+ (`@types/*`, `csstype`) are excluded because they contribute no code to the
32
+ bundle. `tailwindcss` is a dev dependency of `ui/`, but its generated CSS is
33
+ part of the bundle, so it is listed.
34
+
35
+ Re-derive the list with the same command after any change to `ui/package.json`.
36
+
37
+ ## MIT
38
+
39
+ The following packages are distributed under the MIT licence. The copyright
40
+ holder for each is listed; the permission notice follows once, because the text
41
+ is identical for all of them.
42
+
43
+ | Package | Version | Copyright |
44
+ | --- | --- | --- |
45
+ | @floating-ui/core | 1.8.0 | Copyright (c) 2021-present Floating UI contributors |
46
+ | @floating-ui/dom | 1.8.0 | Copyright (c) 2021-present Floating UI contributors |
47
+ | @floating-ui/react-dom | 2.1.9 | Copyright (c) 2021-present Floating UI contributors |
48
+ | @floating-ui/utils | 0.2.12 | Copyright (c) 2021-present Floating UI contributors |
49
+ | @radix-ui/number | 1.1.3 | Copyright (c) 2022 WorkOS |
50
+ | @radix-ui/primitive | 1.1.7 | Copyright (c) 2022 WorkOS |
51
+ | @radix-ui/react-arrow | 1.1.15 | Copyright (c) 2022 WorkOS |
52
+ | @radix-ui/react-collection | 1.1.15 | Copyright (c) 2022 WorkOS |
53
+ | @radix-ui/react-compose-refs | 1.1.5 | Copyright (c) 2022 WorkOS |
54
+ | @radix-ui/react-context | 1.2.2 | Copyright (c) 2022 WorkOS |
55
+ | @radix-ui/react-dialog | 1.1.23 | Copyright (c) 2022 WorkOS |
56
+ | @radix-ui/react-direction | 1.1.4 | Copyright (c) 2022 WorkOS |
57
+ | @radix-ui/react-dismissable-layer | 1.1.19 | Copyright (c) 2022 WorkOS |
58
+ | @radix-ui/react-dropdown-menu | 2.1.24 | Copyright (c) 2022 WorkOS |
59
+ | @radix-ui/react-focus-guards | 1.1.6 | Copyright (c) 2022 WorkOS |
60
+ | @radix-ui/react-focus-scope | 1.1.16 | Copyright (c) 2022 WorkOS |
61
+ | @radix-ui/react-id | 1.1.4 | Copyright (c) 2022 WorkOS |
62
+ | @radix-ui/react-menu | 2.1.24 | Copyright (c) 2022 WorkOS |
63
+ | @radix-ui/react-popover | 1.1.23 | Copyright (c) 2022 WorkOS |
64
+ | @radix-ui/react-popper | 1.3.7 | Copyright (c) 2022 WorkOS |
65
+ | @radix-ui/react-portal | 1.1.17 | Copyright (c) 2022 WorkOS |
66
+ | @radix-ui/react-presence | 1.1.10 | Copyright (c) 2022 WorkOS |
67
+ | @radix-ui/react-primitive | 2.1.10 | Copyright (c) 2022 WorkOS |
68
+ | @radix-ui/react-progress | 1.1.16 | Copyright (c) 2022 WorkOS |
69
+ | @radix-ui/react-roving-focus | 1.1.19 | Copyright (c) 2022 WorkOS |
70
+ | @radix-ui/react-scroll-area | 1.2.18 | Copyright (c) 2022 WorkOS |
71
+ | @radix-ui/react-select | 2.3.7 | Copyright (c) 2022 WorkOS |
72
+ | @radix-ui/react-separator | 1.1.15 | Copyright (c) 2022 WorkOS |
73
+ | @radix-ui/react-slot | 1.3.3 | Copyright (c) 2022 WorkOS |
74
+ | @radix-ui/react-switch | 1.3.7 | Copyright (c) 2022 WorkOS |
75
+ | @radix-ui/react-tabs | 1.1.21 | Copyright (c) 2022 WorkOS |
76
+ | @radix-ui/react-tooltip | 1.2.16 | Copyright (c) 2022 WorkOS |
77
+ | @radix-ui/react-use-callback-ref | 1.1.4 | Copyright (c) 2022 WorkOS |
78
+ | @radix-ui/react-use-controllable-state | 1.2.6 | Copyright (c) 2022 WorkOS |
79
+ | @radix-ui/react-use-effect-event | 0.0.5 | Copyright (c) 2022 WorkOS |
80
+ | @radix-ui/react-use-is-hydrated | 0.1.3 | Copyright (c) 2022 WorkOS |
81
+ | @radix-ui/react-use-layout-effect | 1.1.4 | Copyright (c) 2022 WorkOS |
82
+ | @radix-ui/react-use-previous | 1.1.4 | Copyright (c) 2022 WorkOS |
83
+ | @radix-ui/react-use-rect | 1.1.4 | Copyright (c) 2022 WorkOS |
84
+ | @radix-ui/react-use-size | 1.1.4 | Copyright (c) 2022 WorkOS |
85
+ | @radix-ui/react-visually-hidden | 1.2.11 | Copyright (c) 2022 WorkOS |
86
+ | @radix-ui/rect | 1.1.3 | Copyright (c) 2022 WorkOS |
87
+ | @xyflow/react | 12.11.2 | Copyright (c) 2019-2025 webkid GmbH |
88
+ | @xyflow/system | 0.0.79 | Copyright (c) 2019-2025 webkid GmbH |
89
+ | aria-hidden | 1.2.6 | Copyright (c) 2017 Anton Korzunov |
90
+ | classcat | 5.0.5 | Copyright (c) Jorge Bucaran |
91
+ | clsx | 2.1.1 | Copyright (c) Luke Edwards (lukeed.com) |
92
+ | cmdk | 1.1.1 | Copyright (c) 2022 Paco Coursey |
93
+ | dagre | 0.8.5 | Copyright (c) 2012-2014 Chris Pettitt |
94
+ | detect-node-es | 1.1.0 | Copyright (c) 2017 Ilya Kantor |
95
+ | get-nonce | 1.0.1 | Copyright (c) 2020 Anton Korzunov |
96
+ | graphlib | 2.1.8 | Copyright (c) 2012-2014 Chris Pettitt |
97
+ | lodash | 4.18.1 | Copyright OpenJS Foundation and other contributors, based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters and Editors |
98
+ | react | 19.2.8 | Copyright (c) Meta Platforms, Inc. and affiliates |
99
+ | react-dom | 19.2.8 | Copyright (c) Meta Platforms, Inc. and affiliates |
100
+ | react-remove-scroll | 2.7.2 | Copyright (c) 2017 Anton Korzunov |
101
+ | react-remove-scroll-bar | 2.3.8 | Anton Korzunov (see "Unresolved" below) |
102
+ | react-style-singleton | 2.2.3 | Copyright (c) 2017 Anton Korzunov |
103
+ | scheduler | 0.27.0 | Copyright (c) Meta Platforms, Inc. and affiliates |
104
+ | tailwind-merge | 3.6.0 | Copyright (c) 2021 Dany Castillo |
105
+ | tailwindcss | 4.3.3 | Copyright (c) Tailwind Labs, Inc. |
106
+ | use-callback-ref | 1.3.3 | Copyright (c) 2017 Anton Korzunov |
107
+ | use-sidecar | 1.1.3 | Copyright (c) 2017 Anton Korzunov |
108
+ | use-sync-external-store | 1.6.0 | Copyright (c) Meta Platforms, Inc. and affiliates |
109
+ | zustand | 4.5.7 | Copyright (c) 2019 Paul Henschel |
110
+
111
+ Permission is hereby granted, free of charge, to any person obtaining a copy
112
+ of this software and associated documentation files (the "Software"), to deal
113
+ in the Software without restriction, including without limitation the rights
114
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
115
+ copies of the Software, and to permit persons to whom the Software is
116
+ furnished to do so, subject to the following conditions:
117
+
118
+ The above copyright notice and this permission notice shall be included in all
119
+ copies or substantial portions of the Software.
120
+
121
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
122
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
123
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
124
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
125
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
126
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
127
+ SOFTWARE.
128
+
129
+ ## ISC
130
+
131
+ | Package | Version | Copyright |
132
+ | --- | --- | --- |
133
+ | d3-color | 3.1.0 | Copyright 2010-2022 Mike Bostock |
134
+ | d3-dispatch | 3.0.1 | Copyright 2010-2021 Mike Bostock |
135
+ | d3-drag | 3.0.0 | Copyright 2010-2021 Mike Bostock |
136
+ | d3-interpolate | 3.0.1 | Copyright 2010-2021 Mike Bostock |
137
+ | d3-selection | 3.0.0 | Copyright 2010-2021 Mike Bostock |
138
+ | d3-timer | 3.0.1 | Copyright 2010-2021 Mike Bostock |
139
+ | d3-transition | 3.0.1 | Copyright 2010-2021 Mike Bostock |
140
+ | d3-zoom | 3.0.0 | Copyright 2010-2021 Mike Bostock |
141
+ | lucide-react | 0.545.0 | Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025. |
142
+
143
+ Permission to use, copy, modify, and/or distribute this software for any purpose
144
+ with or without fee is hereby granted, provided that the above copyright notice
145
+ and this permission notice appear in all copies.
146
+
147
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
148
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
149
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
150
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
151
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
152
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
153
+ THIS SOFTWARE.
154
+
155
+ Portions of lucide-react derive from Feather, under the MIT licence:
156
+
157
+ Copyright (c) 2013-2023 Cole Bemis
158
+
159
+ The MIT permission notice is reproduced in the MIT section above and applies to
160
+ those portions.
161
+
162
+ ## BSD-3-Clause
163
+
164
+ `d3-ease` 3.0.1.
165
+
166
+ Copyright 2010-2021 Mike Bostock
167
+ Copyright 2001 Robert Penner
168
+ All rights reserved.
169
+
170
+ Redistribution and use in source and binary forms, with or without modification,
171
+ are permitted provided that the following conditions are met:
172
+
173
+ * Redistributions of source code must retain the above copyright notice, this
174
+ list of conditions and the following disclaimer.
175
+
176
+ * Redistributions in binary form must reproduce the above copyright notice,
177
+ this list of conditions and the following disclaimer in the documentation
178
+ and/or other materials provided with the distribution.
179
+
180
+ * Neither the name of the author nor the names of contributors may be used to
181
+ endorse or promote products derived from this software without specific prior
182
+ written permission.
183
+
184
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
185
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
186
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
187
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
188
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
189
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
190
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
191
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
192
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
193
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
194
+
195
+ ## 0BSD
196
+
197
+ `tslib` 2.8.1.
198
+
199
+ Copyright (c) Microsoft Corporation.
200
+
201
+ Permission to use, copy, modify, and/or distribute this software for any
202
+ purpose with or without fee is hereby granted.
203
+
204
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
205
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
206
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
207
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
208
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
209
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
210
+ PERFORMANCE OF THIS SOFTWARE.
211
+
212
+ ## Apache-2.0
213
+
214
+ `class-variance-authority` 0.7.1, Copyright 2022 Joe Bell.
215
+
216
+ The full licence text is the same Apache License 2.0 reproduced in this
217
+ repository's `LICENSE` file. That package ships no NOTICE file, so section 4(d)
218
+ of the licence imposes no further obligation here.
219
+
220
+ ## Vendored source
221
+
222
+ The 20 files in `ui/src/components/ui/` are derived from shadcn/ui. shadcn/ui
223
+ is distributed as source to be copied into a project rather than installed as a
224
+ package, so there is no dependency entry for it and no licence file in
225
+ `node_modules`. Its published terms are the MIT licence. The copied files carry
226
+ no attribution header today; see "Unresolved" below.
227
+
228
+ ## The runtime dependency
229
+
230
+ Superdev's own runtime has one dependency, `@tursodatabase/database` 0.7.1,
231
+ which declares the MIT licence in its `package.json`. It is installed by the
232
+ consumer, not vendored into this repository and not embedded in any committed
233
+ artifact, so no notice from it is redistributed here.
234
+
235
+ ## Unresolved
236
+
237
+ These are known gaps, recorded rather than papered over.
238
+
239
+ - `react-remove-scroll-bar` 2.3.8 declares the MIT licence in its
240
+ `package.json` but ships no licence file, so no copyright line could be read
241
+ from the package itself. It is authored by Anton Korzunov, the author of the
242
+ sibling `react-remove-scroll` packages listed above.
243
+ - `ui/src/assets/logo.png` has no recorded provenance. No document in this
244
+ repository states who made it or under what terms, and it is redistributed
245
+ inside the committed bundle. This must be settled before the repository is
246
+ published.
247
+ - No copyright holder is named for Superdev itself. The `LICENSE` file is the
248
+ unmodified Apache text with the appendix placeholder intact. The Apache grant
249
+ runs from the Licensor, so a downstream user cannot currently tell whose
250
+ grant they hold.
251
+ - This file is maintained by hand. Nothing in `npm run validate` checks it
252
+ against `ui/package.json`, so it can fall behind a dependency change without
253
+ failing a gate.
@@ -0,0 +1,61 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/run.mjs\" session-start",
10
+ "timeout": 8
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "UserPromptSubmit": [
16
+ {
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/run.mjs\" user-prompt-submit",
21
+ "timeout": 5
22
+ }
23
+ ]
24
+ }
25
+ ],
26
+ "PostToolUse": [
27
+ {
28
+ "matcher": "Write|Edit|MultiEdit|NotebookEdit|Bash",
29
+ "hooks": [
30
+ {
31
+ "type": "command",
32
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/run.mjs\" post-tool-use",
33
+ "timeout": 5
34
+ }
35
+ ]
36
+ }
37
+ ],
38
+ "PreCompact": [
39
+ {
40
+ "hooks": [
41
+ {
42
+ "type": "command",
43
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/run.mjs\" pre-compact",
44
+ "timeout": 8
45
+ }
46
+ ]
47
+ }
48
+ ],
49
+ "SessionEnd": [
50
+ {
51
+ "hooks": [
52
+ {
53
+ "type": "command",
54
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/run.mjs\" session-end",
55
+ "timeout": 8
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ }
61
+ }
package/hooks/run.mjs ADDED
@@ -0,0 +1,88 @@
1
+ // The plugin's hook launcher. Node builtins only, on purpose.
2
+ //
3
+ // The plugin and the CLI ship separately: skills and this file come from the
4
+ // plugin, and everything that touches the database comes from the CLI, which npm
5
+ // installs with its native storage engine. So a hook cannot do the work itself,
6
+ // and it must not need the engine to exist in order to run.
7
+ //
8
+ // Pointing hooks.json straight at `superdev hook <event>` almost works. What it
9
+ // gets wrong is the case that matters most: somebody who installed the plugin
10
+ // and not the CLI sees `sh: superdev: command not found` in their harness, which
11
+ // says nothing about what to install or why. A first impression should not be a
12
+ // shell error.
13
+ //
14
+ // So this launcher sits in between. It finds the CLI and hands over, or it
15
+ // returns a valid hook response saying exactly what to install. Either way the
16
+ // harness gets well-formed output and the session continues, because a hook that
17
+ // breaks a session is worse than a hook that does nothing.
18
+
19
+ import { spawn } from "node:child_process";
20
+ import { existsSync } from "node:fs";
21
+ import { delimiter, join } from "node:path";
22
+
23
+ const EVENT = process.argv[2] ?? "";
24
+
25
+ /** Hook events that can carry text back to the agent. */
26
+ const CONTEXT_EVENTS = new Set(["SessionStart", "UserPromptSubmit"]);
27
+
28
+ const EVENT_NAMES = {
29
+ "session-start": "SessionStart",
30
+ "user-prompt-submit": "UserPromptSubmit",
31
+ "post-tool-use": "PostToolUse",
32
+ "pre-compact": "PreCompact",
33
+ "session-end": "SessionEnd",
34
+ };
35
+
36
+ /**
37
+ * Where the CLI would be if it is installed.
38
+ *
39
+ * PATH is searched by hand rather than trusting the shell, because a harness may
40
+ * run this with a PATH that does not include a user's npm prefix, and the answer
41
+ * "not installed" is very different from "installed somewhere I did not look".
42
+ */
43
+ function findCli() {
44
+ const name = process.platform === "win32" ? "superdev.cmd" : "superdev";
45
+ const extra = [
46
+ join(process.env.HOME ?? "", ".local", "bin"),
47
+ join(process.env.HOME ?? "", ".npm-global", "bin"),
48
+ "/usr/local/bin",
49
+ "/opt/homebrew/bin",
50
+ ];
51
+ for (const dir of [...(process.env.PATH ?? "").split(delimiter), ...extra]) {
52
+ if (!dir) continue;
53
+ const candidate = join(dir, name);
54
+ if (existsSync(candidate)) return candidate;
55
+ }
56
+ return null;
57
+ }
58
+
59
+ /** A response the harness will accept, whatever went wrong. */
60
+ function respond(text) {
61
+ const hookEventName = EVENT_NAMES[EVENT] ?? EVENT;
62
+ if (text && CONTEXT_EVENTS.has(hookEventName)) {
63
+ process.stdout.write(`${JSON.stringify({
64
+ hookSpecificOutput: { hookEventName, additionalContext: text },
65
+ suppressOutput: true,
66
+ })}\n`);
67
+ } else {
68
+ process.stdout.write("{}\n");
69
+ }
70
+ process.exit(0);
71
+ }
72
+
73
+ const cli = findCli();
74
+ if (!cli) {
75
+ respond([
76
+ "Superdev: the plugin is installed and its command-line tool is not, so nothing can read or write the project record.",
77
+ "Install it with: npm install -g superdev-cli",
78
+ "The plugin carries the skills; the CLI carries the database engine, which npm installs for your platform. Nothing else is needed.",
79
+ ].join("\n"));
80
+ }
81
+
82
+ // Hand over completely: same stdin, same stdout, same exit code. From here the
83
+ // CLI owns the hook contract and this file has no further opinion about it.
84
+ const child = spawn(cli, ["hook", EVENT], { stdio: "inherit" });
85
+ child.on("error", () => respond(
86
+ "Superdev: its command-line tool was found but could not be started. Check that npm install -g superdev-cli completed, then run superdev --version.",
87
+ ));
88
+ child.on("close", (code) => process.exit(code ?? 0));
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "superdev-cli",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Local-first product-building control system for humans and coding agents.",
6
+ "author": "Rahul Retnan",
7
+ "license": "Apache-2.0",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/superdev-ai/superdev.git"
11
+ },
12
+ "homepage": "https://github.com/superdev-ai/superdev#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/superdev-ai/superdev/issues"
15
+ },
16
+ "engines": {
17
+ "node": ">=20"
18
+ },
19
+ "bin": {
20
+ "superdev": "src/cli.mjs"
21
+ },
22
+ "files": [
23
+ "src/",
24
+ "!src/**/*.test.mjs",
25
+ "skills/",
26
+ "references/",
27
+ "hooks/",
28
+ "scripts/validate/",
29
+ "!scripts/**/*.test.mjs",
30
+ "scripts/doctor/",
31
+ "scripts/privacy/",
32
+ ".claude-plugin/",
33
+ ".codex-plugin/",
34
+ "README.md",
35
+ "LICENSE",
36
+ "NOTICE",
37
+ "THIRD-PARTY-NOTICES.md",
38
+ "SECURITY.md",
39
+ "CONTRIBUTING.md",
40
+ "CODE_OF_CONDUCT.md"
41
+ ],
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "dependencies": {
46
+ "@tursodatabase/database": "0.7.1"
47
+ },
48
+ "scripts": {
49
+ "validate": "node scripts/validate/validate-all.mjs",
50
+ "scan": "node scripts/privacy/scan.mjs --allow-binary .superdev-scan-binary-allow",
51
+ "scan:history": "node scripts/privacy/scan-history.mjs --allow-binary .superdev-scan-binary-allow --history-allow .superdev-scan-history-allow",
52
+ "ui:build": "node scripts/package/build-ui.mjs build",
53
+ "ui:check": "node scripts/package/build-ui.mjs check",
54
+ "prepublishOnly": "npm test && node scripts/validate/validate-all.mjs && node scripts/package/build-ui.mjs check",
55
+ "release": "npm run release:tooling && npx release-it",
56
+ "release:patch": "npm run release:tooling && npx release-it patch",
57
+ "release:minor": "npm run release:tooling && npx release-it minor",
58
+ "release:major": "npm run release:tooling && npx release-it major",
59
+ "release:dry": "npm run release:tooling && npx release-it --dry-run",
60
+ "version:sync": "node scripts/package/sync-version.mjs --apply",
61
+ "check": "npm test && node scripts/validate/validate-all.mjs && node src/cli.mjs doctor && node scripts/check/release-criteria.mjs",
62
+ "release:tooling": "npm install --no-save --silent release-it@19 @release-it/conventional-changelog@10",
63
+ "test": "node --test \"src/**/*.test.mjs\""
64
+ }
65
+ }
@@ -0,0 +1,48 @@
1
+ # Confidentiality and Leak-Prevention Policy
2
+
3
+ Superdev is developed with a strict private/public boundary: private development evidence informs the design, but no private identifier, path, or recognizable material may appear in this repository, its git history, tests, fixtures, generated artifacts, or release archives. This document describes the public mechanism; the actual denylist lives outside the repository by design.
4
+
5
+ ## The leak scanner
6
+
7
+ `scripts/privacy/scan.mjs` scans file contents and relative paths for:
8
+
9
+ - entries from an **external denylist** supplied at execution time (`--denylist <path>`) - the denylist itself is never shipped, committed, or echoed into scanner output; findings reference rule ids (`DL-<n>`) and file/line locations only;
10
+ - absolute home-directory paths (`/Users/<name>/…`, `/home/<name>/…`);
11
+ - email addresses outside documentation-safe example domains;
12
+ - private-key markers and high-entropy secret-like strings;
13
+ - environment files staged for commit.
14
+
15
+ Behavior contract: reads only; writes nothing unless `--out <path>` is explicitly provided; machine-readable JSON on stdout with `--json`; exit `0` clean, `1` findings, `2` usage error. Any finding - P0 or P1 - is release-blocking: the scanner exits non-zero on either, and packaging, publication, and pushes stop until resolved.
16
+
17
+ One documented allowlist exception: `anthropic.com` addresses pass the email rule because agent-generated commits carry standard `Co-Authored-By` trailers that history scans would otherwise flag.
18
+
19
+ ## Where the gates run
20
+
21
+ | Gate | When |
22
+ |---|---|
23
+ | Denylist + built-in scans over the working tree | before every commit |
24
+ | Scan over staged files (`--staged`) | before every commit |
25
+ | Archive listing + content scan | every package build |
26
+ | Full git-history scan | before any first public push |
27
+ | Cross-product re-identifiability review (below) | before release |
28
+
29
+ ## Synthetic fixtures
30
+
31
+ Current tests generate their fixture material at runtime inside temporary directories. Any fixture added to the repository (e.g. under `tests/fixtures/`) must be independently authored and synthetic:
32
+
33
+ - generic domains only (e.g. `sample-saas`, `sample-mobile-app`, `legacy-docs-project`, `module-docs-project`, `example-api`);
34
+ - deliberately fictional feature combinations, counts, names, routes, schemas, and stacks;
35
+ - fictional far-future dates;
36
+ - a provenance note declaring the fixture independently authored.
37
+
38
+ Renaming something real is not anonymization: a fixture that preserves a real project's recognizable vertical, route shapes, counts, schema, or wording fails review even with every name changed.
39
+
40
+ ## Cross-product re-identifiability review
41
+
42
+ Before release, review whether multiple individually-generic examples **combine** to identify any real system (same module mix + same workflow shape + same domain vocabulary). If they do, replace with broader composites. Reviewer output is recorded as release evidence.
43
+
44
+ ## Contributor rules
45
+
46
+ - Never commit real project names, client names, internal domains, local paths, package scopes, or credentials - in code, fixtures, tests, comments, or commit messages.
47
+ - Never paste real error logs or screenshots without redaction.
48
+ - Treat any leak as an incident: stop, remove, rescan; if it entered git history, the history is rebuilt or sanitized before any publication.