@terreno/agent-plugin 0.0.0-stage → 58.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/.claude-plugin/plugin.json +32 -0
  2. package/CHANGELOG.md +2213 -0
  3. package/LICENSE +21 -0
  4. package/README.md +57 -2
  5. package/agents/pre-commit.md +65 -0
  6. package/agents/ui-verifier.md +93 -0
  7. package/package.json +32 -4
  8. package/references/async-review-bots.md +76 -0
  9. package/references/documentation-contract.md +61 -0
  10. package/references/execution-state.schema.json +77 -0
  11. package/references/github-attention-contract.md +165 -0
  12. package/references/independent-review.md +31 -0
  13. package/references/lifecycle-contract.md +211 -0
  14. package/references/loop-engineering.md +125 -0
  15. package/references/pick-roast-loop.md +112 -0
  16. package/references/pr-deployments.md +69 -0
  17. package/references/product-ci.md +164 -0
  18. package/references/push-ownership.md +91 -0
  19. package/references/stage-result.schema.json +82 -0
  20. package/references/subagent-briefing.md +43 -0
  21. package/references/testing-plan.md +163 -0
  22. package/references/user-guide.md +171 -0
  23. package/skills/1-grow/SKILL.md +145 -0
  24. package/skills/1-grow/references/grilling.md +243 -0
  25. package/skills/2-pick/SKILL.md +170 -0
  26. package/skills/2-pick/references/mocking.md +34 -0
  27. package/skills/2-pick/references/testing.md +43 -0
  28. package/skills/3-roast/SKILL.md +168 -0
  29. package/skills/4-brew/SKILL.md +201 -0
  30. package/skills/5-taste/SKILL.md +311 -0
  31. package/skills/ai-prompt-governance/SKILL.md +100 -0
  32. package/skills/attach-pr-media/SKILL.md +89 -0
  33. package/skills/attach-pr-media/scripts/upload-pr-media.sh +151 -0
  34. package/skills/backend-test-env/SKILL.md +64 -0
  35. package/skills/backfill-regression/SKILL.md +101 -0
  36. package/skills/backfill-user-guide/SKILL.md +96 -0
  37. package/skills/bootstrap-mcp-server/SKILL.md +244 -0
  38. package/skills/building-admin-interfaces/SKILL.md +86 -0
  39. package/skills/building-admin-interfaces/agents/openai.yaml +4 -0
  40. package/skills/building-admin-interfaces/references/nav-and-shell.md +42 -0
  41. package/skills/building-admin-interfaces/references/patterns-and-tools.md +74 -0
  42. package/skills/building-admin-interfaces/references/screens-and-routes.md +50 -0
  43. package/skills/building-terreno-apps/SKILL.md +294 -0
  44. package/skills/building-terreno-apps/agents/openai.yaml +4 -0
  45. package/skills/building-terreno-apps/references/navigation.md +108 -0
  46. package/skills/building-terreno-apps/references/route-structure.md +104 -0
  47. package/skills/building-terreno-apps/references/screen-patterns.md +174 -0
  48. package/skills/debug-syncdb-with-mcp/SKILL.md +75 -0
  49. package/skills/deploy-gcp/SKILL.md +73 -0
  50. package/skills/deploy-gcp/references/troubleshooting.md +29 -0
  51. package/skills/generate-release-announcements/SKILL.md +145 -0
  52. package/skills/generate-sdk/SKILL.md +165 -0
  53. package/skills/mongoose-schema-safety/SKILL.md +164 -0
  54. package/skills/pick-roast-loop/SKILL.md +152 -0
  55. package/skills/planning-loop/SKILL.md +161 -0
  56. package/skills/prd/SKILL.md +138 -0
  57. package/skills/set-up-social-login/SKILL.md +76 -0
  58. package/skills/store-assets/SKILL.md +221 -0
  59. package/skills/store-assets/examples/screenshots.yaml +31 -0
  60. package/skills/store-assets/examples/storeAssets.config.json +44 -0
  61. package/skills/store-assets/scripts/banner.ts +165 -0
  62. package/skills/store-assets/scripts/config.ts +255 -0
  63. package/skills/store-assets/scripts/devClient.ts +635 -0
  64. package/skills/store-assets/scripts/devices.ts +286 -0
  65. package/skills/store-assets/scripts/icon.ts +81 -0
  66. package/skills/store-assets/scripts/maestro/goHome.yaml +21 -0
  67. package/skills/store-assets/scripts/maestro/login.yaml +27 -0
  68. package/skills/store-assets/scripts/maestro/openApp.yaml +26 -0
  69. package/skills/store-assets/scripts/screenshots.ts +848 -0
  70. package/skills/taste-sweep/SKILL.md +172 -0
  71. package/skills/terreno-backend-api/SKILL.md +355 -0
  72. package/skills/terreno-backend-api/agents/openai.yaml +4 -0
  73. package/skills/terreno-backend-api/references/custom-routes.md +132 -0
  74. package/skills/terreno-backend-api/references/model-router.md +112 -0
  75. package/skills/terreno-backend-api/references/server-setup.md +116 -0
  76. package/skills/terreno-backend-tests/SKILL.md +176 -0
  77. package/skills/terreno-data-fetching/SKILL.md +288 -0
  78. package/skills/terreno-data-fetching/agents/openai.yaml +4 -0
  79. package/skills/terreno-data-fetching/references/auth-and-tokens.md +89 -0
  80. package/skills/terreno-data-fetching/references/realtime.md +50 -0
  81. package/skills/terreno-data-fetching/references/sdk-customization.md +55 -0
  82. package/skills/terreno-frontend-tests/SKILL.md +190 -0
  83. package/skills/terreno-mobile-tests/SKILL.md +127 -0
  84. package/skills/terreno-test-setup/SKILL.md +81 -0
  85. package/skills/terreno-test-setup/references/backend.md +131 -0
  86. package/skills/terreno-test-setup/references/frontend.md +169 -0
  87. package/skills/terreno-test-setup/references/mobile.md +134 -0
  88. package/skills/terreno-ui/SKILL.md +252 -0
  89. package/skills/terreno-ui/agents/openai.yaml +4 -0
  90. package/skills/terreno-ui/references/data-display.md +87 -0
  91. package/skills/terreno-ui/references/feedback.md +122 -0
  92. package/skills/terreno-ui/references/forms.md +119 -0
  93. package/skills/terreno-ui/references/layout.md +124 -0
  94. package/skills/terreno-ui/references/theming.md +87 -0
  95. package/skills/update-docs/SKILL.md +82 -0
  96. package/skills/upgrading-terreno/SKILL.md +93 -0
  97. package/skills/upgrading-terreno/references/ordering.md +40 -0
  98. package/skills/verify-ui-changes/SKILL.md +605 -0
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: upgrading-terreno
3
+ description: >-
4
+ Upgrade Terreno lockstep @terreno/* packages. Trigger with "upgrade Terreno",
5
+ "bump @terreno packages", "update to the latest Terreno", or "upgrade terreno version".
6
+ targets: ['*']
7
+ ---
8
+
9
+ # Upgrade Terreno
10
+
11
+ Perform a lockstep `@terreno/*` upgrade. Human-facing twin: `docs/how-to/upgrade-terreno.md`. Ordering detail: [references/ordering.md](references/ordering.md).
12
+
13
+ Do **not** duplicate Expo SDK steps. At step 6 invoke the `upgrading-expo` skill by name.
14
+
15
+ ## Preconditions (refuse, do not warn)
16
+
17
+ Stop immediately and do not mutate the tree if any of these fail:
18
+
19
+ 1. `git status --short` is **not empty** — refuse. Ask the user to commit or stash. A dirty tree has no safe rollback.
20
+ 2. The current branch is the default branch (`master` or `main`) — refuse. Create or switch to a feature branch first.
21
+ 3. Tests on this HEAD have not been shown passing — refuse. Run the app’s usual test command once so later failures are attributable to the upgrade.
22
+
23
+ ## Determine versions
24
+
25
+ 1. Prefer MCP `application_info` from `terreno-mcp-local`.
26
+ 2. Else read every `package.json` that lists `@terreno/*`.
27
+ 3. `fromVersion` = lowest installed `@terreno/*` semver. `toVersion` = user target or latest GitHub release.
28
+
29
+ ## Fetch notes
30
+
31
+ Call hosted MCP `terreno_get_upgrade_guide` with `fromVersion` and `toVersion`. Read every concatenated note. A “no bundled notes” line means **unknown**, not no-op.
32
+
33
+ ## Syncdb / RTK platform migration
34
+
35
+ If `toVersion` is `58.0.0` or later and the app still imports `@terreno/rtk`, `@reduxjs/toolkit`,
36
+ `react-redux`, `redux-persist`, or `@rtk-query/codegen-openapi`, **stop**. Terreno 58 deletes
37
+ `@terreno/rtk` and Redux; this is a platform migration, not a routine bump.
38
+
39
+ Offer exactly two options; do not automate the data-layer migration inside this flow:
40
+
41
+ 1. Bump to the last 57.x release only (stays on `@terreno/rtk`).
42
+ 2. Migrate first with `docs/how-to/migrate-rtk-to-syncdb.md` (every removed export → its
43
+ replacement) and the 58.0.0 upgrade note, then return to this flow.
44
+
45
+ Wait for the user to pick.
46
+
47
+ If `fromVersion` is before `56.0.0-beta.2` and `toVersion` is below 58, the range crosses the
48
+ syncdb introduction; offer the same two options (routine bump, or migrate collection CRUD to
49
+ syncdb with the same guide).
50
+
51
+ ## Plan and confirm (no mutations yet)
52
+
53
+ Print, then **stop until the user confirms**:
54
+
55
+ - `fromVersion` and `toVersion`
56
+ - Notes returned (or the gap warning)
57
+ - Packages affected
58
+ - Ordered steps 1–10 below
59
+
60
+ Do not install, edit lockfiles, or regenerate the client before confirmation.
61
+
62
+ If the caller is an unattended agent whose **invoking task already names** `fromVersion`, `toVersion`, and authorizes the bump (for example Pick Task 5.1), print the same plan into the transcript and treat that task as confirmation. Do not skip the printed plan. Do not skip the stop when a human is in the loop.
63
+
64
+ ## Ordered steps (verification gate after each phase)
65
+
66
+ Match `docs/how-to/upgrade-terreno.md`. After each phase, run its gate. **If compile or tests fail, stop. Do not continue.**
67
+
68
+ Compile means a **typecheck** (`tsc --noEmit` or `bun run compile` when that script typechecks). `bun build` / bundlers that ignore TypeScript errors are not a passing gate.
69
+
70
+ 1. Clean git tree + branch (already enforced).
71
+ 2. Record current `@terreno/*` versions (`application_info` / `package.json`).
72
+ 3. `terreno_get_upgrade_guide` for the range (already fetched). Apply note migrations that are code edits **after** confirmation, in this same order.
73
+ 4. Bump **backend** packages: `@terreno/api`, `@terreno/test`, `@terreno/admin-backend`, `@terreno/blocks` (when the app lists it; `ai` and `ui` depend on it), `@terreno/ai`, `@terreno/api-health`, `@terreno/comms`, `@terreno/feature-flags`, `@terreno/mcp`. `bun install`.
74
+ 5. Backend `bun run compile` and backend tests. Gate: both pass.
75
+ 6. Expo SDK — invoke **`upgrading-expo`**. Skip only when Terreno majors do not require a new Expo (same Expo line). Gate: `npx expo-doctor` / install --fix as that skill requires; native rebuild if peers moved.
76
+ 7. Bump **frontend** packages: `@terreno/ui`, `@terreno/syncdb`, `@terreno/admin-frontend`, `@terreno/admin-spa`. `bun install`. (`@terreno/rtk` stops at 57.x; on 58+ remove it.)
77
+ 8. Start the **upgraded** backend. Regenerate the typed client (`bun run sdk`, and `bun run sync-sdk` when the app has synced collections).
78
+ 9. `bun run compile`, `bun run lint`, and the app tests. Gate: all pass.
79
+ 10. Run the app, log in, exercise changed screens.
80
+
81
+ ## Failure handling
82
+
83
+ Report all three:
84
+
85
+ 1. What succeeded (last passing step number).
86
+ 2. What failed (command and first error line).
87
+ 3. Rollback: `git reset --hard` on this branch, or `git checkout <pre-upgrade-sha> -- package.json bun.lock && bun install`.
88
+
89
+ On a **multi-version** jump failure: retry **version by version** (`from` → next recorded note version → …) to isolate the breaking version. Keep the failing consumer file. The first version whose typecheck fails is the isolate. Do not continue past a failed compile or test run.
90
+
91
+ ## Final report
92
+
93
+ Print `fromVersion` → `toVersion`, notes applied, packages bumped, gates that passed, and remaining human follow-ups (native store binaries, the 58 RTK-to-syncdb migration if deferred).
@@ -0,0 +1,40 @@
1
+ # Upgrade ordering
2
+
3
+ Why the `upgrading-terreno` skill bumps packages in a fixed order. Packages below are every published job in `.github/workflows/publish-on-tag.yml`.
4
+
5
+ ## Package classes
6
+
7
+ | Class | Packages (`publish-on-tag.yml` job) |
8
+ | --- | --- |
9
+ | Backend | `api`, `test`, `admin-backend`, `blocks`, `ai`, `api-health`, `comms`, `feature-flags`, `mcp` |
10
+ | Frontend | `ui`, `syncdb`, `admin-frontend`, `admin-spa` |
11
+
12
+ `blocks` holds contracts that both `ai` and `ui` depend on, so it moves with the backend step.
13
+
14
+ `demo` and the example apps are not published. `rtk` was published through 57.x and removed in 58.
15
+
16
+ ## Backend before frontend
17
+
18
+ The OpenAPI document from the running backend is the contract `bun run sdk` consumes. Regenerating the client against an **un-upgraded** backend produces hooks for the old surface: new routes and fields are missing, and consumer screens fail at **compile** (`Property X does not exist on type …` or a missing generated hook).
19
+
20
+ Bump and compile backend packages first, then start that backend, then regenerate.
21
+
22
+ ## Typed client only after the new backend is up
23
+
24
+ `example-frontend` codegen reads `http://localhost:4000/openapi.json` (or `OPENAPI_URL`). If the process is still the old binary, `store/apiSdk.ts` (and `store/syncDbSdk.ts`) are silently stale. Symptom: runtime 404 on new paths or TypeScript errors after you edit screens to call new endpoints that the SDK never emitted.
25
+
26
+ ## Expo before `@terreno/ui`
27
+
28
+ `ui/package.json` `peerDependencies` pin `react-native` to the Expo line (for example `~0.86.0` on Terreno 57). Installing `@terreno/ui@57` while the app is still on Expo 54 / RN 0.81 fails peer resolution or breaks at Metro/native build. Symptom: `ERESOLVE` / unmet peer, or a native module ABI mismatch after `expo start`.
29
+
30
+ Run `upgrading-expo` (skill name) before bumping Terreno frontend packages when the Terreno major tracks a new Expo SDK.
31
+
32
+ ## Violation symptoms
33
+
34
+ | If you… | What breaks |
35
+ | --- | --- |
36
+ | Bump `@terreno/ui` before Expo | Unmet `react-native` peers; native rebuild required anyway |
37
+ | Run `bun run sdk` before upgrading/starting the backend | Generated client missing new operations; compile errors in screens |
38
+ | Bump frontend `@terreno/*` before backend compile | Client types and server handlers disagree; 4xx/5xx on new fields |
39
+ | Mix `@terreno/api@57` with `@terreno/ui@0.31` | Unsupported; lockstep publish tags one version for every package |
40
+ | Continue after a failed `compile` | Half-upgraded lockfile; rollback is unclear |