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
@@ -0,0 +1,13 @@
1
+ # Fragment: Scheduled Jobs
2
+
3
+ **Activates on evidence:** cron expressions, scheduler configuration, or scheduled-task definitions - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** the mechanism sections of the jobs/webhooks template.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Schedule table:** each job with its cron/interval, timezone (explicit - DST behavior stated), and expected duration.
10
+ - **Overlap policy:** what happens if a run outlasts its interval (skip, queue, run concurrently) - configured, not assumed.
11
+ - **Missed-run policy:** behavior after downtime (catch up vs skip) per job.
12
+ - **Idempotency:** every scheduled job safe to re-run, or its guard documented.
13
+ - **Monitoring:** how a silently-not-running schedule is detected (heartbeat, last-run tracking).
@@ -0,0 +1,15 @@
1
+ # Fragment: Authentication - Detected Provider
2
+
3
+ **Activates on evidence:** a specific auth provider/library in the project (SDK dependency, provider configuration, callback routes) - record the exact evidence. Or an accepted decision. Applies **on top of** the neutral base, filling in provider-specific mechanics.
4
+
5
+ **Fills:** provider-specific subsections of the auth sections.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Provider identity:** the detected provider/library and where it is configured (evidence paths).
10
+ - **Managed vs owned:** which parts the provider manages (password storage, MFA, session issuance) vs what the project implements.
11
+ - **Integration points:** callback/webhook routes, middleware, client SDK usage - actual paths.
12
+ - **Configuration surface:** provider settings that change behavior (session lifetime, allowed callback URLs) - names and locations, never secret values.
13
+ - **Migration/exit notes:** what switching providers would touch (recorded honestly as coupling).
14
+
15
+ **Rule:** the provider's name appears in documentation only through this fragment - universal templates stay provider-free.
@@ -0,0 +1,14 @@
1
+ # Fragment: Authentication - Neutral Base
2
+
3
+ **Activates on evidence:** any authentication machinery in the project (sign-in flows, session/token handling, auth middleware or guards) - record the paths found. Or an accepted decision. Always the starting point when any auth exists; provider-specific detail comes from `detected-provider.md` on top of this base - never instead of it.
4
+
5
+ **Fills:** auth-related sections of foundations, API, and permissions templates.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Identity model:** what a user/account/principal is; multi-account and service-principal cases.
10
+ - **Session/credential shape:** session cookie, token, or key - lifetime, renewal, revocation semantics (capability level).
11
+ - **Authentication flows:** sign-up, sign-in, sign-out, recovery, and (if present) MFA - as flows, per the workflow template.
12
+ - **Authorization handoff:** where authenticated identity meets the permission matrices (the enforcement points).
13
+ - **Session edge cases:** expiry mid-flow, revoked-while-active, role-changed-mid-session (edge-case categories 4, 16).
14
+ - **Secret handling:** credentials and signing material are named by location, never printed.
@@ -0,0 +1,13 @@
1
+ # Fragment: Document Store
2
+
3
+ **Activates on evidence:** document-database client configuration and collection access code - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** the "Persistence specifics" section of the data template.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Collection shape:** collection per entity group; document structure cited from the validation schema or the writing code.
10
+ - **Denormalization rules:** what is duplicated where, and which copy is authoritative; update propagation for each duplicate.
11
+ - **Schema enforcement:** validator rules if the store supports them, else the application-level validation source.
12
+ - **Indexes:** defined indexes and the queries they serve.
13
+ - **Consistency:** read/write concern settings and what staleness consumers must tolerate.
@@ -0,0 +1,13 @@
1
+ # Fragment: External SaaS Persistence
2
+
3
+ **Activates on evidence:** data stored primarily in a third-party service (SDK configuration, API-based data access as the system of record) - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** the "Persistence specifics" section of the data template.
6
+
7
+ ## Sections supplied
8
+
9
+ - **System of record:** which entities live in the external service vs locally; the boundary stated per entity.
10
+ - **Vendor-owned schema:** fields controlled by the vendor vs custom fields; what the project can and cannot change.
11
+ - **Sync:** how local copies (if any) stay current - webhooks, polling, on-demand - and their staleness window.
12
+ - **Failure mode:** behavior when the service is unavailable (degrade, queue, fail) per operation.
13
+ - **Export/exit:** what data can be exported and how, recorded honestly (lock-in is a documented risk, not a surprise).
@@ -0,0 +1,13 @@
1
+ # Fragment: Key-Value Store
2
+
3
+ **Activates on evidence:** key-value client configuration and key-construction code - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** the "Persistence specifics" section of the data template.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Key schema:** key construction pattern per data class (prefixes, separators, id components) - collisions are a design defect, document the namespace plan.
10
+ - **Value shape:** serialization format and versioning of stored values.
11
+ - **TTL:** expiry policy per key class; what happens when expired data is requested.
12
+ - **Durability:** whether this store is cache (rebuildable) or record (authoritative) - per key class, explicitly.
13
+ - **Eviction:** behavior under memory pressure for cache classes.
@@ -0,0 +1,12 @@
1
+ # Fragment: No Persistence
2
+
3
+ **Activates on evidence:** no database or durable store configured - state held in memory, files, or the client only. Or an accepted decision.
4
+
5
+ **Fills:** the "Persistence specifics" section of the data template.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Statement:** the project persists no server-side data - recorded explicitly so absence is a fact, not an oversight.
10
+ - **Where state lives:** in-memory (lost on restart - stated), local files (paths, formats), or client-side (storage mechanism, clearing behavior).
11
+ - **Restart behavior:** exactly what is lost and what survives a process restart.
12
+ - **Future trigger:** the revisit condition under which persistence would be introduced (becomes a decision when it happens).
@@ -0,0 +1,13 @@
1
+ # Fragment: SQL with ORM
2
+
3
+ **Activates on evidence:** an ORM's model/schema definitions plus a SQL database configuration - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** the "Persistence specifics" section of the data template.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Model ↔ table mapping:** model source file per entity; the model file is the schema contract.
10
+ - **Migration discipline:** the project's migration tool and flow (generate → review → apply); hand-edited or skipped migrations are drift. If the project prohibits a push-style shortcut, that prohibition is recorded here and enforced by validation as *usage* detection, not mention detection.
11
+ - **Constraints in code vs database:** which invariants live in ORM validations vs actual DB constraints - both listed; DB-enforced wins for integrity claims.
12
+ - **Transactions:** the project's transaction convention for multi-entity operations.
13
+ - **Seed/test data:** where seeds live and whether they are safe to run per environment.
@@ -0,0 +1,13 @@
1
+ # Fragment: SQL without ORM
2
+
3
+ **Activates on evidence:** SQL DDL files, migration directories with raw SQL, or query files without ORM models - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** the "Persistence specifics" section of the data template.
6
+
7
+ ## Sections supplied
8
+
9
+ - **DDL location:** where table definitions live; the DDL is the schema contract.
10
+ - **Migration discipline:** ordered migration files, naming convention, how applied per environment.
11
+ - **Query layer:** where queries live (query files, repository modules); parameterization required at trust boundaries.
12
+ - **Constraints:** DB-enforced constraints listed per entity; application-enforced invariants listed separately.
13
+ - **Transactions:** explicit transaction boundaries for multi-statement operations.
@@ -0,0 +1,13 @@
1
+ # Fragment: Environments - Conventional Env Files
2
+
3
+ **Activates on evidence:** conventional env files (`.env*` patterns, env example/template files) - record filenames only. Or an accepted decision.
4
+
5
+ **Fills:** environment sections of foundations and operational docs.
6
+
7
+ ## Sections supplied
8
+
9
+ - **File inventory:** which env files exist per environment, which are committed (examples/templates only) vs ignored.
10
+ - **Variable inventory:** variable **names** with purpose, sourced from the example file or a typed env schema if the project has one; values never appear.
11
+ - **Validation:** where env validation happens (typed schema, startup checks) if present.
12
+ - **Documented rules:** real env files stay uncommitted; the example file is maintained as variables change (drift check); secrets referenced by name only.
13
+ - **Precedence:** process env vs file vs defaults, as the project's loader actually resolves them.
@@ -0,0 +1,13 @@
1
+ # Fragment: Environments - envx-Managed Secrets
2
+
3
+ **Activates on evidence:** envx markers (encrypted stage files such as `*.gpg` env files, an envx configuration file) - presence checks only; never decrypt to detect. Or an accepted decision.
4
+
5
+ **Fills:** environment sections of foundations and operational docs.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Stages:** the stage names that exist (from encrypted filenames) - names only.
10
+ - **Run convention:** commands execute through `envx run -e <stage> -- <command>`; documented as the project's standard invocation.
11
+ - **Variable inventory:** variable **names** per stage where discoverable without decryption; values never appear anywhere.
12
+ - **Rules recorded:** no decrypting to inspect; no printing decrypted content; no committing plaintext stages; missing-access failures distinguished from application failures.
13
+ - **Onboarding pointer:** how a new developer gets access (key exchange procedure location), without reproducing key material.
@@ -0,0 +1,13 @@
1
+ # Fragment: Environments - Platform-Managed Configuration
2
+
3
+ **Activates on evidence:** environment configuration held in a deployment platform (platform config files declaring env bindings, dashboard-managed settings referenced in docs/code) - record the evidence. Or an accepted decision.
4
+
5
+ **Fills:** environment sections of foundations and operational docs.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Where configuration lives:** the platform and scope (project/environment level) - names, never values.
10
+ - **Environment map:** the platform's environments and how they map to the project's stages.
11
+ - **Sync procedure:** how local development obtains configuration (platform CLI pull, generated local file) and which direction is authoritative.
12
+ - **Change procedure:** who changes platform config and how changes are recorded (a config change is an operations change class).
13
+ - **Secret rotation:** the rotation path for platform-held secrets, recorded as procedure without values.
@@ -0,0 +1,11 @@
1
+ # Fragment: Environments - No Environment Configuration
2
+
3
+ **Activates on evidence:** no environment files, no platform config, no stage handling - behavior identical everywhere it runs. Or an accepted decision.
4
+
5
+ **Fills:** environment sections of foundations.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Statement:** the project has no environment-dependent configuration - recorded explicitly.
10
+ - **Implications:** any future secret or per-environment value introduces this axis (becomes a decision; the env fragment set is the menu).
11
+ - **Hardcoded-value check:** confirm nothing secret-shaped is hardcoded in lieu of configuration (a finding if it is).
@@ -0,0 +1,13 @@
1
+ # Fragment: API-Only (no first-party UI)
2
+
3
+ **Activates on evidence:** no first-party user interface - the API is the product. Or an accepted decision.
4
+
5
+ **Fills:** delivery-shape sections of foundations.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Statement:** no first-party UI exists - recorded explicitly; consumers are integrators.
10
+ - **Developer experience as the surface:** API reference completeness, error message quality, and onboarding examples take the role UI polish plays elsewhere.
11
+ - **Consumer scenarios:** the integration flows (per the workflow template) that replace user flows.
12
+ - **Versioning and deprecation:** public-contract discipline (edge-case category 20) is the primary compatibility story.
13
+ - **UI steps in the module loop:** marked `N/A - API-only delivery shape` deliberately, per the loop's N/A rule.
@@ -0,0 +1,14 @@
1
+ # Fragment: CLI
2
+
3
+ **Activates on evidence:** a command-line interface (bin entries, command definitions, argument parsers) - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** delivery-shape sections of foundations; commands take the place of surfaces in the inventories.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Command inventory:** every command/subcommand with purpose, flags, arguments - the CLI's action inventory.
10
+ - **Output contract:** human output vs machine output (`--json`), exit codes with meanings, stderr conventions.
11
+ - **Input handling:** stdin, config files, environment variables (names only) and their precedence.
12
+ - **Interactivity:** prompts and their non-interactive equivalents (CI-safety).
13
+ - **Destructive commands:** confirmation behavior and `--force`/dry-run conventions.
14
+ - **Paths:** behavior with spaces, relative vs absolute, cross-platform separators.
@@ -0,0 +1,14 @@
1
+ # Fragment: Desktop UI
2
+
3
+ **Activates on evidence:** a desktop app project (desktop framework config, packaging targets, native menus) - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** delivery-shape sections of foundations and the surfaces/actions inventories.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Window model:** single/multi-window, tray presence, menu structure.
10
+ - **Platform scope:** OS targets and per-OS conventions honored (shortcuts, menu placement).
11
+ - **Filesystem access:** what it reads/writes locally, where, and cleanup.
12
+ - **Offline/local-first:** typically the default for desktop - sync behavior if a server exists.
13
+ - **Updates:** auto-update mechanism and failure behavior.
14
+ - **OS integration:** protocol handlers, file associations, notifications - each with evidence.
@@ -0,0 +1,14 @@
1
+ # Fragment: Mobile UI
2
+
3
+ **Activates on evidence:** a mobile app project (native project files, cross-platform framework config, store metadata) - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** delivery-shape sections of foundations and the surfaces/actions inventories.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Navigation model:** stack/tab/drawer structure - the navigation source is the surface inventory's evidence.
10
+ - **Platform scope:** which OS platforms, minimum versions, and any platform-conditional behavior (each with its reason).
11
+ - **Offline behavior:** in scope by default question for mobile - queued actions, sync, conflicts (edge-case category 17 rarely N/A here).
12
+ - **Permissions:** device permissions used (camera, location, notifications) with their request timing and denial states.
13
+ - **Lifecycle:** background/foreground transitions, state restoration after kill, deep links.
14
+ - **Update strategy:** store release vs over-the-air, and version-skew tolerance with the API (edge-case category 20).
@@ -0,0 +1,14 @@
1
+ # Fragment: Web UI
2
+
3
+ **Activates on evidence:** a web frontend (framework config, page/component tree, bundler setup) - record the paths found. Or an accepted decision.
4
+
5
+ **Fills:** delivery-shape sections of foundations and the surfaces/actions inventories.
6
+
7
+ ## Sections supplied
8
+
9
+ - **Routing model:** how routes map to surfaces (file-based, config-based) - the routing source is the surface inventory's evidence.
10
+ - **Rendering:** the project's actual model (server-rendered, client, hybrid) and what it means for loading states.
11
+ - **Responsive scope:** breakpoints in scope; behavior class per surface.
12
+ - **Offline scope:** in scope or deliberately N/A (drives edge-case category 17).
13
+ - **URL state:** what persists in URLs, back-button behavior (module-decomposition step 17 applies fully).
14
+ - **Accessibility baseline:** keyboard reachability, focus management, accessible names - always in scope for web.
@@ -0,0 +1,62 @@
1
+ <!-- Template: decision record. Fields per the shared talks schema; bodies immutable
2
+ after acceptance - status/banner/cross-refs are the only later edits. -->
3
+ # {{ADR-id}}: {{title}}
4
+
5
+ - **Status:** Proposed | Accepted | Rejected | Deprecated | Partially superseded | Superseded | Time-boxed experiment | Revisit required
6
+ - **Date:** {{date}}
7
+ - **Owner/approver:** {{who}}
8
+ - **Scope:** {{what-this-governs}}
9
+ - **Supersedes:** {{ids-or-none}}
10
+ - **Superseded by:** {{id-or-empty}}
11
+ - **Partially supersedes:** {{id+exact-scope-or-none}}
12
+ - **Expiry:** {{date-if-time-boxed}}
13
+
14
+ ## Context
15
+
16
+ {{problem-constraints-forces}}
17
+
18
+ ## Evidence
19
+
20
+ {{findings-with-epistemic-labels-and-sources}}
21
+
22
+ ## Decision criteria
23
+
24
+ {{what-a-good-option-must-satisfy}}
25
+
26
+ ## Options considered
27
+
28
+ 1. **{{option}}** - {{pros}} / {{cons}} / {{why-not-if-rejected}}
29
+
30
+ ## Decision
31
+
32
+ {{the-choice-stated-plainly}}
33
+
34
+ ## Rationale
35
+
36
+ {{observable-reasoning: criteria-applied, tradeoffs-accepted}}
37
+
38
+ ## Consequences
39
+
40
+ - Positive: {{gains}}
41
+ - Negative: {{costs-accepted}}
42
+ - Neutral: {{shifts}}
43
+
44
+ ## Risks
45
+
46
+ {{risks-and-mitigations}}
47
+
48
+ ## Enforcement
49
+
50
+ {{where-this-decision-is-enforced: validator-rule / checklist / code-location}}
51
+
52
+ ## Verification
53
+
54
+ {{how-we-know-it-worked}}
55
+
56
+ ## Revisit triggers
57
+
58
+ {{concrete-conditions-that-reopen-this}}
59
+
60
+ ## Related
61
+
62
+ {{links-to-specs-features-decisions}}
@@ -0,0 +1,30 @@
1
+ <!-- Template: API operation. Universal core - style specifics come from the active
2
+ API fragment (rest/graphql/rpc/events/local-only), never assumed. -->
3
+ # API: {{operation-name}}
4
+
5
+ - **Status:** draft | accepted | implemented
6
+ - **Module:** {{owning-module}}
7
+ - **Style:** {{from-active-fragment}}
8
+ - **Implemented at:** {{code-path}}
9
+ - **Last verified:** {{revision}} on {{date}}
10
+
11
+ ## Contract
12
+
13
+ - **Purpose:** {{what-it-does}}
14
+ - **Callers:** {{surfaces/actions/systems}}
15
+ - **Auth:** {{requirement-and-permission}} - enforced at {{enforcement-point}}
16
+ - **Request:** {{fields-validation-limits}}
17
+ - **Response (success):** {{shape}}
18
+ - **Errors:** {{code → meaning → user-facing-behavior}}
19
+ - **Idempotency:** {{key/semantics-or-deliberate-none}}
20
+ - **Limits:** {{rate/size-from-evidence-or-none-declared}}
21
+ - **Side effects:** {{events-jobs-notifications}}
22
+ - **Versioning:** {{compatibility-expectations}}
23
+
24
+ ## Style specifics
25
+
26
+ {{filled-by-active-fragment-section}}
27
+
28
+ ## Tests
29
+
30
+ {{test-references}}
@@ -0,0 +1,52 @@
1
+ <!-- Template: architecture overview. Universal - diagram nodes use the project's
2
+ real names from evidence; no invented vendors or stacks. -->
3
+ # {{project-name}} - Architecture
4
+
5
+ - **Status:** draft | accepted
6
+ - **Last verified:** {{revision}} on {{date}}
7
+
8
+ ## Shape
9
+
10
+ {{one-paragraph-system-shape}}
11
+
12
+ ## System context
13
+
14
+ ```mermaid
15
+ graph LR
16
+ {{actor}} --> {{system}}
17
+ {{system}} --> {{external-dependency-from-evidence}}
18
+ ```
19
+ *Claim: {{what-this-diagram-asserts}}*
20
+
21
+ ## Runtime pieces
22
+
23
+ | Piece | Runs where | Talks to | Evidence |
24
+ |---|---|---|---|
25
+ | {{piece}} | {{runtime}} | {{peers}} | {{path}} |
26
+
27
+ ## Module map
28
+
29
+ ```mermaid
30
+ graph TD
31
+ {{module-a}} --> {{module-b}}
32
+ ```
33
+ *Claim: {{dependency-direction-assertion}}*
34
+
35
+ ## Data ownership
36
+
37
+ | Entity group | Owning module | Consumers |
38
+ |---|---|---|
39
+ | {{entities}} | {{module}} | {{consumers}} |
40
+
41
+ ## Critical path
42
+
43
+ ```mermaid
44
+ sequenceDiagram
45
+ {{actor}}->>{{surface}}: {{action}}
46
+ {{surface}}->>{{handler}}: {{operation}}
47
+ ```
48
+ *Claim: {{the-flow-the-product-exists-for}}*
49
+
50
+ ## Boundaries and constraints
51
+
52
+ - {{boundary-or-constraint-with-evidence-or-adr}}
@@ -0,0 +1,29 @@
1
+ <!-- Template: change-impact / drift report. Generated view - regeneration-marked,
2
+ rebuildable, never hand-edited as authority. -->
3
+ <!-- REGENERATED - do not hand-edit. Source: change entries + validation run {{run-id}} -->
4
+ # {{project-name}} - Change Impact / Drift Report
5
+
6
+ - **Generated:** {{date}} against {{revision}}
7
+ - **Scope:** {{diff-or-full-tree}}
8
+
9
+ ## Change impact
10
+
11
+ | Changed path | Class | Affected artifacts | Status |
12
+ |---|---|---|---|
13
+ | {{path}} | {{change-class}} | {{artifacts}} | updated / pending / deferred({{tracked-entry}}) |
14
+
15
+ ## Drift findings
16
+
17
+ | # | Class | Evidence (code side) | Evidence (doc side) | Resolution owner |
18
+ |---|---|---|---|---|
19
+ | {{n}} | {{drift-class}} | {{path:line}} | {{doc-path}} | code / docs / decision |
20
+
21
+ ## Contradictions still open
22
+
23
+ | Since | Sides | Blocking? |
24
+ |---|---|---|
25
+ | {{date}} | {{a-vs-b}} | {{yes/no}} |
26
+
27
+ ## Pending sync (blocks completion of the causing change)
28
+
29
+ {{list-or-none}}
@@ -0,0 +1,29 @@
1
+ <!-- Template: compliance. ONLY declared regimes (recorded decisions) - never
2
+ inferred from geography or vertical. No regime declared => say exactly that. -->
3
+ # {{project-name}} - Compliance
4
+
5
+ - **Status:** draft | accepted
6
+ - **Declared regimes:** {{list-with-declaring-decision-ids - or "none declared"}}
7
+ - **Last verified:** {{revision}} on {{date}}
8
+
9
+ ## Regulated data inventory (per declared regime)
10
+
11
+ | Entity.field | Class under {{regime}} | Modules touching it |
12
+ |---|---|---|
13
+ | {{entity.field}} | {{class}} | {{modules}} |
14
+
15
+ ## Handling rules
16
+
17
+ | Concern | Rule | Enforced at |
18
+ |---|---|---|
19
+ | Encryption at rest | {{rule}} | {{evidence}} |
20
+ | Encryption in transit | {{rule}} | {{evidence}} |
21
+ | Access control | {{rule}} | {{permission-matrix-link}} |
22
+ | Retention | {{rule-from-decision}} | {{enforcement}} |
23
+ | Subject rights (access/export/delete) | {{supported-operations}} | {{code-paths}} |
24
+
25
+ ## Gaps (open items)
26
+
27
+ | Gap | Risk | Owner decision needed |
28
+ |---|---|---|
29
+ | {{gap}} | {{risk}} | {{question}} |
@@ -0,0 +1,43 @@
1
+ <!-- Template: data entity. Universal core - persistence specifics come from the
2
+ active data fragment. Schema source files outrank this prose. -->
3
+ # Entity: {{entity-name}}
4
+
5
+ - **Status:** draft | accepted | implemented
6
+ - **Owning module:** {{module}}
7
+ - **Schema source:** {{schema-file-path}}
8
+ - **Last verified:** {{revision}} on {{date}}
9
+
10
+ ## Purpose
11
+
12
+ {{what-this-entity-represents}}
13
+
14
+ ## Fields
15
+
16
+ | Field | Type | Null | Default | Constraints | Sensitivity |
17
+ |---|---|---|---|---|---|
18
+ | {{field}} | {{type}} | {{y/n}} | {{default}} | {{constraints}} | {{none/personal/secret/regulated-under-declared-regime}} |
19
+
20
+ ## Relationships
21
+
22
+ | Relation | Target | Cardinality | On delete |
23
+ |---|---|---|---|
24
+ | {{relation}} | {{entity}} | {{1:n}} | {{cascade/restrict/null}} |
25
+
26
+ ## Lifecycle
27
+
28
+ - **Created by:** {{operations}}
29
+ - **Updated by:** {{operations}}
30
+ - **Deleted:** {{soft/hard-semantics-and-cascades}}
31
+ - **Retention:** {{from-decision-or-none-declared}}
32
+
33
+ ## Indexes and uniqueness
34
+
35
+ {{from-schema-evidence}}
36
+
37
+ ## Persistence specifics
38
+
39
+ {{filled-by-active-fragment-section}}
40
+
41
+ ## Migration notes
42
+
43
+ {{pending-or-completed-migrations-affecting-this-entity}}
@@ -0,0 +1,43 @@
1
+ <!-- Template: feature specification. Three tiers; fill the tier the risk selects.
2
+ Microspec = the whole first section. Standard and Full add their sections. -->
3
+ # Feature: {{feature-name}}
4
+
5
+ - **Status:** draft | accepted | implemented
6
+ - **Depth:** microspec | standard | full
7
+ - **Module:** {{owning-module}}
8
+ - **Risk notes:** {{what-drove-the-depth-choice}}
9
+
10
+ ## Microspec (always)
11
+
12
+ - **Purpose:** {{why-this-exists}}
13
+ - **User:** {{who-and-goal}}
14
+ - **Scope:** in: {{in}} · out: {{out}}
15
+ - **Primary flow:** {{numbered-steps}}
16
+ - **Acceptance criteria:** {{testable-criteria}}
17
+ - **Affected files/contracts:** {{paths-and-contracts}}
18
+ - **Error and edge behavior:** {{from-edge-case-walk - applicable categories, N/A deliberate}}
19
+ - **Test evidence:** {{planned-tests-and-where-results-live}}
20
+
21
+ ## Standard (adds)
22
+
23
+ - **Surfaces and actions:** {{link-to-inventory}}
24
+ - **API/data impact:** {{operations-and-entities}}
25
+ - **Roles and permissions:** {{matrix-delta}}
26
+ - **Workflow and states:** {{flow-and-state-changes}}
27
+ - **Non-happy paths:** {{failure-flows}}
28
+ - **Observability:** {{signals-that-prove-it-works}}
29
+ - **Rollout:** {{flag/staged/at-once-and-why}}
30
+ - **Test plan:** {{detailed-cases}}
31
+
32
+ ## Full (adds)
33
+
34
+ - **Alternatives:** {{options-with-decision-matrix}}
35
+ - **Architecture:** {{design-and-diagrams}}
36
+ - **Migrations:** {{data/schema-migration-plan}}
37
+ - **Security/privacy/compliance:** {{analysis-under-declared-regimes}}
38
+ - **Performance/capacity:** {{evidence-based}}
39
+ - **Failure recovery:** {{what-breaks-and-how-it-recovers}}
40
+ - **Rollback:** {{how-to-undo}}
41
+ - **Operations:** {{runbook-deltas}}
42
+ - **Compatibility:** {{public-contract-impacts}}
43
+ - **Decision records:** {{adrs-created}}
@@ -0,0 +1,55 @@
1
+ <!-- Template: project foundations. Universal - no vendors, frameworks, budgets,
2
+ regions, or compliance regimes may be pre-filled; capability slots are filled
3
+ by active fragments with evidence. Placeholders use {{double-braces}}. -->
4
+ # {{project-name}} - Foundations
5
+
6
+ - **Status:** draft | accepted
7
+ - **Last verified:** {{revision}} on {{date}}
8
+
9
+ ## Product
10
+
11
+ {{what-it-is-one-paragraph}}
12
+
13
+ **Problem:** {{problem-statement}}
14
+ **Non-goals:** {{explicit-non-goals}}
15
+
16
+ ## Users and roles
17
+
18
+ | Role | Who | Primary goals |
19
+ |---|---|---|
20
+ | {{role}} | {{who}} | {{goals}} |
21
+
22
+ ## Scope
23
+
24
+ **In (current horizon):**
25
+ 1. {{in-scope-item}}
26
+
27
+ **Out (deliberate):**
28
+ 1. {{out-of-scope-item}} - {{why}}
29
+
30
+ ## Architecture
31
+
32
+ {{system-shape-summary}}
33
+
34
+ Diagrams (per the diagram catalogue): system context · {{other-required-diagrams}}
35
+
36
+ ## Stack (capability slots - filled by evidence or accepted decision only)
37
+
38
+ | Capability | Choice | Evidence / decision |
39
+ |---|---|---|
40
+ | Delivery shape | {{web/mobile/desktop/cli/api-only}} | {{evidence-path-or-adr}} |
41
+ | Persistence | {{style-or-none}} | {{evidence-path-or-adr}} |
42
+ | API style | {{style-or-none}} | {{evidence-path-or-adr}} |
43
+ | Async | {{mechanism-or-none}} | {{evidence-path-or-adr}} |
44
+ | Auth | {{approach-or-none}} | {{evidence-path-or-adr}} |
45
+ | Environments | {{env-handling}} | {{evidence-path-or-adr}} |
46
+
47
+ ## Design direction
48
+
49
+ {{pointer-to-design-system-or-deliberate-none}}
50
+
51
+ ## Glossary
52
+
53
+ | Term | Meaning |
54
+ |---|---|
55
+ | {{term}} | {{one-meaning}} |
@@ -0,0 +1,36 @@
1
+ <!-- Template: async jobs and webhooks. Mechanism specifics come from the active
2
+ async fragment; "none" is a deliberate statement. -->
3
+ # {{job-or-webhook-name}}
4
+
5
+ - **Status:** draft | accepted | implemented
6
+ - **Module:** {{owning-module}}
7
+ - **Mechanism:** {{from-active-async-fragment-or-none}}
8
+ - **Last verified:** {{revision}} on {{date}} against {{code-paths}}
9
+
10
+ ## Async job
11
+
12
+ - **Trigger:** {{schedule/event/enqueue}}
13
+ - **Input:** {{contract}}
14
+ - **Idempotency:** {{safe-to-re-run?-how}}
15
+ - **Retry:** {{policy-and-backoff}}
16
+ - **Failure destination:** {{dead-letter/park/alert}}
17
+ - **Timeout:** {{limit-and-behavior}}
18
+ - **Concurrency:** {{limits}}
19
+ - **Observability:** {{how-a-stuck-job-is-noticed}}
20
+ - **Delivery guarantee:** {{at-least-once/at-most-once - stated honestly}}
21
+
22
+ ## Incoming webhook
23
+
24
+ - **Endpoint:** {{route}}
25
+ - **Sender verification:** {{signature-scheme-from-evidence}}
26
+ - **Replay protection:** {{idempotency-mechanism}}
27
+ - **Ordering:** {{assumption-and-out-of-order-handling}}
28
+ - **Failure semantics:** {{what-triggers-sender-retry}}
29
+ - **Payload versioning:** {{handling}}
30
+
31
+ ## Outgoing webhook
32
+
33
+ - **Registration:** {{how-subscribers-register}}
34
+ - **Delivery:** {{guarantees-retry-backoff}}
35
+ - **Signing:** {{scheme}}
36
+ - **Failure visibility:** {{operator-view}}