@mr.dj2u/knowledge 0.1.7 → 0.1.9
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/content/checklists/push-merge-loop.md +17 -17
- package/dist/content/checklists/unified-agent-bundle-validation.md +9 -9
- package/dist/content/examples/push-merge-loop.md +14 -14
- package/dist/content/examples/unified-agent-bundle-bootstrap.md +8 -8
- package/dist/content/guides/post-create-onboarding.md +150 -140
- package/dist/content/patterns/api/api-routes.md +313 -313
- package/dist/content/patterns/api/error-handling.md +310 -310
- package/dist/content/patterns/database/drizzle-schema.md +279 -279
- package/dist/content/patterns/database/migrations.md +364 -364
- package/dist/content/patterns/database/query-organization.md +536 -536
- package/dist/content/patterns/database/relations.md +449 -449
- package/dist/content/patterns/deployment/build-configuration.md +440 -440
- package/dist/content/patterns/deployment/ci-cd-patterns.md +447 -447
- package/dist/content/patterns/deployment/environment-config.md +379 -379
- package/dist/content/patterns/deployment/hosting-setup.md +424 -424
- package/dist/content/patterns/project/configuration-patterns.md +459 -459
- package/dist/content/patterns/project/documentation-org.md +506 -506
- package/dist/content/patterns/project/folder-structure.md +397 -397
- package/dist/content/patterns/project/library-exports.md +464 -464
- package/dist/content/patterns/project/monorepo-structure.md +500 -500
- package/dist/content/patterns/routing/dynamic-routes.md +220 -220
- package/dist/content/patterns/routing/file-based-routing.md +185 -185
- package/dist/content/patterns/routing/route-groups.md +428 -428
- package/dist/content/patterns/state/persistence-middleware.md +520 -520
- package/dist/content/patterns/state/selector-hooks.md +537 -537
- package/dist/content/patterns/state/store-organization.md +538 -538
- package/dist/content/patterns/state/zustand-patterns.md +347 -347
- package/dist/content/patterns/styling/component-styling.md +467 -467
- package/dist/content/patterns/styling/responsive-patterns.md +397 -397
- package/dist/content/patterns/styling/theme-configuration.md +425 -425
- package/dist/content/patterns/styling/uniwind-setup.md +411 -411
- package/dist/content/prompts/continue-development.md +41 -35
- package/dist/content/prompts/create-expo-super-stack.md +4 -1
- package/dist/content/prompts/fix-seo.md +29 -29
- package/dist/content/prompts/onboard-new-expo-app.md +11 -11
- package/dist/content/prompts/prepare-deploy.md +29 -29
- package/dist/content/prompts/project-research-plan.md +29 -29
- package/dist/content/prompts/push-merge-loop.md +25 -25
- package/dist/content/prompts/retrospective-project-onboarding.md +23 -0
- package/dist/content/prompts/review-expo-project.md +29 -29
- package/dist/content/prompts/run-doctor.md +38 -38
- package/dist/content/prompts/wrap-up.md +70 -67
- package/dist/content/reference/create-expo-stack-uniwind.md +29 -29
- package/dist/content/reference/doctor-dogfood.md +1 -1
- package/dist/content/reference/mcp-sdk-transport.md +30 -30
- package/dist/content/reference/reference-repo-evacuation.md +31 -31
- package/dist/content/resource-index.json +1 -0
- package/dist/content/rules/env-hygiene.md +10 -0
- package/dist/content/rules/ssr-safety.md +7 -0
- package/dist/content/skills/api-routes.md +34 -33
- package/dist/content/skills/continue-development.md +49 -32
- package/dist/content/skills/debugging.md +32 -32
- package/dist/content/skills/deployment.md +32 -32
- package/dist/content/skills/dev-server-management.md +32 -32
- package/dist/content/skills/env-vars.md +32 -32
- package/dist/content/skills/expo-router-architecture.md +34 -33
- package/dist/content/skills/expo-ssr-safety.md +32 -32
- package/dist/content/skills/plugin-creation.md +41 -41
- package/dist/content/skills/production-server-patterns.md +31 -31
- package/dist/content/skills/project-onboarding.md +35 -31
- package/dist/content/skills/research-plan-intake.md +32 -32
- package/dist/content/skills/seo-metadata.md +31 -31
- package/dist/content/skills/super-stack-startup.md +38 -34
- package/dist/content/skills/uniwind-theming.md +32 -32
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +11 -0
- package/dist/prompts/index.js.map +1 -1
- package/package.json +7 -1
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
# /wrap-up
|
|
2
|
-
|
|
3
|
-
Run the post-testing release wrap-up flow: final local checks, git inclusion confirmation, PR loop, and merge handling.
|
|
4
|
-
|
|
5
|
-
## Goal
|
|
6
|
-
|
|
7
|
-
When the developer says testing is complete, finish the handoff safely by:
|
|
8
|
-
|
|
9
|
-
1. Marking completed todo items.
|
|
10
|
-
2. Running `mds doctor --ci`.
|
|
11
|
-
3. Reviewing `git status` and confirming intentionally excluded files.
|
|
12
|
-
4. Running the publish/PR/check loop.
|
|
13
|
-
5. Handling merge according to policy defaults and repo overrides.
|
|
14
|
-
|
|
15
|
-
## Required Flow Order
|
|
16
|
-
|
|
17
|
-
1.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
1
|
+
# /wrap-up
|
|
2
|
+
|
|
3
|
+
Run the post-testing release wrap-up flow: final local checks, git inclusion confirmation, PR loop, and merge handling.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
When the developer says testing is complete, finish the handoff safely by:
|
|
8
|
+
|
|
9
|
+
1. Marking completed todo items.
|
|
10
|
+
2. Running `mds doctor --ci`.
|
|
11
|
+
3. Reviewing `git status` and confirming intentionally excluded files.
|
|
12
|
+
4. Running the publish/PR/check loop.
|
|
13
|
+
5. Handling merge according to policy defaults and repo overrides.
|
|
14
|
+
|
|
15
|
+
## Required Flow Order
|
|
16
|
+
|
|
17
|
+
1. Preserve `project/todo.md` exactly except for the verified completion of
|
|
18
|
+
the exact task worked in this session; add its nested GitHub PR link only
|
|
19
|
+
after the mapping and final-base reachability are proven, or a reachable
|
|
20
|
+
commit link for directly verified pre-PR work.
|
|
21
|
+
2. Run `mds doctor --ci` before any git mutation.
|
|
22
|
+
3. Review `git status --short` and list changed files.
|
|
23
|
+
4. Confirm any intentionally omitted files with the developer before staging.
|
|
24
|
+
5. Publish through GitHub flow (branch push + PR).
|
|
25
|
+
6. Poll checks and unresolved feedback.
|
|
26
|
+
7. Fix failures locally, rerun Doctor, push updates, and poll again.
|
|
27
|
+
8. Repeat up to 5 cycles total.
|
|
28
|
+
|
|
29
|
+
## GitHub Skill Routing
|
|
30
|
+
|
|
31
|
+
Use GitHub workflows in this order when available:
|
|
32
|
+
|
|
33
|
+
1. `github` for repo/PR context and routing.
|
|
34
|
+
2. `yeet` for commit/push/open-or-update PR flow.
|
|
35
|
+
3. `gh-fix-ci` for failed checks/log inspection and CI-driven fix loops.
|
|
36
|
+
4. `gh-address-comments` when unresolved review threads are blocking merge.
|
|
37
|
+
|
|
38
|
+
## Merge Policy
|
|
39
|
+
|
|
40
|
+
Evaluate policy in this order:
|
|
41
|
+
|
|
42
|
+
1. Explicit user instruction in the current session.
|
|
43
|
+
2. Optional repo config at `project/release-policy.json`.
|
|
44
|
+
3. Defaults if config is absent.
|
|
45
|
+
|
|
46
|
+
Supported repo config shape:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"wrapUp": {
|
|
51
|
+
"autoMergeTest": true,
|
|
52
|
+
"autoMergeMain": false
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Default behavior:
|
|
58
|
+
|
|
59
|
+
- Auto-merge to `test`: enabled.
|
|
60
|
+
- Per-repo override: allowed.
|
|
61
|
+
- Auto-merge to `main`: never allowed.
|
|
62
|
+
|
|
63
|
+
If the workflow targets `main` directly (no `test` branch flow), stop before merge and tell the developer to merge manually.
|
|
64
|
+
|
|
65
|
+
## Guardrails
|
|
66
|
+
|
|
67
|
+
- Never auto-merge to `main`.
|
|
68
|
+
- Do not skip `mds doctor --ci` between fix cycles.
|
|
69
|
+
- Do not assume omitted files are intentional; confirm them.
|
|
70
|
+
- If checks or blocking threads still fail after 5 cycles, stop and request human help with a concise blocker summary.
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# create-expo-stack Uniwind Exploration
|
|
2
|
-
|
|
3
|
-
Source: https://github.com/roninoss/create-expo-stack
|
|
4
|
-
|
|
5
|
-
## Findings
|
|
6
|
-
|
|
7
|
-
- The project describes itself as an interactive CLI for `rn-new`.
|
|
8
|
-
- It already supports multiple styling choices, including NativeWind,
|
|
9
|
-
Unistyles, StyleSheets, and Tamagui.
|
|
10
|
-
- The README describes a per-file template model: base files live in a base
|
|
11
|
-
template folder, while optional package features live in package template
|
|
12
|
-
folders and use EJS to patch shared files.
|
|
13
|
-
|
|
14
|
-
## Phase 1 Decision
|
|
15
|
-
|
|
16
|
-
A friendly upstream Uniwind contribution should stay small:
|
|
17
|
-
|
|
18
|
-
- add Uniwind as another styling option,
|
|
19
|
-
- follow the existing package-slice template convention,
|
|
20
|
-
- include `web` in Expo Router generated `app.json` platforms when web config
|
|
21
|
-
and dependencies are generated,
|
|
22
|
-
- add focused Software Mansion core package options where they are not already
|
|
23
|
-
covered,
|
|
24
|
-
- avoid MDS project memory files, MCP config, agent prompts, or richer
|
|
25
|
-
boilerplate,
|
|
26
|
-
- keep the deeper post-create setup in `mds onboard` and
|
|
27
|
-
`create-expo-super-stack`.
|
|
28
|
-
|
|
29
|
-
No local Phase 1 code should depend on the upstream fork or PR existing.
|
|
1
|
+
# create-expo-stack Uniwind Exploration
|
|
2
|
+
|
|
3
|
+
Source: https://github.com/roninoss/create-expo-stack
|
|
4
|
+
|
|
5
|
+
## Findings
|
|
6
|
+
|
|
7
|
+
- The project describes itself as an interactive CLI for `rn-new`.
|
|
8
|
+
- It already supports multiple styling choices, including NativeWind,
|
|
9
|
+
Unistyles, StyleSheets, and Tamagui.
|
|
10
|
+
- The README describes a per-file template model: base files live in a base
|
|
11
|
+
template folder, while optional package features live in package template
|
|
12
|
+
folders and use EJS to patch shared files.
|
|
13
|
+
|
|
14
|
+
## Phase 1 Decision
|
|
15
|
+
|
|
16
|
+
A friendly upstream Uniwind contribution should stay small:
|
|
17
|
+
|
|
18
|
+
- add Uniwind as another styling option,
|
|
19
|
+
- follow the existing package-slice template convention,
|
|
20
|
+
- include `web` in Expo Router generated `app.json` platforms when web config
|
|
21
|
+
and dependencies are generated,
|
|
22
|
+
- add focused Software Mansion core package options where they are not already
|
|
23
|
+
covered,
|
|
24
|
+
- avoid MDS project memory files, MCP config, agent prompts, or richer
|
|
25
|
+
boilerplate,
|
|
26
|
+
- keep the deeper post-create setup in `mds onboard` and
|
|
27
|
+
`create-expo-super-stack`.
|
|
28
|
+
|
|
29
|
+
No local Phase 1 code should depend on the upstream fork or PR existing.
|
|
@@ -19,7 +19,7 @@ prove Doctor handles real Expo and monorepo shapes without crashing.
|
|
|
19
19
|
|
|
20
20
|
- `doctor --json --scripts=false` completes for each target.
|
|
21
21
|
- Reports include project docs, package scripts, env hygiene, Expo config, SSR,
|
|
22
|
-
SEO, and app architecture where applicable.
|
|
22
|
+
runtime security, SEO, and app architecture where applicable.
|
|
23
23
|
- Findings are actionable and avoid leaking env values.
|
|
24
24
|
|
|
25
25
|
## Phase 1 Run Summary
|
|
@@ -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`.
|
|
@@ -7,3 +7,13 @@ Treat names containing `SECRET`, `SERVICE_ROLE`, `PRIVATE`, `PASSWORD`,
|
|
|
7
7
|
`TOKEN`, or `STRIPE_SECRET` as unsafe when they are prefixed with
|
|
8
8
|
`EXPO_PUBLIC_`.
|
|
9
9
|
|
|
10
|
+
Document every `EXPO_PUBLIC_*` key from `.env.local` in a committed
|
|
11
|
+
`.env.example` (empty or placeholder values only). Example/template env files
|
|
12
|
+
must not contain live-looking secrets.
|
|
13
|
+
|
|
14
|
+
Doctor also reports context-gated hardcoded credential values in source and
|
|
15
|
+
configuration files, including Stripe `sk_`/`pk_`, OpenAI `sk-`, AWS `AKIA`
|
|
16
|
+
keys, and Bearer/JWT tokens. Reports must identify only the file, line, safe
|
|
17
|
+
identifier, detector, and remediation; never print the credential value itself.
|
|
18
|
+
Real gitignored env files are the correct place for secrets.
|
|
19
|
+
|
|
@@ -7,3 +7,10 @@ Warn on unguarded `window`, `document`, `localStorage`, `sessionStorage`, and
|
|
|
7
7
|
`navigator` references in route files. Prefer `useEffect`, explicit
|
|
8
8
|
`typeof window !== 'undefined'` guards, or a storage adapter.
|
|
9
9
|
|
|
10
|
+
Do not import server-only modules into client routes. Database clients
|
|
11
|
+
(`prisma`, `drizzle-orm`), Node server frameworks (`express`), `'use server'`
|
|
12
|
+
files, and `*.server.ts` modules belong behind API routes or server entry
|
|
13
|
+
points. Client code may only read `EXPO_PUBLIC_*` (plus `NODE_ENV` and
|
|
14
|
+
`EXPO_OS`). Doctor's `runtime security` check enforces this server-on-client
|
|
15
|
+
boundary; the browser-global scan remains a separate warning.
|
|
16
|
+
|
|
@@ -1,33 +1,34 @@
|
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
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
|
+
- Doctor flags these patterns via the `api safety` check (`mds explain "api safety"`).
|
|
17
|
+
|
|
18
|
+
## Preferred structure
|
|
19
|
+
|
|
20
|
+
- Use one route module per resource concern.
|
|
21
|
+
- Parse and validate request data first, then call feature/service logic.
|
|
22
|
+
- Keep DB and external API logic in service modules, not inline in route files.
|
|
23
|
+
- Use a shared response envelope pattern for success and failure paths.
|
|
24
|
+
|
|
25
|
+
## Example fix
|
|
26
|
+
|
|
27
|
+
- Problem: A `POST` route writes directly to DB with unchecked body data.
|
|
28
|
+
- Fix: Add schema validation, early auth check, and move write logic into a service function before returning a typed response object.
|
|
29
|
+
|
|
30
|
+
## Agent behavior
|
|
31
|
+
|
|
32
|
+
- Apply the smallest safe refactor that adds validation/auth boundaries first.
|
|
33
|
+
- Delegate framework primitive questions to official Expo API route guidance, then layer MDS project-specific rules (env boundaries, doc updates, Doctor compatibility).
|
|
34
|
+
|
|
@@ -1,32 +1,49 @@
|
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
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 relevant phase and incomplete tasks in `project/todo.md`.
|
|
13
|
+
Phase order expresses product evolution and priority; explicit dependencies
|
|
14
|
+
and user priority decide whether a later-phase task may start.
|
|
15
|
+
- Confirm blockers/context markers are resolved before feature implementation.
|
|
16
|
+
- If `continue_project` or `mds continue` reports `priority: expo-sdk-upgrade`, load the official Expo skill `upgrading-expo`. Do not call MDS `get_skill` for an upgrade skill, and do not take the next todo until the user declines or the upgrade is done.
|
|
17
|
+
- Confirm any deferral includes a clear reason and destination note.
|
|
18
|
+
- Re-run Doctor/checks after significant phase tasks are completed.
|
|
19
|
+
- When this MDS workflow itself adds a package, use an MDS-owned tool
|
|
20
|
+
(`mds library add` for catalog items) or immediately run the project's
|
|
21
|
+
package manager, then confirm `node_modules` contains the new package.
|
|
22
|
+
Do not treat the task as complete if install failed. MDS cannot install
|
|
23
|
+
packages added by a third-party agent outside those tools.
|
|
24
|
+
|
|
25
|
+
## Preferred structure
|
|
26
|
+
|
|
27
|
+
- Start each session by summarizing the relevant phase state, explicit
|
|
28
|
+
dependencies, and next recommended task.
|
|
29
|
+
- Preserve every existing TODO line. After direct verification, mark only the
|
|
30
|
+
exact completed checkbox and add a nested GitHub PR link when its
|
|
31
|
+
final-base reachability is proven; use a reachable commit link for directly
|
|
32
|
+
verified pre-PR work. Append new work only with human-approved wording to
|
|
33
|
+
the end of its explicitly selected phase. Record a defect once in the
|
|
34
|
+
central `## Bug Fixes & Regressions` queue as
|
|
35
|
+
`[Bug · Origin: Phase N]`, not in both that queue and its origin phase.
|
|
36
|
+
- Keep roadmap changes aligned with product intent in `project/info.md`.
|
|
37
|
+
|
|
38
|
+
## Example fix
|
|
39
|
+
|
|
40
|
+
- Problem: Agent jumps to a later phase feature while current phase has unresolved blockers.
|
|
41
|
+
- Fix: Return to active phase tasks, complete or formally defer blockers, then proceed to later phase work.
|
|
42
|
+
- Problem: Agent picks the first unchecked todo while the app's declared Expo SDK is a major behind official latest stable.
|
|
43
|
+
- Fix: Honor `expo-sdk-upgrade` from `continue_project` / `mds continue` and load official `upgrading-expo` instead of implementing the stale todo.
|
|
44
|
+
|
|
45
|
+
## Agent behavior
|
|
46
|
+
|
|
47
|
+
- Optimize for forward progress without losing roadmap integrity.
|
|
48
|
+
- Avoid silently reordering roadmap priorities; ask for confirmation before major sequencing changes.
|
|
49
|
+
- 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.
|