@mr.dj2u/knowledge 0.1.7 → 0.1.8

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 (59) hide show
  1. package/dist/content/checklists/push-merge-loop.md +17 -17
  2. package/dist/content/checklists/unified-agent-bundle-validation.md +9 -9
  3. package/dist/content/examples/push-merge-loop.md +14 -14
  4. package/dist/content/examples/unified-agent-bundle-bootstrap.md +8 -8
  5. package/dist/content/guides/post-create-onboarding.md +140 -140
  6. package/dist/content/patterns/api/api-routes.md +313 -313
  7. package/dist/content/patterns/api/error-handling.md +310 -310
  8. package/dist/content/patterns/database/drizzle-schema.md +279 -279
  9. package/dist/content/patterns/database/migrations.md +364 -364
  10. package/dist/content/patterns/database/query-organization.md +536 -536
  11. package/dist/content/patterns/database/relations.md +449 -449
  12. package/dist/content/patterns/deployment/build-configuration.md +440 -440
  13. package/dist/content/patterns/deployment/ci-cd-patterns.md +447 -447
  14. package/dist/content/patterns/deployment/environment-config.md +379 -379
  15. package/dist/content/patterns/deployment/hosting-setup.md +424 -424
  16. package/dist/content/patterns/project/configuration-patterns.md +459 -459
  17. package/dist/content/patterns/project/documentation-org.md +506 -506
  18. package/dist/content/patterns/project/folder-structure.md +397 -397
  19. package/dist/content/patterns/project/library-exports.md +464 -464
  20. package/dist/content/patterns/project/monorepo-structure.md +500 -500
  21. package/dist/content/patterns/routing/dynamic-routes.md +220 -220
  22. package/dist/content/patterns/routing/file-based-routing.md +185 -185
  23. package/dist/content/patterns/routing/route-groups.md +428 -428
  24. package/dist/content/patterns/state/persistence-middleware.md +520 -520
  25. package/dist/content/patterns/state/selector-hooks.md +537 -537
  26. package/dist/content/patterns/state/store-organization.md +538 -538
  27. package/dist/content/patterns/state/zustand-patterns.md +347 -347
  28. package/dist/content/patterns/styling/component-styling.md +467 -467
  29. package/dist/content/patterns/styling/responsive-patterns.md +397 -397
  30. package/dist/content/patterns/styling/theme-configuration.md +425 -425
  31. package/dist/content/patterns/styling/uniwind-setup.md +411 -411
  32. package/dist/content/prompts/continue-development.md +35 -35
  33. package/dist/content/prompts/fix-seo.md +29 -29
  34. package/dist/content/prompts/onboard-new-expo-app.md +11 -11
  35. package/dist/content/prompts/prepare-deploy.md +29 -29
  36. package/dist/content/prompts/project-research-plan.md +29 -29
  37. package/dist/content/prompts/push-merge-loop.md +25 -25
  38. package/dist/content/prompts/review-expo-project.md +29 -29
  39. package/dist/content/prompts/run-doctor.md +38 -38
  40. package/dist/content/prompts/wrap-up.md +67 -67
  41. package/dist/content/reference/create-expo-stack-uniwind.md +29 -29
  42. package/dist/content/reference/mcp-sdk-transport.md +30 -30
  43. package/dist/content/reference/reference-repo-evacuation.md +31 -31
  44. package/dist/content/skills/api-routes.md +33 -33
  45. package/dist/content/skills/continue-development.md +32 -32
  46. package/dist/content/skills/debugging.md +32 -32
  47. package/dist/content/skills/deployment.md +32 -32
  48. package/dist/content/skills/dev-server-management.md +32 -32
  49. package/dist/content/skills/env-vars.md +32 -32
  50. package/dist/content/skills/expo-router-architecture.md +33 -33
  51. package/dist/content/skills/expo-ssr-safety.md +32 -32
  52. package/dist/content/skills/plugin-creation.md +41 -41
  53. package/dist/content/skills/production-server-patterns.md +31 -31
  54. package/dist/content/skills/project-onboarding.md +31 -31
  55. package/dist/content/skills/research-plan-intake.md +32 -32
  56. package/dist/content/skills/seo-metadata.md +31 -31
  57. package/dist/content/skills/super-stack-startup.md +34 -34
  58. package/dist/content/skills/uniwind-theming.md +32 -32
  59. package/package.json +6 -1
@@ -1,30 +1,30 @@
1
- # MCP SDK Transport Pattern
2
-
3
- Source pattern: `mds-app-mcp/src/index.ts`.
4
-
5
- ## Core Shape
6
-
7
- - Create a high-level `McpServer` from `@modelcontextprotocol/sdk/server/mcp.js`.
8
- - Register static markdown resources with stable `mds://` URIs.
9
- - Register tools with schemas and handlers that return MCP text content.
10
- - Register prompts for reusable agent workflows.
11
- - Connect with `StdioServerTransport` for local agent use.
12
- - Keep HTTP/SSE transport as a later hosting concern unless a client needs it.
13
-
14
- ## MDS Suite Decision
15
-
16
- Phase 1 uses stdio as the production MCP transport because it works for local
17
- Codex/Claude workflows and avoids server lifecycle complexity. The server
18
- still exposes pure functions for tests and direct CLI verification:
19
-
20
- - `createMrdjMcpServer()`
21
- - `startStdioServer()`
22
- - `listResources()`
23
- - `readResource(uri)`
24
- - `executeTool(name, input)`
25
-
26
- ## Resource Rule
27
-
28
- MCP resources must be generated from `packages/knowledge`, not hand-copied into
29
- `packages/mcp-server`.
30
-
1
+ # MCP SDK Transport Pattern
2
+
3
+ Source pattern: `mds-app-mcp/src/index.ts`.
4
+
5
+ ## Core Shape
6
+
7
+ - Create a high-level `McpServer` from `@modelcontextprotocol/sdk/server/mcp.js`.
8
+ - Register static markdown resources with stable `mds://` URIs.
9
+ - Register tools with schemas and handlers that return MCP text content.
10
+ - Register prompts for reusable agent workflows.
11
+ - Connect with `StdioServerTransport` for local agent use.
12
+ - Keep HTTP/SSE transport as a later hosting concern unless a client needs it.
13
+
14
+ ## MDS Suite Decision
15
+
16
+ Phase 1 uses stdio as the production MCP transport because it works for local
17
+ Codex/Claude workflows and avoids server lifecycle complexity. The server
18
+ still exposes pure functions for tests and direct CLI verification:
19
+
20
+ - `createMrdjMcpServer()`
21
+ - `startStdioServer()`
22
+ - `listResources()`
23
+ - `readResource(uri)`
24
+ - `executeTool(name, input)`
25
+
26
+ ## Resource Rule
27
+
28
+ MCP resources must be generated from `packages/knowledge`, not hand-copied into
29
+ `packages/mcp-server`.
30
+
@@ -1,31 +1,31 @@
1
- # Reference Repo Evacuation
2
-
3
- Phase 1 captured the useful patterns from the temporary multi-root workspace so
4
- Mr. DJ's Dev Suite can run from a clean single-folder workspace.
5
-
6
- ## Captured Sources
7
-
8
- | Source repo | Captured knowledge | Suite destination |
9
- | --- | --- | --- |
10
- | `mds-app-mcp` | MCP SDK server construction, stdio transport, resource registration, prompt registration, and guide loading pattern. | `reference/mcp-sdk-transport.md`, MCP server implementation |
11
- | `mds-pokemon-mcp` | MCP family naming and guide/resource convention. | Knowledge resource URI rules |
12
- | `mds-fne-mcp` | MCP family naming and tool/resource split. | Knowledge resource URI rules |
13
- | `time2pay` | Uniwind setup, CI-equivalent checks, env handling, Expo deployment shape, Doctor dogfood target. | Patterns, Doctor fixtures, `reference/doctor-dogfood.md` |
14
- | `DJsPortfolio` | API route proxy patterns, Drizzle schema examples, docs organization, route structure, Doctor dogfood target. | API/database/project patterns |
15
- | `PokePages` | Dynamic route hierarchies, Zustand stores, Drizzle migrations, Doctor dogfood target. | Routing/state/database patterns |
16
- | `not-hot-dog` | Small app route structure and docs memory convention. | Project/routing patterns |
17
- | `expo-super-template` | Post-create defaults, Uniwind Metro/global CSS setup, onboarding target shape, Doctor dogfood target. | Styling/onboarding guides |
18
- | `core-monorepo` | Turborepo package layout, shared package exports, package-manager detection, Doctor dogfood target. | Project/deployment patterns |
19
- | `mercury-bank-sdk` | Library package export fields, npm workspace scripts, build/test/typecheck workflow. | Project/library and package CI patterns |
20
- | `ads-sdk` | Small TypeScript SDK package shape and publish build workflow. | Package/CI reference notes |
21
- | `quantum-api` | Dual ESM/CJS SDK build pattern and generated package metadata workflow. | Package/CI reference notes |
22
-
23
- ## Evacuation Rules
24
-
25
- - Keep repo names and relative file paths as source notes; do not depend on
26
- machine-specific absolute paths.
27
- - Keep reference repos read-only during harvest.
28
- - Delete `temp/` clones after their patterns are promoted or intentionally
29
- discarded.
30
- - A new engineer should be able to open only Mr. DJ's Dev Suite and still access
31
- all Phase 1 knowledge through `packages/knowledge`.
1
+ # Reference Repo Evacuation
2
+
3
+ Phase 1 captured the useful patterns from the temporary multi-root workspace so
4
+ Mr. DJ's Dev Suite can run from a clean single-folder workspace.
5
+
6
+ ## Captured Sources
7
+
8
+ | Source repo | Captured knowledge | Suite destination |
9
+ | --- | --- | --- |
10
+ | `mds-app-mcp` | MCP SDK server construction, stdio transport, resource registration, prompt registration, and guide loading pattern. | `reference/mcp-sdk-transport.md`, MCP server implementation |
11
+ | `mds-pokemon-mcp` | MCP family naming and guide/resource convention. | Knowledge resource URI rules |
12
+ | `mds-fne-mcp` | MCP family naming and tool/resource split. | Knowledge resource URI rules |
13
+ | `time2pay` | Uniwind setup, CI-equivalent checks, env handling, Expo deployment shape, Doctor dogfood target. | Patterns, Doctor fixtures, `reference/doctor-dogfood.md` |
14
+ | `DJsPortfolio` | API route proxy patterns, Drizzle schema examples, docs organization, route structure, Doctor dogfood target. | API/database/project patterns |
15
+ | `PokePages` | Dynamic route hierarchies, Zustand stores, Drizzle migrations, Doctor dogfood target. | Routing/state/database patterns |
16
+ | `not-hot-dog` | Small app route structure and docs memory convention. | Project/routing patterns |
17
+ | `expo-super-template` | Post-create defaults, Uniwind Metro/global CSS setup, onboarding target shape, Doctor dogfood target. | Styling/onboarding guides |
18
+ | `core-monorepo` | Turborepo package layout, shared package exports, package-manager detection, Doctor dogfood target. | Project/deployment patterns |
19
+ | `mercury-bank-sdk` | Library package export fields, npm workspace scripts, build/test/typecheck workflow. | Project/library and package CI patterns |
20
+ | `ads-sdk` | Small TypeScript SDK package shape and publish build workflow. | Package/CI reference notes |
21
+ | `quantum-api` | Dual ESM/CJS SDK build pattern and generated package metadata workflow. | Package/CI reference notes |
22
+
23
+ ## Evacuation Rules
24
+
25
+ - Keep repo names and relative file paths as source notes; do not depend on
26
+ machine-specific absolute paths.
27
+ - Keep reference repos read-only during harvest.
28
+ - Delete `temp/` clones after their patterns are promoted or intentionally
29
+ discarded.
30
+ - A new engineer should be able to open only Mr. DJ's Dev Suite and still access
31
+ all Phase 1 knowledge through `packages/knowledge`.
@@ -1,33 +1,33 @@
1
- # Skill: API Routes
2
-
3
- Use when creating, reviewing, or debugging Expo Router API route handlers.
4
-
5
- ## Main rule
6
-
7
- Keep route handlers thin and defensive: validate input, enforce auth/authorization before data access, and return consistent typed responses.
8
-
9
- ## Checks
10
-
11
- - Confirm each endpoint handles allowed methods explicitly and rejects unsupported methods.
12
- - Validate request params/body with schema guards before business logic executes.
13
- - Enforce auth first for privileged operations; never rely on client-provided roles.
14
- - Keep service-role credentials on server-only paths and avoid exposing them to client bundles.
15
- - Confirm error responses are structured and safe (no stack traces or secret values).
16
-
17
- ## Preferred structure
18
-
19
- - Use one route module per resource concern.
20
- - Parse and validate request data first, then call feature/service logic.
21
- - Keep DB and external API logic in service modules, not inline in route files.
22
- - Use a shared response envelope pattern for success and failure paths.
23
-
24
- ## Example fix
25
-
26
- - Problem: A `POST` route writes directly to DB with unchecked body data.
27
- - Fix: Add schema validation, early auth check, and move write logic into a service function before returning a typed response object.
28
-
29
- ## Agent behavior
30
-
31
- - Apply the smallest safe refactor that adds validation/auth boundaries first.
32
- - Delegate framework primitive questions to official Expo API route guidance, then layer MDS project-specific rules (env boundaries, doc updates, Doctor compatibility).
33
-
1
+ # Skill: API Routes
2
+
3
+ Use when creating, reviewing, or debugging Expo Router API route handlers.
4
+
5
+ ## Main rule
6
+
7
+ Keep route handlers thin and defensive: validate input, enforce auth/authorization before data access, and return consistent typed responses.
8
+
9
+ ## Checks
10
+
11
+ - Confirm each endpoint handles allowed methods explicitly and rejects unsupported methods.
12
+ - Validate request params/body with schema guards before business logic executes.
13
+ - Enforce auth first for privileged operations; never rely on client-provided roles.
14
+ - Keep service-role credentials on server-only paths and avoid exposing them to client bundles.
15
+ - Confirm error responses are structured and safe (no stack traces or secret values).
16
+
17
+ ## Preferred structure
18
+
19
+ - Use one route module per resource concern.
20
+ - Parse and validate request data first, then call feature/service logic.
21
+ - Keep DB and external API logic in service modules, not inline in route files.
22
+ - Use a shared response envelope pattern for success and failure paths.
23
+
24
+ ## Example fix
25
+
26
+ - Problem: A `POST` route writes directly to DB with unchecked body data.
27
+ - Fix: Add schema validation, early auth check, and move write logic into a service function before returning a typed response object.
28
+
29
+ ## Agent behavior
30
+
31
+ - Apply the smallest safe refactor that adds validation/auth boundaries first.
32
+ - Delegate framework primitive questions to official Expo API route guidance, then layer MDS project-specific rules (env boundaries, doc updates, Doctor compatibility).
33
+
@@ -1,32 +1,32 @@
1
- # Skill: Continue Development
2
-
3
- Use when resuming work on an onboarded app and selecting the next task from `project/todo.md`.
4
-
5
- ## Main rule
6
-
7
- Continue phase-by-phase: finish in-progress phase items first, and only defer/move tasks with an explicit note and user confirmation.
8
-
9
- ## Checks
10
-
11
- - Confirm project memory files are present and current before task selection.
12
- - Identify the active phase and incomplete tasks in `project/todo.md`.
13
- - Confirm blockers/context markers are resolved before feature implementation.
14
- - Confirm any deferral includes a clear reason and destination note.
15
- - Re-run Doctor/checks after significant phase tasks are completed.
16
-
17
- ## Preferred structure
18
-
19
- - Start each session by summarizing current phase state and next recommended task.
20
- - Keep task updates minimal and explicit in `project/todo.md`.
21
- - Keep roadmap changes aligned with product intent in `project/info.md`.
22
-
23
- ## Example fix
24
-
25
- - Problem: Agent jumps to a later phase feature while current phase has unresolved blockers.
26
- - Fix: Return to active phase tasks, complete or formally defer blockers, then proceed to later phase work.
27
-
28
- ## Agent behavior
29
-
30
- - Optimize for forward progress without losing roadmap integrity.
31
- - Avoid silently reordering roadmap priorities; ask for confirmation before major sequencing changes.
32
- - Treat this as an MDS-only workflow skill: use official Expo or React Native guidance for framework mechanics, then apply MDS phase order, project memory, and Doctor checks.
1
+ # Skill: Continue Development
2
+
3
+ Use when resuming work on an onboarded app and selecting the next task from `project/todo.md`.
4
+
5
+ ## Main rule
6
+
7
+ Continue phase-by-phase: finish in-progress phase items first, and only defer/move tasks with an explicit note and user confirmation.
8
+
9
+ ## Checks
10
+
11
+ - Confirm project memory files are present and current before task selection.
12
+ - Identify the active phase and incomplete tasks in `project/todo.md`.
13
+ - Confirm blockers/context markers are resolved before feature implementation.
14
+ - Confirm any deferral includes a clear reason and destination note.
15
+ - Re-run Doctor/checks after significant phase tasks are completed.
16
+
17
+ ## Preferred structure
18
+
19
+ - Start each session by summarizing current phase state and next recommended task.
20
+ - Keep task updates minimal and explicit in `project/todo.md`.
21
+ - Keep roadmap changes aligned with product intent in `project/info.md`.
22
+
23
+ ## Example fix
24
+
25
+ - Problem: Agent jumps to a later phase feature while current phase has unresolved blockers.
26
+ - Fix: Return to active phase tasks, complete or formally defer blockers, then proceed to later phase work.
27
+
28
+ ## Agent behavior
29
+
30
+ - Optimize for forward progress without losing roadmap integrity.
31
+ - Avoid silently reordering roadmap priorities; ask for confirmation before major sequencing changes.
32
+ - Treat this as an MDS-only workflow skill: use official Expo or React Native guidance for framework mechanics, then apply MDS phase order, project memory, and Doctor checks.
@@ -1,32 +1,32 @@
1
- # Skill: Debugging
2
-
3
- Use when diagnosing broken behavior, flaky tooling, or unclear failures in Expo projects.
4
-
5
- ## Main rule
6
-
7
- Debug by narrowing scope quickly: reproduce, isolate, capture evidence, apply the smallest safe fix, then verify.
8
-
9
- ## Checks
10
-
11
- - Reproduce the issue consistently and record exact command/path/error output.
12
- - Confirm environment assumptions (platform, output mode, env vars, script path) match the failing context.
13
- - Run targeted checks first (`mds doctor`, focused tests, route/file scans) before broad reruns.
14
- - Separate root-cause signals from secondary cascade errors.
15
- - Re-verify with the same reproduction path after the fix.
16
-
17
- ## Preferred structure
18
-
19
- - Keep debugging notes concise in task output or project memory when the issue is recurring.
20
- - Prefer deterministic scripts over ad-hoc manual sequences.
21
- - Escalate from narrow test scope to broader validation only after targeted checks pass.
22
-
23
- ## Example fix
24
-
25
- - Problem: Route crashes only on web server output with ambiguous stack traces.
26
- - Fix: Reproduce in server mode, isolate browser-global usage in shared module, add guards, rerun targeted test and Doctor scan.
27
-
28
- ## Agent behavior
29
-
30
- - Start with high-risk failures (security, data loss, crashers), then address lower-risk warnings.
31
- - Keep users unblocked with concrete next commands and avoid speculative broad refactors before evidence is clear.
32
- - Delegate framework primitive questions to official Expo or React Native guidance, then apply MDS reproduction discipline, Doctor checks, and project-memory context.
1
+ # Skill: Debugging
2
+
3
+ Use when diagnosing broken behavior, flaky tooling, or unclear failures in Expo projects.
4
+
5
+ ## Main rule
6
+
7
+ Debug by narrowing scope quickly: reproduce, isolate, capture evidence, apply the smallest safe fix, then verify.
8
+
9
+ ## Checks
10
+
11
+ - Reproduce the issue consistently and record exact command/path/error output.
12
+ - Confirm environment assumptions (platform, output mode, env vars, script path) match the failing context.
13
+ - Run targeted checks first (`mds doctor`, focused tests, route/file scans) before broad reruns.
14
+ - Separate root-cause signals from secondary cascade errors.
15
+ - Re-verify with the same reproduction path after the fix.
16
+
17
+ ## Preferred structure
18
+
19
+ - Keep debugging notes concise in task output or project memory when the issue is recurring.
20
+ - Prefer deterministic scripts over ad-hoc manual sequences.
21
+ - Escalate from narrow test scope to broader validation only after targeted checks pass.
22
+
23
+ ## Example fix
24
+
25
+ - Problem: Route crashes only on web server output with ambiguous stack traces.
26
+ - Fix: Reproduce in server mode, isolate browser-global usage in shared module, add guards, rerun targeted test and Doctor scan.
27
+
28
+ ## Agent behavior
29
+
30
+ - Start with high-risk failures (security, data loss, crashers), then address lower-risk warnings.
31
+ - Keep users unblocked with concrete next commands and avoid speculative broad refactors before evidence is clear.
32
+ - Delegate framework primitive questions to official Expo or React Native guidance, then apply MDS reproduction discipline, Doctor checks, and project-memory context.
@@ -1,32 +1,32 @@
1
- # Skill: Deployment Readiness
2
-
3
- Use before merging or releasing an Expo project to shared environments.
4
-
5
- ## Main rule
6
-
7
- Treat deployment as a repeatable checklist: pass local quality gates, verify runtime configuration, and document rollback expectations before ship.
8
-
9
- ## Checks
10
-
11
- - Run lint, type-check, tests, Expo Doctor, and production build/profile checks when scripts exist.
12
- - Verify env vars are documented and separated by client/server exposure level.
13
- - Confirm output mode and hosting assumptions match the selected platform strategy.
14
- - Confirm metadata/indexing basics are defined for web exports.
15
- - Record release and rollback notes for the current change batch.
16
-
17
- ## Preferred structure
18
-
19
- - Keep release checks in scripts that CI and agents can run consistently.
20
- - Gate merge/publish flows on the same Doctor and package validation criteria.
21
- - Keep deployment conventions in `project/guidelines.md` and release tasks in `project/todo.md`.
22
-
23
- ## Example fix
24
-
25
- - Problem: Release pipeline runs tests but skips Expo Doctor and build profile checks.
26
- - Fix: Add missing scripts, wire them into pre-merge checks, and document the required sequence in project memory.
27
-
28
- ## Agent behavior
29
-
30
- - Run project-defined checks first; do not invent alternate release criteria.
31
- - Delegate framework deployment primitives to official Expo guidance, then apply MDS workflow rules for docs, Doctor parity, and rollback readiness.
32
-
1
+ # Skill: Deployment Readiness
2
+
3
+ Use before merging or releasing an Expo project to shared environments.
4
+
5
+ ## Main rule
6
+
7
+ Treat deployment as a repeatable checklist: pass local quality gates, verify runtime configuration, and document rollback expectations before ship.
8
+
9
+ ## Checks
10
+
11
+ - Run lint, type-check, tests, Expo Doctor, and production build/profile checks when scripts exist.
12
+ - Verify env vars are documented and separated by client/server exposure level.
13
+ - Confirm output mode and hosting assumptions match the selected platform strategy.
14
+ - Confirm metadata/indexing basics are defined for web exports.
15
+ - Record release and rollback notes for the current change batch.
16
+
17
+ ## Preferred structure
18
+
19
+ - Keep release checks in scripts that CI and agents can run consistently.
20
+ - Gate merge/publish flows on the same Doctor and package validation criteria.
21
+ - Keep deployment conventions in `project/guidelines.md` and release tasks in `project/todo.md`.
22
+
23
+ ## Example fix
24
+
25
+ - Problem: Release pipeline runs tests but skips Expo Doctor and build profile checks.
26
+ - Fix: Add missing scripts, wire them into pre-merge checks, and document the required sequence in project memory.
27
+
28
+ ## Agent behavior
29
+
30
+ - Run project-defined checks first; do not invent alternate release criteria.
31
+ - Delegate framework deployment primitives to official Expo guidance, then apply MDS workflow rules for docs, Doctor parity, and rollback readiness.
32
+
@@ -1,32 +1,32 @@
1
- # Skill: Dev Server Management
2
-
3
- Use when Expo or Metro local development servers fail to boot cleanly, hang, or bind to conflicting ports.
4
-
5
- ## Main rule
6
-
7
- Use a deterministic reset path first; do not work around unstable server state with ad-hoc port fallbacks.
8
-
9
- ## Checks
10
-
11
- - Run `mds clear-expo-start` before manual troubleshooting.
12
- - If a conflict remains, run `mds free-port <port...>` for blocked ports.
13
- - Confirm Expo/Metro caches are cleared before retrying startup.
14
- - Treat fallback to port `8082` as an unresolved state that requires full reset.
15
- - Confirm the same recovery scripts are available to teammates and automation.
16
-
17
- ## Preferred structure
18
-
19
- - Keep project scripts for clear-expo-start and targeted port cleanup.
20
- - Standardize a single restart path in project memory (`project/guidelines.md`).
21
- - Use explicit “fresh” commands when booting local or production-like flows.
22
-
23
- ## Example fix
24
-
25
- - Problem: `expo start` repeatedly falls back to `8082` after a partial crash.
26
- - Fix: Run `mds clear-expo-start`, free remaining blocked ports, clear cache, and restart via the project's clear-expo-start script.
27
-
28
- ## Agent behavior
29
-
30
- - Prefer established MDS cleanup commands over custom shell sequences.
31
- - Avoid introducing alternate fallback port workflows that hide root-cause server state issues.
32
- - Delegate Expo or Metro mechanics to official Expo guidance, then apply MDS reset commands, script consistency, and onboarding defaults.
1
+ # Skill: Dev Server Management
2
+
3
+ Use when Expo or Metro local development servers fail to boot cleanly, hang, or bind to conflicting ports.
4
+
5
+ ## Main rule
6
+
7
+ Use a deterministic reset path first; do not work around unstable server state with ad-hoc port fallbacks.
8
+
9
+ ## Checks
10
+
11
+ - Run `mds clear-expo-start` before manual troubleshooting.
12
+ - If a conflict remains, run `mds free-port <port...>` for blocked ports.
13
+ - Confirm Expo/Metro caches are cleared before retrying startup.
14
+ - Treat fallback to port `8082` as an unresolved state that requires full reset.
15
+ - Confirm the same recovery scripts are available to teammates and automation.
16
+
17
+ ## Preferred structure
18
+
19
+ - Keep project scripts for clear-expo-start and targeted port cleanup.
20
+ - Standardize a single restart path in project memory (`project/guidelines.md`).
21
+ - Use explicit “fresh” commands when booting local or production-like flows.
22
+
23
+ ## Example fix
24
+
25
+ - Problem: `expo start` repeatedly falls back to `8082` after a partial crash.
26
+ - Fix: Run `mds clear-expo-start`, free remaining blocked ports, clear cache, and restart via the project's clear-expo-start script.
27
+
28
+ ## Agent behavior
29
+
30
+ - Prefer established MDS cleanup commands over custom shell sequences.
31
+ - Avoid introducing alternate fallback port workflows that hide root-cause server state issues.
32
+ - Delegate Expo or Metro mechanics to official Expo guidance, then apply MDS reset commands, script consistency, and onboarding defaults.
@@ -1,32 +1,32 @@
1
- # Skill: Environment Variables
2
-
3
- Use when adding, reviewing, or debugging app configuration and secrets handling.
4
-
5
- ## Main rule
6
-
7
- Keep a hard boundary between public client config and private server secrets; anything sensitive must never cross into `EXPO_PUBLIC_*` variables.
8
-
9
- ## Checks
10
-
11
- - Confirm secrets (service-role keys, private tokens, payment secrets, passwords) are server-only.
12
- - Confirm `EXPO_PUBLIC_*` values are safe to expose in client bundles.
13
- - Validate required env keys exist for each runtime mode used by the project.
14
- - Ensure Supabase anon key usage is scoped to client-safe flows and service-role usage is server-only.
15
- - Verify env naming/docs are consistent across `.env` files, scripts, and project memory.
16
-
17
- ## Preferred structure
18
-
19
- - Keep env access centralized through small typed config helpers.
20
- - Separate client-safe config and server-only config modules.
21
- - Document required keys and local setup in project memory and onboarding outputs.
22
-
23
- ## Example fix
24
-
25
- - Problem: A route imports `EXPO_PUBLIC_SUPABASE_SERVICE_ROLE_KEY` from client config.
26
- - Fix: Move service-role key to server-only env access, switch client flow to anon key, and update docs/checks.
27
-
28
- ## Agent behavior
29
-
30
- - Prioritize removing exposure risk before refactoring for style.
31
- - Delegate framework/env-loading primitives to official Expo guidance, then enforce MDS-specific security boundaries and Doctor alignment.
32
-
1
+ # Skill: Environment Variables
2
+
3
+ Use when adding, reviewing, or debugging app configuration and secrets handling.
4
+
5
+ ## Main rule
6
+
7
+ Keep a hard boundary between public client config and private server secrets; anything sensitive must never cross into `EXPO_PUBLIC_*` variables.
8
+
9
+ ## Checks
10
+
11
+ - Confirm secrets (service-role keys, private tokens, payment secrets, passwords) are server-only.
12
+ - Confirm `EXPO_PUBLIC_*` values are safe to expose in client bundles.
13
+ - Validate required env keys exist for each runtime mode used by the project.
14
+ - Ensure Supabase anon key usage is scoped to client-safe flows and service-role usage is server-only.
15
+ - Verify env naming/docs are consistent across `.env` files, scripts, and project memory.
16
+
17
+ ## Preferred structure
18
+
19
+ - Keep env access centralized through small typed config helpers.
20
+ - Separate client-safe config and server-only config modules.
21
+ - Document required keys and local setup in project memory and onboarding outputs.
22
+
23
+ ## Example fix
24
+
25
+ - Problem: A route imports `EXPO_PUBLIC_SUPABASE_SERVICE_ROLE_KEY` from client config.
26
+ - Fix: Move service-role key to server-only env access, switch client flow to anon key, and update docs/checks.
27
+
28
+ ## Agent behavior
29
+
30
+ - Prioritize removing exposure risk before refactoring for style.
31
+ - Delegate framework/env-loading primitives to official Expo guidance, then enforce MDS-specific security boundaries and Doctor alignment.
32
+
@@ -1,33 +1,33 @@
1
- # Skill: Expo Router Architecture
2
-
3
- Use when structuring, reviewing, or refactoring Expo Router route code.
4
-
5
- ## Main rule
6
-
7
- Keep route files thin: routing and composition belong in `app/`, while business/data logic lives in feature, service, and shared modules.
8
-
9
- ## Checks
10
-
11
- - Confirm route files avoid direct DB calls, heavy business logic, and large side-effect chains.
12
- - Confirm shared UI blocks are extracted to component modules.
13
- - Confirm cross-route state is managed in stores/hooks instead of duplicated route-local logic.
14
- - Confirm route grouping/layout usage is intentional and not overloaded at root.
15
- - Confirm file size/complexity trends support long-term maintainability.
16
-
17
- ## Preferred structure
18
-
19
- - Keep `app/` files focused on params, navigation, and screen composition.
20
- - Place business workflows in `src/features`.
21
- - Place side effects/integrations in `src/services` or `src/data`.
22
- - Keep reusable UI in `src/components` and cross-cutting helpers in hooks/utilities.
23
-
24
- ## Example fix
25
-
26
- - Problem: A route file performs data fetching, mutation, and form business rules inline.
27
- - Fix: Move fetch/mutation logic to service modules, move workflow rules to a feature module, and keep the route as a thin screen wrapper.
28
-
29
- ## Agent behavior
30
-
31
- - Prefer small, incremental extractions over broad rewrites.
32
- - Delegate framework routing primitives to official Expo Router guidance, then apply MDS rules for maintainable app-folder boundaries and Doctor-compatible architecture.
33
-
1
+ # Skill: Expo Router Architecture
2
+
3
+ Use when structuring, reviewing, or refactoring Expo Router route code.
4
+
5
+ ## Main rule
6
+
7
+ Keep route files thin: routing and composition belong in `app/`, while business/data logic lives in feature, service, and shared modules.
8
+
9
+ ## Checks
10
+
11
+ - Confirm route files avoid direct DB calls, heavy business logic, and large side-effect chains.
12
+ - Confirm shared UI blocks are extracted to component modules.
13
+ - Confirm cross-route state is managed in stores/hooks instead of duplicated route-local logic.
14
+ - Confirm route grouping/layout usage is intentional and not overloaded at root.
15
+ - Confirm file size/complexity trends support long-term maintainability.
16
+
17
+ ## Preferred structure
18
+
19
+ - Keep `app/` files focused on params, navigation, and screen composition.
20
+ - Place business workflows in `src/features`.
21
+ - Place side effects/integrations in `src/services` or `src/data`.
22
+ - Keep reusable UI in `src/components` and cross-cutting helpers in hooks/utilities.
23
+
24
+ ## Example fix
25
+
26
+ - Problem: A route file performs data fetching, mutation, and form business rules inline.
27
+ - Fix: Move fetch/mutation logic to service modules, move workflow rules to a feature module, and keep the route as a thin screen wrapper.
28
+
29
+ ## Agent behavior
30
+
31
+ - Prefer small, incremental extractions over broad rewrites.
32
+ - Delegate framework routing primitives to official Expo Router guidance, then apply MDS rules for maintainable app-folder boundaries and Doctor-compatible architecture.
33
+