@terreno/mcp 57.0.0 → 57.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.
- package/dist/bootstrap.d.ts +1 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +381 -191
- package/dist/bootstrap.js.map +1 -1
- package/dist/docs/guidelines/api/skills/mongoose-schema-safety/SKILL.md +8 -0
- package/dist/docs/resources/overview.md +6 -1
- package/dist/docs/resources/rtk.md +3 -1
- package/dist/docs/resources/syncdb.md +43 -0
- package/dist/docs/upgrades/56.0.0-beta.2.md +34 -0
- package/dist/docs/upgrades/57.1.0.md +126 -0
- package/dist/docs/versioned/next/README.md +15 -3
- package/dist/docs/versioned/next/explanation/README.md +3 -0
- package/dist/docs/versioned/next/explanation/admin-consent-migration.md +15 -0
- package/dist/docs/versioned/next/explanation/admin-plugin-frontend.md +12 -0
- package/dist/docs/versioned/next/explanation/announcements/rtk-deprecation.md +29 -0
- package/dist/docs/versioned/next/explanation/authentication.md +51 -58
- package/dist/docs/versioned/next/explanation/local-first-data.md +52 -0
- package/dist/docs/versioned/next/explanation/loop-engineering.md +117 -0
- package/dist/docs/versioned/next/explanation/repository-settings.md +8 -0
- package/dist/docs/versioned/next/explanation/roadmap-process.md +22 -9
- package/dist/docs/versioned/next/explanation/roadmap-seed-issues.md +39 -0
- package/dist/docs/versioned/next/how-to/README.md +3 -0
- package/dist/docs/versioned/next/how-to/admin-add-model.md +41 -0
- package/dist/docs/versioned/next/how-to/admin-custom-home.md +31 -0
- package/dist/docs/versioned/next/how-to/admin-custom-widget.md +42 -0
- package/dist/docs/versioned/next/how-to/admin-import-prebuilt.md +25 -0
- package/dist/docs/versioned/next/how-to/circleci.md +173 -0
- package/dist/docs/versioned/next/how-to/configure-better-auth.md +13 -10
- package/dist/docs/versioned/next/how-to/expose-mcp-tools.md +194 -0
- package/dist/docs/versioned/next/how-to/install-agent-skills.md +46 -0
- package/dist/docs/versioned/next/how-to/migrate-rtk-to-syncdb.md +26 -1
- package/dist/docs/versioned/next/how-to/websocket-integration.md +2 -1
- package/dist/docs/versioned/next/implementationPlans/ModularAPI.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/README.md +31 -17
- package/dist/docs/versioned/next/implementationPlans/admin-improvements-research.md +136 -0
- package/dist/docs/versioned/next/implementationPlans/admin-improvements.md +157 -527
- package/dist/docs/versioned/next/implementationPlans/admin-only-research.md +4 -0
- package/dist/docs/versioned/next/implementationPlans/admin-only.md +3 -1
- package/dist/docs/versioned/next/implementationPlans/admin-script-runner.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/admin-ui-v2-django-parity.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/agentic-sdlc-plugin.md +160 -130
- package/dist/docs/versioned/next/implementationPlans/apierror-standard-error-redesign.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/b2b-platform-program.md +5 -4
- package/dist/docs/versioned/next/implementationPlans/comms-abstraction-research.md +48 -0
- package/dist/docs/versioned/next/implementationPlans/comms-abstraction.md +152 -62
- package/dist/docs/versioned/next/implementationPlans/comms-adapter-sendgrid.md +9 -9
- package/dist/docs/versioned/next/implementationPlans/comms-admin-dashboard.md +1 -1
- package/dist/docs/versioned/next/implementationPlans/consent-forms.md +4 -0
- package/dist/docs/versioned/next/implementationPlans/design-blend-skill.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/docs-site-and-versioning.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/feature-flags-openfeature.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/feature-flags.md +4 -0
- package/dist/docs/versioned/next/implementationPlans/infra-mcp-research.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/infra-mcp.md +3 -3
- package/dist/docs/versioned/next/implementationPlans/mcp-boost-parity.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci-research.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci.md +2 -2
- package/dist/docs/versioned/next/implementationPlans/model-router-actions.md +4 -0
- package/dist/docs/versioned/next/implementationPlans/model-router-mcp.md +5 -4
- package/dist/docs/versioned/next/implementationPlans/offline-mode.md +3 -1
- package/dist/docs/versioned/next/implementationPlans/oss-launch-program.md +11 -2
- package/dist/docs/versioned/next/implementationPlans/pluggable-database-sqlite-research.md +150 -0
- package/dist/docs/versioned/next/implementationPlans/pluggable-database-sqlite.md +247 -0
- package/dist/docs/versioned/next/implementationPlans/positioning-django-rails-universal.md +1 -1
- package/dist/docs/versioned/next/implementationPlans/public-roadmap-github.md +2 -2
- package/dist/docs/versioned/next/implementationPlans/rbac-permissions.md +52 -15
- package/dist/docs/versioned/next/implementationPlans/rtk-to-syncdb-migration-docs.md +13 -12
- package/dist/docs/versioned/next/implementationPlans/syncdb-codegen-research.md +137 -0
- package/dist/docs/versioned/next/implementationPlans/syncdb-codegen.md +63 -59
- package/dist/docs/versioned/next/implementationPlans/syncdb-local-first.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/syncdb-phase-c-design.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/terreno-langfuse-integration.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/terreno-syncdb-2.md +1 -0
- package/dist/docs/versioned/next/implementationPlans/upgrade-banner.md +4 -0
- package/dist/docs/versioned/next/reference/README.md +6 -1
- package/dist/docs/versioned/next/reference/admin-config.md +51 -0
- package/dist/docs/versioned/next/reference/ai.md +15 -1
- package/dist/docs/versioned/next/reference/api.md +18 -0
- package/dist/docs/versioned/next/reference/comms.md +88 -7
- package/dist/docs/versioned/next/reference/environment-variables.md +9 -1
- package/dist/docs/versioned/next/reference/{rtk.md → legacy/rtk.md} +11 -7
- package/dist/docs/versioned/next/reference/lifecycle-plugin.md +54 -0
- package/dist/docs/versioned/next/reference/mcp-server.md +7 -0
- package/dist/docs/versioned/next/reference/syncdb.md +30 -3
- package/dist/docs/versioned/next/tasks/README.md +21 -10
- package/dist/docs/versioned/next/tasks/admin-improvements.md +189 -353
- package/dist/docs/versioned/next/tasks/admin-only.md +2 -0
- package/dist/docs/versioned/next/tasks/agentic-sdlc-plugin.md +54 -160
- package/dist/docs/versioned/next/tasks/comms-abstraction.md +30 -24
- package/dist/docs/versioned/next/tasks/comms-adapter-sendgrid.md +4 -4
- package/dist/docs/versioned/next/tasks/consent-forms.md +2 -0
- package/dist/docs/versioned/next/tasks/feature-flags.md +2 -0
- package/dist/docs/versioned/next/tasks/migrate-cicd-to-circleci.md +14 -10
- package/dist/docs/versioned/next/tasks/model-router-actions.md +2 -0
- package/dist/docs/versioned/next/tasks/model-router-mcp.md +27 -27
- package/dist/docs/versioned/next/tasks/offline-mode.md +2 -0
- package/dist/docs/versioned/next/tasks/pluggable-database-sqlite.md +44 -0
- package/dist/docs/versioned/next/tasks/public-roadmap-github.md +1 -1
- package/dist/docs/versioned/next/tasks/rtk-to-syncdb-migration-docs.md +15 -15
- package/dist/docs/versioned/next/tasks/syncdb-codegen.md +37 -31
- package/dist/docs/versioned/next/tasks/upgrade-banner.md +2 -0
- package/dist/index.js +24 -55
- package/dist/index.js.map +1 -1
- package/dist/local/localServer.d.ts.map +1 -1
- package/dist/local/localServer.js +9 -8
- package/dist/local/localServer.js.map +1 -1
- package/dist/local/localTools.d.ts +1 -1
- package/dist/local/localTools.d.ts.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +44 -45
- package/dist/prompts.js.map +1 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +9 -2
- package/dist/resources.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +4 -2
- package/dist/tools.js.map +1 -1
- package/package.json +7 -3
- package/src/docs/guidelines/api/skills/mongoose-schema-safety/SKILL.md +8 -0
- package/src/docs/resources/overview.md +6 -1
- package/src/docs/resources/rtk.md +3 -1
- package/src/docs/resources/syncdb.md +43 -0
- package/src/docs/upgrades/56.0.0-beta.2.md +34 -0
- package/src/docs/upgrades/57.1.0.md +126 -0
- package/src/docs/versioned/next/README.md +15 -3
- package/src/docs/versioned/next/explanation/README.md +3 -0
- package/src/docs/versioned/next/explanation/admin-consent-migration.md +15 -0
- package/src/docs/versioned/next/explanation/admin-plugin-frontend.md +12 -0
- package/src/docs/versioned/next/explanation/announcements/rtk-deprecation.md +29 -0
- package/src/docs/versioned/next/explanation/authentication.md +51 -58
- package/src/docs/versioned/next/explanation/local-first-data.md +52 -0
- package/src/docs/versioned/next/explanation/loop-engineering.md +117 -0
- package/src/docs/versioned/next/explanation/repository-settings.md +8 -0
- package/src/docs/versioned/next/explanation/roadmap-process.md +22 -9
- package/src/docs/versioned/next/explanation/roadmap-seed-issues.md +39 -0
- package/src/docs/versioned/next/how-to/README.md +3 -0
- package/src/docs/versioned/next/how-to/admin-add-model.md +41 -0
- package/src/docs/versioned/next/how-to/admin-custom-home.md +31 -0
- package/src/docs/versioned/next/how-to/admin-custom-widget.md +42 -0
- package/src/docs/versioned/next/how-to/admin-import-prebuilt.md +25 -0
- package/src/docs/versioned/next/how-to/circleci.md +173 -0
- package/src/docs/versioned/next/how-to/configure-better-auth.md +13 -10
- package/src/docs/versioned/next/how-to/expose-mcp-tools.md +194 -0
- package/src/docs/versioned/next/how-to/install-agent-skills.md +46 -0
- package/src/docs/versioned/next/how-to/migrate-rtk-to-syncdb.md +26 -1
- package/src/docs/versioned/next/how-to/websocket-integration.md +2 -1
- package/src/docs/versioned/next/implementationPlans/ModularAPI.md +1 -0
- package/src/docs/versioned/next/implementationPlans/README.md +31 -17
- package/src/docs/versioned/next/implementationPlans/admin-improvements-research.md +136 -0
- package/src/docs/versioned/next/implementationPlans/admin-improvements.md +157 -527
- package/src/docs/versioned/next/implementationPlans/admin-only-research.md +4 -0
- package/src/docs/versioned/next/implementationPlans/admin-only.md +3 -1
- package/src/docs/versioned/next/implementationPlans/admin-script-runner.md +1 -0
- package/src/docs/versioned/next/implementationPlans/admin-ui-v2-django-parity.md +1 -0
- package/src/docs/versioned/next/implementationPlans/agentic-sdlc-plugin.md +160 -130
- package/src/docs/versioned/next/implementationPlans/apierror-standard-error-redesign.md +1 -0
- package/src/docs/versioned/next/implementationPlans/b2b-platform-program.md +5 -4
- package/src/docs/versioned/next/implementationPlans/comms-abstraction-research.md +48 -0
- package/src/docs/versioned/next/implementationPlans/comms-abstraction.md +152 -62
- package/src/docs/versioned/next/implementationPlans/comms-adapter-sendgrid.md +9 -9
- package/src/docs/versioned/next/implementationPlans/comms-admin-dashboard.md +1 -1
- package/src/docs/versioned/next/implementationPlans/consent-forms.md +4 -0
- package/src/docs/versioned/next/implementationPlans/design-blend-skill.md +1 -0
- package/src/docs/versioned/next/implementationPlans/docs-site-and-versioning.md +1 -0
- package/src/docs/versioned/next/implementationPlans/feature-flags-openfeature.md +1 -0
- package/src/docs/versioned/next/implementationPlans/feature-flags.md +4 -0
- package/src/docs/versioned/next/implementationPlans/infra-mcp-research.md +1 -0
- package/src/docs/versioned/next/implementationPlans/infra-mcp.md +3 -3
- package/src/docs/versioned/next/implementationPlans/mcp-boost-parity.md +1 -0
- package/src/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci-research.md +1 -0
- package/src/docs/versioned/next/implementationPlans/migrate-cicd-to-circleci.md +2 -2
- package/src/docs/versioned/next/implementationPlans/model-router-actions.md +4 -0
- package/src/docs/versioned/next/implementationPlans/model-router-mcp.md +5 -4
- package/src/docs/versioned/next/implementationPlans/offline-mode.md +3 -1
- package/src/docs/versioned/next/implementationPlans/oss-launch-program.md +11 -2
- package/src/docs/versioned/next/implementationPlans/pluggable-database-sqlite-research.md +150 -0
- package/src/docs/versioned/next/implementationPlans/pluggable-database-sqlite.md +247 -0
- package/src/docs/versioned/next/implementationPlans/positioning-django-rails-universal.md +1 -1
- package/src/docs/versioned/next/implementationPlans/public-roadmap-github.md +2 -2
- package/src/docs/versioned/next/implementationPlans/rbac-permissions.md +52 -15
- package/src/docs/versioned/next/implementationPlans/rtk-to-syncdb-migration-docs.md +13 -12
- package/src/docs/versioned/next/implementationPlans/syncdb-codegen-research.md +137 -0
- package/src/docs/versioned/next/implementationPlans/syncdb-codegen.md +63 -59
- package/src/docs/versioned/next/implementationPlans/syncdb-local-first.md +1 -0
- package/src/docs/versioned/next/implementationPlans/syncdb-phase-c-design.md +1 -0
- package/src/docs/versioned/next/implementationPlans/terreno-langfuse-integration.md +1 -0
- package/src/docs/versioned/next/implementationPlans/terreno-syncdb-2.md +1 -0
- package/src/docs/versioned/next/implementationPlans/upgrade-banner.md +4 -0
- package/src/docs/versioned/next/reference/README.md +6 -1
- package/src/docs/versioned/next/reference/admin-config.md +51 -0
- package/src/docs/versioned/next/reference/ai.md +15 -1
- package/src/docs/versioned/next/reference/api.md +18 -0
- package/src/docs/versioned/next/reference/comms.md +88 -7
- package/src/docs/versioned/next/reference/environment-variables.md +9 -1
- package/src/docs/versioned/next/reference/{rtk.md → legacy/rtk.md} +11 -7
- package/src/docs/versioned/next/reference/lifecycle-plugin.md +54 -0
- package/src/docs/versioned/next/reference/mcp-server.md +7 -0
- package/src/docs/versioned/next/reference/syncdb.md +30 -3
- package/src/docs/versioned/next/tasks/README.md +21 -10
- package/src/docs/versioned/next/tasks/admin-improvements.md +189 -353
- package/src/docs/versioned/next/tasks/admin-only.md +2 -0
- package/src/docs/versioned/next/tasks/agentic-sdlc-plugin.md +54 -160
- package/src/docs/versioned/next/tasks/comms-abstraction.md +30 -24
- package/src/docs/versioned/next/tasks/comms-adapter-sendgrid.md +4 -4
- package/src/docs/versioned/next/tasks/consent-forms.md +2 -0
- package/src/docs/versioned/next/tasks/feature-flags.md +2 -0
- package/src/docs/versioned/next/tasks/migrate-cicd-to-circleci.md +14 -10
- package/src/docs/versioned/next/tasks/model-router-actions.md +2 -0
- package/src/docs/versioned/next/tasks/model-router-mcp.md +27 -27
- package/src/docs/versioned/next/tasks/offline-mode.md +2 -0
- package/src/docs/versioned/next/tasks/pluggable-database-sqlite.md +44 -0
- package/src/docs/versioned/next/tasks/public-roadmap-github.md +1 -1
- package/src/docs/versioned/next/tasks/rtk-to-syncdb-migration-docs.md +15 -15
- package/src/docs/versioned/next/tasks/syncdb-codegen.md +37 -31
- package/src/docs/versioned/next/tasks/upgrade-banner.md +2 -0
- package/dist/docs/versioned/next/implementationPlans/PLAN_INDEX.md +0 -73
- package/dist/docs/versioned/next/implementationPlans/syncdb-api-inventory.md +0 -303
- package/src/docs/versioned/next/implementationPlans/PLAN_INDEX.md +0 -73
- package/src/docs/versioned/next/implementationPlans/syncdb-api-inventory.md +0 -303
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Research: Serving Admin from a Terreno App (Opt-In, No Separate SPA Deploy)
|
|
2
2
|
|
|
3
|
+
**Status:** Complete
|
|
4
|
+
**Closed:** 2026-08-20 — Research incorporated into [admin-only.md](admin-only.md); shipped as `@terreno/admin-spa`.
|
|
5
|
+
**Roadmap issue:** https://github.com/FlourishHealth/terreno/issues/1075
|
|
6
|
+
|
|
3
7
|
## Summary
|
|
4
8
|
|
|
5
9
|
Terreno already has the building blocks for an admin UI — `@terreno/admin-backend` mounts `/admin/*` API routes (config, per-model CRUD, search, scripts, version-config) and `@terreno/admin-frontend` ships React Native components designed to be embedded in a consumer's Expo Router app. The gap is the **deploy surface**: today consumers either bundle admin into their main Expo app (bloats user bundles, requires ~7 route files) or build a separate Expo Web app and host it on GCS/Netlify (one more pipeline to maintain).
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Admin-Only: Serve Admin SPA From a Terreno Backend (Opt-In)
|
|
2
2
|
|
|
3
|
-
**Status:**
|
|
3
|
+
**Status:** Complete
|
|
4
|
+
**Closed:** 2026-08-20 — Shipped as `@terreno/admin-spa` (`AdminSpaServeApp`, pre-built Expo web export, Better Auth same-origin). See `admin-spa/` and `admin-only-research.md`.
|
|
5
|
+
**Roadmap issue:** https://github.com/FlourishHealth/terreno/issues/1075
|
|
4
6
|
**Branch:** `admin-only`
|
|
5
7
|
**Owner:** Josh Gachnang
|
|
6
8
|
**Created:** 2026-05-11
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Admin Script Runner — Maintenance Scripts via `AdminApp`
|
|
2
2
|
|
|
3
3
|
**Status:** Implemented (ships with Admin UI v2 work; documented here as its own IP)
|
|
4
|
+
**Roadmap issue:** https://github.com/FlourishHealth/terreno/issues/1077
|
|
4
5
|
**Related:** [`admin-ui-v2-django-parity.md`](./admin-ui-v2-django-parity.md) (home `scriptRunner` widget, background-task patterns)
|
|
5
6
|
**Primary packages:** `@terreno/api` (`BackgroundTask`, script types), `@terreno/admin-backend`, `@terreno/admin-frontend`, `admin-spa`, `example-backend`
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Admin UI v2 — Django-Parity Admin (Config-Driven Shell)
|
|
2
2
|
|
|
3
3
|
**Status:** Implemented (phased tasks complete; acceptance criteria verified in-repo)
|
|
4
|
+
**Roadmap issue:** https://github.com/FlourishHealth/terreno/issues/1076
|
|
4
5
|
**Branch:** Landed via `cursor/admin-ui-v2-backend-a736` (PR #782)
|
|
5
6
|
**Owner:** Josh Gachnang
|
|
6
7
|
**Created:** 2026-06-15
|
|
@@ -1,178 +1,208 @@
|
|
|
1
|
-
# Implementation Plan:
|
|
1
|
+
# Implementation Plan: Loop-Engineering Lifecycle Plugin
|
|
2
2
|
|
|
3
|
-
**Status:**
|
|
3
|
+
**Status:** In Progress
|
|
4
|
+
**Approved:** 2026-08-22
|
|
4
5
|
**Roadmap issue:** https://github.com/FlourishHealth/terreno/issues/1006
|
|
5
6
|
**Priority:** High
|
|
6
|
-
**
|
|
7
|
-
**Owner:** unassigned
|
|
7
|
+
**Owner:** agent
|
|
8
8
|
**Created:** 2026-07-27
|
|
9
9
|
**Program:** [OSS launch](oss-launch-program.md)
|
|
10
|
-
**Depends on:** [`positioning-django-rails-universal`](positioning-django-rails-universal.md) (shared copy blocks), [`oss-governance-baseline`](oss-governance-baseline.md) (license coverage for `plugins/`)
|
|
11
|
-
**RTK deprecation flag:** **Partial** — the pipeline's frontend-verification gates name `rtk/` in their path lists and must be updated to name `syncdb/` after PR #869.
|
|
12
10
|
|
|
13
11
|
## Goal
|
|
14
12
|
|
|
15
|
-
Terreno
|
|
13
|
+
Evolve Terreno's existing planning plugin into five reusable, bounded lifecycle
|
|
14
|
+
transitions optimized for repeated fresh agent invocations:
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
```text
|
|
17
|
+
Grow (shape) → Pick (build) → Roast (prove) → Brew (submit) → Taste (react)
|
|
18
|
+
```
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
The outer loop owns invocation, persistence, waiting, retry, stop, and escalation.
|
|
21
|
+
Lifecycle skills own how one stage is performed. Repository skills own how this codebase
|
|
22
|
+
works. Roast owns independent acceptance proof. State/evidence bridge fresh invocations.
|
|
23
|
+
|
|
24
|
+
This is a refactor of the existing strong workflow, not a parallel implementation.
|
|
25
|
+
|
|
26
|
+
## Scope
|
|
27
|
+
|
|
28
|
+
- Canonical five plugin skills and migration from former names
|
|
29
|
+
- Explicit transition contracts for every stage
|
|
30
|
+
- Shared machine-readable result and execution-state schemas
|
|
31
|
+
- Supporting-skill discovery/composition
|
|
32
|
+
- Repository-specific detail removed from portable stages
|
|
33
|
+
- Brew exits after PR setup
|
|
34
|
+
- Taste performs one reactive iteration and exits
|
|
35
|
+
- Outer-loop reference including small-feature and CI/review scenarios
|
|
36
|
+
- Static validation for names, status values, transitions, portability, and loop bounds
|
|
37
|
+
- Documentation, metadata, and generated integrations
|
|
38
|
+
|
|
39
|
+
## Non-scope
|
|
40
|
+
|
|
41
|
+
- A daemon/hosted scheduler implementation
|
|
42
|
+
- Automatic merging
|
|
43
|
+
- Copying Terreno's repository skills into the plugin
|
|
44
|
+
- Persisting chain-of-thought or conversational transcripts
|
|
45
|
+
- Hundreds of generic micro-skills
|
|
46
|
+
|
|
47
|
+
## Decisions
|
|
48
|
+
|
|
49
|
+
| ID | Decision |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| AP1 | Public reusable plugin; repository-specific knowledge remains local |
|
|
52
|
+
| AP2 | Sensitive-data rules cover credentials, customer data, PII/PHI, and evidence media |
|
|
53
|
+
| AP3 | Canonical stages are Grow, Pick, Roast, Brew, Taste |
|
|
54
|
+
| AP4 | Stages discover supporting skills by description; exact skill names are never universal dependencies |
|
|
55
|
+
| AP5 | Taste is one observe/act/emit iteration; the outer loop owns waiting and reinvocation |
|
|
56
|
+
| AP6 | Shared results use stable YAML shaped by JSON Schema; statuses are `PASS`, `FAIL`, `BLOCKED`, `PENDING` |
|
|
57
|
+
| AP7 | Existing repository state convention wins; fallback reuses loop-owned `.terreno/pipeline/<slug>.json`, not committed by default |
|
|
58
|
+
| AP8 | Brew emits PR/head state and exits; direct Taste invocation is standalone compatibility only |
|
|
59
|
+
| AP9 | No deprecated command aliases: old implementation-Roast conflicts with new verification-Roast and no maintained alias mechanism exists |
|
|
60
|
+
| AP10 | Plugin major version is `2.0.0` because lifecycle semantics and command names are breaking |
|
|
22
61
|
|
|
23
|
-
|
|
24
|
-
- Porting the pipeline to every agent runtime. Cursor is the reference; note what would be required for others.
|
|
25
|
-
- Replacing the repo's existing `.rulesync/skills/` (`submit`, `autobot`, `check-watcher`, `respond-to-review`) — but the overlap needs resolving, because right now two pipelines cover similar ground.
|
|
26
|
-
- Building a plugin marketplace of our own.
|
|
62
|
+
## Architecture
|
|
27
63
|
|
|
28
|
-
|
|
64
|
+
```text
|
|
65
|
+
OUTER LOOP
|
|
66
|
+
invoke / persist / wait / retry
|
|
67
|
+
stop / route / escalate
|
|
68
|
+
|
|
|
69
|
+
v
|
|
70
|
+
GROW → PICK → ROAST → BREW → TASTE
|
|
71
|
+
shape build prove submit react once
|
|
72
|
+
|
|
|
73
|
+
repository skills + IP/task/state + evidence
|
|
74
|
+
```
|
|
29
75
|
|
|
30
|
-
|
|
76
|
+
### Ownership
|
|
31
77
|
|
|
32
|
-
|
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
| AP6 | Agent runtimes | **B** — Cursor + rulesync-generated variants |
|
|
40
|
-
| AP7 | Plugin versioning | **A** — independent versioning; declare compatible Terreno versions |
|
|
78
|
+
| Layer | Owns |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| Outer loop | when, who, next stage, persistence, waiting, retry, stop, escalation |
|
|
81
|
+
| Lifecycle plugin | portable stage procedure, invariants, evidence, transitions |
|
|
82
|
+
| Repository skills | commands, frameworks, package conventions, safety rules, gotchas |
|
|
83
|
+
| Roast | requirement → method → evidence → verdict |
|
|
84
|
+
| State/evidence | durable facts required by a fresh invocation |
|
|
41
85
|
|
|
42
|
-
###
|
|
86
|
+
### State transition table
|
|
43
87
|
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
88
|
+
| Stage | PASS | FAIL | BLOCKED/PENDING |
|
|
89
|
+
| --- | --- | --- | --- |
|
|
90
|
+
| Grow | Pick | Grow with artifact defects | Human/external gate |
|
|
91
|
+
| Pick | Roast | Pick with new evidence-based hypothesis | Human/external gate |
|
|
92
|
+
| Roast | Brew | Pick with exact failed criteria | Classify environment/external/human |
|
|
93
|
+
| Brew | Taste | Pick/Roast/Brew according to evidence | Human/access gate |
|
|
94
|
+
| Taste | Merge-ready | Focused Taste retry only with new evidence | `PENDING`: loop waits then Taste; `BLOCKED`: named gate |
|
|
51
95
|
|
|
52
|
-
##
|
|
96
|
+
## Shared result contract
|
|
53
97
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
flowchart LR
|
|
58
|
-
REQ["Request<br/>ticket / spec / idea"]
|
|
59
|
-
G["/terreno-1-grow<br/>(plan)"]
|
|
60
|
-
H["/terreno-2-harvest<br/>(implement)"]
|
|
61
|
-
R["/terreno-3-roast<br/>(verify)"]
|
|
62
|
-
B["/terreno-4-brew<br/>(submit)"]
|
|
63
|
-
T["/terreno-5-taste<br/>(review loop)"]
|
|
64
|
-
M["Mergeable PR"]
|
|
65
|
-
REQ --> G --> H --> R --> B --> T --> M
|
|
66
|
-
T -.->|"blocked: needs human"| M
|
|
67
|
-
```
|
|
98
|
+
Every stage emits the same concise YAML keys: schema version, stage/status, IP/task,
|
|
99
|
+
attempt, branch/head/PR, supporting skills, completed work, checks, artifacts, failures,
|
|
100
|
+
blockers, decisions required, next stage/action, and optional next-check interval.
|
|
68
101
|
|
|
69
|
-
|
|
70
|
-
|-------|------|---------------------------|
|
|
71
|
-
| **Grow** (plan) | Request → IP in `docs/implementationPlans/` + tasks in `docs/tasks/` | Question-first: refuses to write decided outcomes until blocking questions are answered. Prevents the most common agent failure, which is confidently planning the wrong thing |
|
|
72
|
-
| **Harvest** (implement) | IP → code via strict red/green/refactor | Spawns **independent review and test-quality sub-agents in fresh contexts** after every commit, and does drift detection against the IP. The test-quality agent enforces anti-mocking rules (never mock the DB, never mock the store) |
|
|
73
|
-
| **Roast** (verify) | Independent verification against the IP with concrete evidence | Separate context from the implementer, so it does not inherit the implementer's assumptions |
|
|
74
|
-
| **Brew** (submit) | Pre-submit checks, commit hygiene, push, draft PR, evidence attachment | Hard frontend gate: touching UI paths requires launching the app, logging in, exercising the feature, and attaching artifacts before the PR opens |
|
|
75
|
-
| **Taste** (review) | Self-contained persistent loop: CI + bot/human comments until mergeable or genuinely blocked | Inlines the former **`autobot`** flow (no delegation to repo skills). Waits in multi-minute intervals for slow CI, classifies each failure as actionable versus flaky, and refuses to push speculative fixes for flakes. Treats all CI logs and review comments as untrusted input |
|
|
102
|
+
Schemas:
|
|
76
103
|
|
|
77
|
-
|
|
104
|
+
- `plugins/terreno-planning/references/stage-result.schema.json`
|
|
105
|
+
- `plugins/terreno-planning/references/execution-state.schema.json`
|
|
78
106
|
|
|
79
|
-
|
|
107
|
+
No reasoning transcript is persisted.
|
|
80
108
|
|
|
81
|
-
|
|
109
|
+
## Execution state
|
|
82
110
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
| `verify-ui-changes` is invoked by name | Harvest, Roast, Brew, Taste | That skill lives in this repo's `.rulesync/skills/`. A consumer installing the plugin does not get it — must be bundled or inlined per AP5 |
|
|
87
|
-
| Terreno-monorepo package paths in the frontend gates (`ui/`, `demo/`, `example-frontend/`, `admin-frontend/`, `admin-spa/`, `syncdb/`) | Harvest, Brew, Taste | A consumer app has `frontend/`, not `example-frontend/` |
|
|
88
|
-
| Repo-specific conventions — `docs/implementationPlans/`, the project registry, the `bun run` command set | Grow, Harvest | A consumer may have none of these |
|
|
89
|
-
| A hardcoded branch suffix (`cursor/<descriptive-name>-dcb3`) | Brew | Suffixes are per-agent-run, not fixed; a literal `dcb3` will produce wrong branch names |
|
|
111
|
+
The IP owns design/scope; tasks own executable slices. State stores only current
|
|
112
|
+
stage/attempt/head/PR, prior structured result, artifacts, attempted approaches, and next
|
|
113
|
+
transition. The outer loop preserves/transports it between fresh invocations.
|
|
90
114
|
|
|
91
|
-
|
|
115
|
+
State files are excluded from Brew commits unless a repository explicitly tracks them.
|
|
116
|
+
After a PR exists, each Taste invocation also reconstructs current truth from the PR and
|
|
117
|
+
current head rather than trusting stale state.
|
|
92
118
|
|
|
93
|
-
|
|
119
|
+
## Stage contracts
|
|
94
120
|
|
|
95
|
-
|
|
96
|
-
|--------------|-------------------------|
|
|
97
|
-
| Brew | `.rulesync/skills/submit/`, `commit/`, `create-pr/` |
|
|
98
|
-
| Taste | `.rulesync/skills/autobot/`, `check-watcher/`, `respond-to-review/` — **logic inlined into Taste; skills deprecated** |
|
|
99
|
-
| Grow | `.rulesync/skills/ip/`, `design-blend/` |
|
|
100
|
-
| Harvest | `.rulesync/skills/implement/` |
|
|
121
|
+
### Grow
|
|
101
122
|
|
|
102
|
-
|
|
123
|
+
Researches repository facts, distinguishes human decisions from discoverable facts and
|
|
124
|
+
low-risk conventional details, grills only genuine decisions, then writes approved,
|
|
125
|
+
implementation-ready IP/tasks. Every acceptance criterion maps to verification.
|
|
103
126
|
|
|
104
|
-
###
|
|
127
|
+
### Pick
|
|
105
128
|
|
|
106
|
-
|
|
129
|
+
Implements one slice with Specify → Encode failing test → Fulfill → Clean the Kitchen.
|
|
130
|
+
It consumes prior Roast/Taste evidence, preserves verified behavior, records failed
|
|
131
|
+
approaches, runs independent implementation and test-quality reviews, and emits evidence
|
|
132
|
+
for Roast.
|
|
107
133
|
|
|
108
|
-
|
|
109
|
-
- **SDLC plugin** = the *process* layer. How an agent should sequence work: plan before coding, test-drive, review in a fresh context, verify independently, gate on evidence, then own the review loop.
|
|
134
|
+
### Roast
|
|
110
135
|
|
|
111
|
-
|
|
136
|
+
Runs independently, preferably in fresh context. It builds a requirement/evidence matrix
|
|
137
|
+
and executes objective checks. It does not normally fix implementation code. `FAIL`
|
|
138
|
+
returns exact expected/actual evidence to Pick.
|
|
112
139
|
|
|
113
|
-
|
|
140
|
+
### Brew
|
|
114
141
|
|
|
115
|
-
|
|
142
|
+
Requires Roast proof, runs repository-defined final checks/review, commits/pushes, applies
|
|
143
|
+
the PR template, attaches evidence, records PR/current head, and exits. It does not wait
|
|
144
|
+
for CI or execute Taste.
|
|
116
145
|
|
|
117
|
-
|
|
146
|
+
### Taste
|
|
118
147
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
4. **Consolidate Taste** — inline `autobot` + review-loop behavior; deprecate `submit`/`autobot` repo skills (AP5).
|
|
123
|
-
5. **Document** — `plugins/README.md`, docs-site explainer and how-to, per-stage reference with alias callouts.
|
|
124
|
-
6. **Position** — README, docs landing, comparison table, agent context files.
|
|
125
|
-
7. **Distribute** — publish the marketplace; generate non-Cursor variants via rulesync (AP6).
|
|
148
|
+
Reads current-head CI, mergeability, and unresolved review signals once. It classifies,
|
|
149
|
+
performs one bounded set of actionable fixes, verifies/pushes if changed, emits
|
|
150
|
+
`PASS`/`PENDING`/`BLOCKED`/`FAIL`, and exits. The outer loop schedules another invocation.
|
|
126
151
|
|
|
127
|
-
##
|
|
152
|
+
## Supporting skills
|
|
128
153
|
|
|
129
|
-
|
|
154
|
+
Every stage inventories skills exposed by the harness/repository and loads those whose
|
|
155
|
+
descriptions match the affected domains. Useful project skills may describe APIs, UI,
|
|
156
|
+
data, schemas, prompts, test environments, deployment, documentation, or verification.
|
|
157
|
+
No exact name is hard-required globally.
|
|
130
158
|
|
|
131
|
-
|
|
159
|
+
If repository policy requires a capability and it is missing, the stage returns
|
|
160
|
+
`BLOCKED`. If no skill applies, the stage infers conventions from repository instructions,
|
|
161
|
+
code, tests, scripts, and analogous changes.
|
|
132
162
|
|
|
133
|
-
|
|
134
|
-
- Additional stages (design review, release, incident response).
|
|
135
|
-
- Telemetry on stage usage or success rates.
|
|
136
|
-
- Publishing to a public Cursor plugin directory beyond this repo's marketplace, if one exists.
|
|
163
|
+
## Retry semantics and human gates
|
|
137
164
|
|
|
138
|
-
|
|
165
|
+
Engineering retries are bounded and hypothesis-driven. Each attempt retains exact failure
|
|
166
|
+
evidence and attempted approaches. Changing external state may be observed indefinitely
|
|
167
|
+
by repeated fresh Taste invocations, but no lifecycle skill waits internally.
|
|
139
168
|
|
|
140
|
-
|
|
169
|
+
Human gates include product semantics, architecture/security/data ownership, destructive
|
|
170
|
+
or irreversible operations, permissions, public compatibility, major scope expansion,
|
|
171
|
+
and policy-required approval. `BLOCKED` names the decision, evidence, options/tradeoffs,
|
|
172
|
+
and recommended default.
|
|
141
173
|
|
|
142
|
-
|
|
143
|
-
- `docs/explanation/agentic-sdlc.md`
|
|
144
|
-
- `docs/how-to/use-the-terreno-plugin.md`
|
|
145
|
-
- `docs/reference/sdlc-plugin.md`
|
|
146
|
-
- `plugins/terreno-planning/LICENSE`
|
|
174
|
+
## Compatibility migration
|
|
147
175
|
|
|
148
|
-
|
|
176
|
+
| Retired | Canonical |
|
|
177
|
+
| --- | --- |
|
|
178
|
+
| `terreno-1-blend` | `terreno-1-grow` |
|
|
179
|
+
| `terreno-2-roast` (implementation) | `terreno-2-pick` |
|
|
180
|
+
| `terreno-3-cupping` | `terreno-3-roast` (verification) |
|
|
181
|
+
| `terreno-4-pour` | `terreno-4-brew` |
|
|
182
|
+
| `terreno-5-dialin` | `terreno-5-taste` |
|
|
149
183
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
- `README.md`, `docs/README.md`, `docs/explanation/positioning.md`
|
|
153
|
-
- `AGENTS.md` / `.rulesync/rules/00-root.md`, `CLAUDE-consumer.md`
|
|
154
|
-
- `.rulesync/skills/submit/SKILL.md`, `autobot/SKILL.md` (cross-reference the plugin)
|
|
155
|
-
- `scripts/check-license-coverage.ts` (cover `plugins/`)
|
|
156
|
-
- `.rulesync/skills/build-terreno-app/SKILL.md` (use the pipeline if public)
|
|
184
|
+
Former Grind orchestration becomes an outer-loop feature profile. Former plugin code
|
|
185
|
+
review becomes a shared reference. Neither remains a sixth plugin skill.
|
|
157
186
|
|
|
158
|
-
##
|
|
187
|
+
## Acceptance criteria
|
|
159
188
|
|
|
160
|
-
|
|
189
|
+
- Exactly five canonical lifecycle skill directories exist.
|
|
190
|
+
- Every stage has explicit preconditions, inputs, procedure, supporting skills, evidence,
|
|
191
|
+
success/failure/blocked conditions, and next transition.
|
|
192
|
+
- A fresh Pick/Roast/Taste invocation can reconstruct its work from durable artifacts.
|
|
193
|
+
- Result/status/transition values validate against the common schema.
|
|
194
|
+
- Taste has no internal indefinite wait/observation loop.
|
|
195
|
+
- Brew does not require same-context Taste execution.
|
|
196
|
+
- Lifecycle skills contain no Terreno package names/commands that belong to project skills.
|
|
197
|
+
- Repository skills remain local and discoverable/composable.
|
|
198
|
+
- Backend/API, UI, and multi-invocation CI/review scenarios are documented.
|
|
199
|
+
- Canonical sources and rulesync-generated copies validate cleanly.
|
|
161
200
|
|
|
162
|
-
##
|
|
201
|
+
## Remaining assumptions / weaknesses
|
|
163
202
|
|
|
164
|
-
-
|
|
165
|
-
|
|
166
|
-
-
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
- [ ] Pour and Taste are self-contained per AP5; deprecated `submit`/`autobot` repo skills point to the plugin; no rule is stated in two places with different wording.
|
|
171
|
-
- [ ] `docs/explanation/agentic-sdlc.md` explains the process layer versus the MCP tool layer and why fresh-context independent review matters.
|
|
172
|
-
- [ ] `docs/how-to/use-the-terreno-plugin.md` takes a reader from installation to a merged PR.
|
|
173
|
-
- [ ] `docs/reference/sdlc-plugin.md` documents each stage's scope, inputs, outputs, and boundaries.
|
|
174
|
-
- [ ] `README.md` and `docs/README.md` name the pipeline under the AI-native pillar; the Django/Rails comparison table's generator row cites it.
|
|
175
|
-
- [ ] Every public reference to a coffee-named stage gives its plain-language meaning at least once per page.
|
|
176
|
-
- [ ] The marketplace is installable by the audience chosen in AP1, verified by a fresh install.
|
|
177
|
-
- [ ] `plugins/` is covered by the license-coverage check.
|
|
178
|
-
- [ ] `bun run rules:check` and `bun run check` pass.
|
|
203
|
+
- The plugin defines state/results but does not ship a scheduler or durable remote state
|
|
204
|
+
service; the outer loop must preserve the fallback artifact between machines.
|
|
205
|
+
- Some generated skill formats do not encode Cursor's `disable-model-invocation`
|
|
206
|
+
frontmatter. Enforcement of explicit invocation depends on that agent runtime.
|
|
207
|
+
- Repository skill quality controls how much exact domain knowledge a stage can compose.
|
|
208
|
+
When no skill exists, agents still infer from instructions/code/tests.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Program: B2B platform
|
|
2
2
|
|
|
3
3
|
**Status:** Draft — roadmap items drafted; decisions D1–D7 resolved 2026-08-09; first ten IPs open
|
|
4
|
+
**Roadmap issue:** https://github.com/FlourishHealth/terreno/issues/1095
|
|
4
5
|
**Owner:** unassigned
|
|
5
6
|
**Created:** 2026-08-09
|
|
6
7
|
|
|
@@ -31,7 +32,7 @@ org switcher, dark mode).
|
|
|
31
32
|
|
|
32
33
|
| Track | Theme | IPs / roadmap items |
|
|
33
34
|
|---|---|---|
|
|
34
|
-
| A | Tenancy & access | `orgs-and-teams`, `rbac-permissions` (
|
|
35
|
+
| A | Tenancy & access | `orgs-and-teams`, `rbac-permissions` (Complete), `invitations-and-seats`, `org-management-ui` |
|
|
35
36
|
| C | Communications (pluggable) | `comms-abstraction`, one item **per adapter**: `comms-adapter-expo-push` (first push adapter, per D4), `comms-adapter-twilio-sms`, `comms-adapter-twilio-verify`, `comms-adapter-sendgrid` (first mail adapter, per D2); operations: `comms-admin-dashboard`; consumers: `password-reset-and-email-verification`, `notification-center` |
|
|
36
37
|
| B | Billing | `inbound-webhooks`, `billing-stripe` (web-first, per D1), `mobile-iap-revenuecat` (Future) |
|
|
37
38
|
| D | Zero-to-deployed DX | `create-terreno-app`, `mongo-migrations` (deploy items already exist in the OSS launch program) |
|
|
@@ -92,17 +93,17 @@ All decisions resolved by the maintainer on 2026-08-09:
|
|
|
92
93
|
|
|
93
94
|
| IP | Status | Tasks |
|
|
94
95
|
|---|---|---|
|
|
95
|
-
| [comms-abstraction](comms-abstraction.md) |
|
|
96
|
+
| [comms-abstraction](comms-abstraction.md) | Approved — Phase 1 gap-fill implemented | [tasks](../tasks/comms-abstraction.md) |
|
|
96
97
|
| [comms-adapter-expo-push](comms-adapter-expo-push.md) | Draft | [tasks](../tasks/comms-adapter-expo-push.md) |
|
|
97
98
|
| [comms-adapter-twilio-sms](comms-adapter-twilio-sms.md) | Draft | [tasks](../tasks/comms-adapter-twilio-sms.md) |
|
|
98
99
|
| [comms-adapter-twilio-verify](comms-adapter-twilio-verify.md) | Draft | [tasks](../tasks/comms-adapter-twilio-verify.md) |
|
|
99
|
-
| [comms-adapter-sendgrid](comms-adapter-sendgrid.md) |
|
|
100
|
+
| [comms-adapter-sendgrid](comms-adapter-sendgrid.md) | In progress (Phase 1) | [tasks](../tasks/comms-adapter-sendgrid.md) |
|
|
100
101
|
| [comms-admin-dashboard](comms-admin-dashboard.md) | Draft | [tasks](../tasks/comms-admin-dashboard.md) |
|
|
101
102
|
| [password-reset-and-email-verification](password-reset-and-email-verification.md) | Draft | [tasks](../tasks/password-reset-and-email-verification.md) |
|
|
102
103
|
| [orgs-and-teams](orgs-and-teams.md) | Draft | [tasks](../tasks/orgs-and-teams.md) |
|
|
103
104
|
| [billing-stripe](billing-stripe.md) | Draft | [tasks](../tasks/billing-stripe.md) |
|
|
104
105
|
| [native-module-baseline](native-module-baseline.md) | Draft | [tasks](../tasks/native-module-baseline.md) |
|
|
105
|
-
| [rbac-permissions](rbac-permissions.md) |
|
|
106
|
+
| [rbac-permissions](rbac-permissions.md) | Complete (PR #932) | — |
|
|
106
107
|
|
|
107
108
|
Remaining items (`inbound-webhooks`, `invitations-and-seats`, `org-management-ui`,
|
|
108
109
|
`notification-center`, `framework-audit-log`, `rate-limiting`, `job-queues`, …) get IPs as
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Research: comms-abstraction (finish pass)
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-08-20
|
|
4
|
+
**Scope:** Reconcile the Draft IP with shipped `@terreno/comms` and name remaining roast work.
|
|
5
|
+
|
|
6
|
+
## Shipped (do not re-plan)
|
|
7
|
+
|
|
8
|
+
- Package scaffold, console adapters, `CommsApp`, `getCommsService()`, `PushToken` + routes,
|
|
9
|
+
`GET /comms/messages`, example-backend registration, CI/publish, reference docs, rules.
|
|
10
|
+
- PRs: #1037 (foundation), #1050 (SendGrid adapter — owned by `comms-adapter-sendgrid`).
|
|
11
|
+
- `SendResult.errorCode` / `errorClass` exist; `CommsMessage` stores them.
|
|
12
|
+
- Mail-only inline retry on `errorClass: "transient"`.
|
|
13
|
+
- Partial hooks: `onSend`, `onError`, `onRetry`, `onDeliveryEvent` (the last is never invoked).
|
|
14
|
+
- Recipients redacted at rest (`redactRecipients`, default true).
|
|
15
|
+
- Push pruning uses `isPermanentFailure`, not `errorClass`.
|
|
16
|
+
|
|
17
|
+
## Gaps vs original IP (remaining)
|
|
18
|
+
|
|
19
|
+
| Contract | IP | Code today |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `beforeSend` mutate/cancel | specified | missing |
|
|
22
|
+
| `onOptOut` / `OptOutEvent` | specified | missing |
|
|
23
|
+
| `recordDeliveryEvent` / `recordOptOut` | implied (adapters feed events) | missing; `onDeliveryEvent` dead |
|
|
24
|
+
| `CommsHookContext` | message, userId, isRetry, messageId | `{channel, provider, isRetry?}` |
|
|
25
|
+
| `onRetry` | `(context, attempt)` | `(context, result)` — **keep shipped signature** |
|
|
26
|
+
| Inline retry | all send paths | mail only; SMS/push/verification rethrow |
|
|
27
|
+
| `attempts[]`, payload, retry links | dashboard-ready fields | missing |
|
|
28
|
+
| `status: cancelled` | specified | not in enum |
|
|
29
|
+
| Push prune | permanent failure | `isPermanentFailure` only |
|
|
30
|
+
|
|
31
|
+
## Options considered (finish pass)
|
|
32
|
+
|
|
33
|
+
Remaining work keeps the original IP as the contract. Shrink-to-code was rejected: the
|
|
34
|
+
admin-dashboard IP depends on attempt history, payload retention, and `beforeSend`. A
|
|
35
|
+
follow-up IP was rejected: the fields were already in this plan.
|
|
36
|
+
|
|
37
|
+
Non-breaking choices for a published package:
|
|
38
|
+
|
|
39
|
+
- Keep `onRetry(context, result)`; put `attempt` on `CommsHookContext`.
|
|
40
|
+
- Keep `isPermanentFailure` as an adapter alias; facade also prunes on `errorClass: "permanent"`.
|
|
41
|
+
- Unify provider throws to `SendResult` (no rethrow) so retry can run on every channel.
|
|
42
|
+
|
|
43
|
+
## References
|
|
44
|
+
|
|
45
|
+
- `comms/src/types.ts`, `commsService.ts`, `models/commsMessage.ts`
|
|
46
|
+
- [comms-admin-dashboard.md](comms-admin-dashboard.md)
|
|
47
|
+
- [comms-adapter-sendgrid.md](comms-adapter-sendgrid.md)
|
|
48
|
+
- Roadmap: https://github.com/FlourishHealth/terreno/issues/1018
|