@mandujs/mcp 0.38.3 → 0.38.5
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/README.md +3 -3
- package/package.json +2 -2
- package/src/index.ts +5 -5
- package/src/profiles.ts +112 -50
- package/src/prompts.ts +4 -4
- package/src/resources/skills/guides.ts +49 -49
- package/src/resources/skills/loader.ts +8 -8
- package/src/resources/skills/mandu-agent-workflow/SKILL.md +124 -124
- package/src/resources/skills/mandu-agent-workflow/metadata.json +7 -7
- package/src/resources/skills/mandu-composition/SKILL.md +47 -47
- package/src/resources/skills/mandu-deployment/SKILL.md +53 -53
- package/src/resources/skills/mandu-deployment/rules/db-provider-supabase.md +3 -3
- package/src/resources/skills/mandu-fs-routes/SKILL.md +47 -47
- package/src/resources/skills/mandu-guard/SKILL.md +58 -58
- package/src/resources/skills/mandu-hydration/SKILL.md +67 -67
- package/src/resources/skills/mandu-hydration/rules/hydration-island-setup.md +54 -54
- package/src/resources/skills/mandu-hydration/rules/hydration-priority-visible.md +60 -60
- package/src/resources/skills/mandu-performance/SKILL.md +47 -47
- package/src/resources/skills/mandu-security/SKILL.md +47 -47
- package/src/resources/skills/mandu-slot/SKILL.md +48 -48
- package/src/resources/skills/mandu-styling/SKILL.md +52 -52
- package/src/resources/skills/mandu-testing/SKILL.md +55 -55
- package/src/resources/skills/mandu-ui/SKILL.md +52 -52
- package/src/resources/skills/recipes.ts +28 -28
- package/src/server.ts +3 -3
- package/src/tools/agent.ts +443 -443
- package/src/tools/ate.ts +37 -37
- package/src/tools/composite.ts +13 -13
- package/src/tools/hydration.ts +197 -197
- package/src/tools/kitchen.ts +72 -72
- package/src/tools/runtime.ts +579 -579
- package/src/tools/slot-validation.ts +19 -19
|
@@ -11,53 +11,53 @@ metadata:
|
|
|
11
11
|
version: "1.0.0"
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
# Mandu Composition
|
|
15
|
-
|
|
16
|
-
Mandu 애플리케이션을 위한 React 컴포지션 패턴 가이드. Island 컴파운드 컴포넌트, 상태 관리 인터페이스, Provider 패턴, slot-client 분리를 다룹니다. Vercel의 Composition Patterns를 Mandu 컨텍스트로 변환하여 적용합니다.
|
|
17
|
-
|
|
18
|
-
## Agent Workflow Contract
|
|
19
|
-
|
|
20
|
-
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
21
|
-
Use it only after `mandu.agent.plan` selects composition, UI, hydration, slot, or component domains.
|
|
22
|
-
|
|
23
|
-
Canonical workflow step: `plan -> apply -> verify`.
|
|
24
|
-
|
|
25
|
-
Preferred MCP tools:
|
|
26
|
-
|
|
27
|
-
| Step | Tools |
|
|
28
|
-
|------|-------|
|
|
29
|
-
| plan | `mandu.agent.plan`, `mandu.design.get`, `mandu.island.list` |
|
|
30
|
-
| apply | `mandu.agent.apply` |
|
|
31
|
-
| verify | `mandu.agent.verify`, `mandu.design.check`, `mandu.slot.validate` |
|
|
32
|
-
| repair | `mandu.agent.repair` |
|
|
33
|
-
|
|
34
|
-
Allowed file edits:
|
|
35
|
-
|
|
36
|
-
- Island/client component files named in the plan
|
|
37
|
-
- Provider/state modules scoped to the target feature
|
|
38
|
-
- Slot-client boundaries only when the plan includes slot or hydration domains
|
|
39
|
-
|
|
40
|
-
Verification command:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
mandu agent verify --changed --json --write
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Common failures:
|
|
47
|
-
|
|
48
|
-
- Refactoring component APIs without checking island/client boundaries
|
|
49
|
-
- Adding shared state providers broader than the planned feature
|
|
50
|
-
- Mixing slot server logic into client composition files
|
|
51
|
-
|
|
52
|
-
Repair path:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
mandu agent repair --from .mandu/agent-verify.json --json
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## When to Apply
|
|
59
|
-
|
|
60
|
-
Reference these guidelines when:
|
|
14
|
+
# Mandu Composition
|
|
15
|
+
|
|
16
|
+
Mandu 애플리케이션을 위한 React 컴포지션 패턴 가이드. Island 컴파운드 컴포넌트, 상태 관리 인터페이스, Provider 패턴, slot-client 분리를 다룹니다. Vercel의 Composition Patterns를 Mandu 컨텍스트로 변환하여 적용합니다.
|
|
17
|
+
|
|
18
|
+
## Agent Workflow Contract
|
|
19
|
+
|
|
20
|
+
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
21
|
+
Use it only after `mandu.agent.plan` selects composition, UI, hydration, slot, or component domains.
|
|
22
|
+
|
|
23
|
+
Canonical workflow step: `plan -> apply -> verify`.
|
|
24
|
+
|
|
25
|
+
Preferred MCP tools:
|
|
26
|
+
|
|
27
|
+
| Step | Tools |
|
|
28
|
+
|------|-------|
|
|
29
|
+
| plan | `mandu.agent.plan`, `mandu.design.get`, `mandu.island.list` |
|
|
30
|
+
| apply | `mandu.agent.apply` |
|
|
31
|
+
| verify | `mandu.agent.verify`, `mandu.design.check`, `mandu.slot.validate` |
|
|
32
|
+
| repair | `mandu.agent.repair` |
|
|
33
|
+
|
|
34
|
+
Allowed file edits:
|
|
35
|
+
|
|
36
|
+
- Island/client component files named in the plan
|
|
37
|
+
- Provider/state modules scoped to the target feature
|
|
38
|
+
- Slot-client boundaries only when the plan includes slot or hydration domains
|
|
39
|
+
|
|
40
|
+
Verification command:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
mandu agent verify --changed --json --write
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Common failures:
|
|
47
|
+
|
|
48
|
+
- Refactoring component APIs without checking island/client boundaries
|
|
49
|
+
- Adding shared state providers broader than the planned feature
|
|
50
|
+
- Mixing slot server logic into client composition files
|
|
51
|
+
|
|
52
|
+
Repair path:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
mandu agent repair --from .mandu/agent-verify.json --json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## When to Apply
|
|
59
|
+
|
|
60
|
+
Reference these guidelines when:
|
|
61
61
|
- Designing Island component architecture
|
|
62
62
|
- Managing shared state between Islands
|
|
63
63
|
- Building reusable component APIs
|
|
@@ -12,63 +12,63 @@ globs:
|
|
|
12
12
|
- "bunfig.toml"
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
# Mandu Deployment Skill
|
|
16
|
-
|
|
17
|
-
Mandu 앱을 프로덕션 환경에 안전하고 효율적으로 배포하기 위한 가이드입니다.
|
|
18
|
-
|
|
19
|
-
## Agent Workflow Contract
|
|
20
|
-
|
|
21
|
-
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
22
|
-
Use it only after `mandu.agent.plan` selects the deploy domain.
|
|
23
|
-
|
|
24
|
-
Canonical workflow step: `plan -> apply -> verify`.
|
|
25
|
-
|
|
26
|
-
Preferred MCP tools:
|
|
27
|
-
|
|
28
|
-
| Step | Tools |
|
|
29
|
-
|------|-------|
|
|
30
|
-
| plan | `mandu.agent.plan`, `mandu.deploy.plan` |
|
|
31
|
-
| apply | `mandu.agent.apply`, `mandu.deploy.compile` |
|
|
32
|
-
| verify | `mandu.agent.verify`, `mandu.deploy.preview` |
|
|
33
|
-
| repair | `mandu.agent.repair` |
|
|
34
|
-
|
|
35
|
-
Allowed file edits:
|
|
36
|
-
|
|
37
|
-
- `.mandu/deploy.intent.json`
|
|
38
|
-
- Provider artifacts named in the plan, such as `render.yaml`, `Dockerfile`, `docker-compose.yml`, `fly.toml`, `vercel.json`, or `netlify.toml`
|
|
39
|
-
- CI workflow files only when deploy automation is explicitly requested
|
|
40
|
-
|
|
41
|
-
Verification command:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
mandu agent verify --changed --json --write
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Common failures:
|
|
48
|
-
|
|
49
|
-
- Executing a provider deploy before a dry-run or preview step
|
|
50
|
-
- Writing secrets into tracked config
|
|
51
|
-
- Changing provider artifacts without route/deploy intent verification
|
|
52
|
-
|
|
53
|
-
Repair path:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
mandu agent repair --from .mandu/agent-verify.json --json
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## 핵심 원칙
|
|
60
|
-
|
|
61
|
-
1. **Bun 네이티브**: Bun 런타임과 번들러를 최대한 활용
|
|
15
|
+
# Mandu Deployment Skill
|
|
16
|
+
|
|
17
|
+
Mandu 앱을 프로덕션 환경에 안전하고 효율적으로 배포하기 위한 가이드입니다.
|
|
18
|
+
|
|
19
|
+
## Agent Workflow Contract
|
|
20
|
+
|
|
21
|
+
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
22
|
+
Use it only after `mandu.agent.plan` selects the deploy domain.
|
|
23
|
+
|
|
24
|
+
Canonical workflow step: `plan -> apply -> verify`.
|
|
25
|
+
|
|
26
|
+
Preferred MCP tools:
|
|
27
|
+
|
|
28
|
+
| Step | Tools |
|
|
29
|
+
|------|-------|
|
|
30
|
+
| plan | `mandu.agent.plan`, `mandu.deploy.plan` |
|
|
31
|
+
| apply | `mandu.agent.apply`, `mandu.deploy.compile` |
|
|
32
|
+
| verify | `mandu.agent.verify`, `mandu.deploy.preview` |
|
|
33
|
+
| repair | `mandu.agent.repair` |
|
|
34
|
+
|
|
35
|
+
Allowed file edits:
|
|
36
|
+
|
|
37
|
+
- `.mandu/deploy.intent.json`
|
|
38
|
+
- Provider artifacts named in the plan, such as `render.yaml`, `Dockerfile`, `docker-compose.yml`, `fly.toml`, `vercel.json`, or `netlify.toml`
|
|
39
|
+
- CI workflow files only when deploy automation is explicitly requested
|
|
40
|
+
|
|
41
|
+
Verification command:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
mandu agent verify --changed --json --write
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Common failures:
|
|
48
|
+
|
|
49
|
+
- Executing a provider deploy before a dry-run or preview step
|
|
50
|
+
- Writing secrets into tracked config
|
|
51
|
+
- Changing provider artifacts without route/deploy intent verification
|
|
52
|
+
|
|
53
|
+
Repair path:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mandu agent repair --from .mandu/agent-verify.json --json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 핵심 원칙
|
|
60
|
+
|
|
61
|
+
1. **Bun 네이티브**: Bun 런타임과 번들러를 최대한 활용
|
|
62
62
|
2. **환경 분리**: 개발/스테이징/프로덕션 환경 명확히 구분
|
|
63
63
|
3. **자동화**: CI/CD를 통한 일관된 배포 프로세스
|
|
64
64
|
4. **보안 우선**: 민감 정보는 환경 변수로 관리
|
|
65
65
|
|
|
66
|
-
## Provider Artifact Examples
|
|
67
|
-
|
|
68
|
-
Use these examples only after `mandu.agent.plan` selects the deploy domain and
|
|
69
|
-
`mandu.agent.apply` has produced the intended action order.
|
|
70
|
-
|
|
71
|
-
### Render 배포 (권장)
|
|
66
|
+
## Provider Artifact Examples
|
|
67
|
+
|
|
68
|
+
Use these examples only after `mandu.agent.plan` selects the deploy domain and
|
|
69
|
+
`mandu.agent.apply` has produced the intended action order.
|
|
70
|
+
|
|
71
|
+
### Render 배포 (권장)
|
|
72
72
|
|
|
73
73
|
```yaml
|
|
74
74
|
# render.yaml
|
|
@@ -138,8 +138,8 @@ export function createServerSupabase() {
|
|
|
138
138
|
Mandu 의 client island 에서 Realtime 구독:
|
|
139
139
|
|
|
140
140
|
```tsx
|
|
141
|
-
// app/messages/MessagesIsland.client.tsx
|
|
142
|
-
import { wrapComponent } from "@mandujs/core/client";
|
|
141
|
+
// app/messages/MessagesIsland.client.tsx
|
|
142
|
+
import { wrapComponent } from "@mandujs/core/client";
|
|
143
143
|
import { useEffect, useState } from "react";
|
|
144
144
|
import { supabase } from "@/lib/supabase";
|
|
145
145
|
|
|
@@ -174,7 +174,7 @@ function Messages() {
|
|
|
174
174
|
);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
export default wrapComponent(Messages);
|
|
177
|
+
export default wrapComponent(Messages);
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
### 3.3 Storage
|
|
@@ -10,53 +10,53 @@ metadata:
|
|
|
10
10
|
version: "1.0.0"
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# Mandu FS Routes
|
|
14
|
-
|
|
15
|
-
FS Routes는 파일 시스템 기반 라우팅입니다. `app/` 폴더의 파일 구조가 URL이 됩니다.
|
|
16
|
-
|
|
17
|
-
## Agent Workflow Contract
|
|
18
|
-
|
|
19
|
-
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
20
|
-
Use it only after `mandu.agent.plan` selects the route or API domain.
|
|
21
|
-
|
|
22
|
-
Canonical workflow step: `plan -> apply -> verify`.
|
|
23
|
-
|
|
24
|
-
Preferred MCP tools:
|
|
25
|
-
|
|
26
|
-
| Step | Tools |
|
|
27
|
-
|------|-------|
|
|
28
|
-
| plan | `mandu.agent.plan`, `mandu.route.list` |
|
|
29
|
-
| apply | `mandu.agent.apply`, `mandu.generate`, `mandu.route.add` |
|
|
30
|
-
| verify | `mandu.agent.verify`, `mandu.manifest.validate` |
|
|
31
|
-
| repair | `mandu.agent.repair` |
|
|
32
|
-
|
|
33
|
-
Allowed file edits:
|
|
34
|
-
|
|
35
|
-
- `app/**/page.tsx`, `app/**/layout.tsx`, `app/**/route.ts`
|
|
36
|
-
- Route-local metadata files and co-located helpers
|
|
37
|
-
- Related contract/slot files only when the plan includes those domains
|
|
38
|
-
|
|
39
|
-
Verification command:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
mandu agent verify --changed --json --write
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Common failures:
|
|
46
|
-
|
|
47
|
-
- Creating a page or API route before reading the local `app/` pattern
|
|
48
|
-
- Editing generated route manifests by hand
|
|
49
|
-
- Adding API files without contract verification when the plan includes API work
|
|
50
|
-
|
|
51
|
-
Repair path:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
mandu agent repair --from .mandu/agent-verify.json --json
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## When to Apply
|
|
58
|
-
|
|
59
|
-
Reference these guidelines when:
|
|
13
|
+
# Mandu FS Routes
|
|
14
|
+
|
|
15
|
+
FS Routes는 파일 시스템 기반 라우팅입니다. `app/` 폴더의 파일 구조가 URL이 됩니다.
|
|
16
|
+
|
|
17
|
+
## Agent Workflow Contract
|
|
18
|
+
|
|
19
|
+
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
20
|
+
Use it only after `mandu.agent.plan` selects the route or API domain.
|
|
21
|
+
|
|
22
|
+
Canonical workflow step: `plan -> apply -> verify`.
|
|
23
|
+
|
|
24
|
+
Preferred MCP tools:
|
|
25
|
+
|
|
26
|
+
| Step | Tools |
|
|
27
|
+
|------|-------|
|
|
28
|
+
| plan | `mandu.agent.plan`, `mandu.route.list` |
|
|
29
|
+
| apply | `mandu.agent.apply`, `mandu.generate`, `mandu.route.add` |
|
|
30
|
+
| verify | `mandu.agent.verify`, `mandu.manifest.validate` |
|
|
31
|
+
| repair | `mandu.agent.repair` |
|
|
32
|
+
|
|
33
|
+
Allowed file edits:
|
|
34
|
+
|
|
35
|
+
- `app/**/page.tsx`, `app/**/layout.tsx`, `app/**/route.ts`
|
|
36
|
+
- Route-local metadata files and co-located helpers
|
|
37
|
+
- Related contract/slot files only when the plan includes those domains
|
|
38
|
+
|
|
39
|
+
Verification command:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
mandu agent verify --changed --json --write
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Common failures:
|
|
46
|
+
|
|
47
|
+
- Creating a page or API route before reading the local `app/` pattern
|
|
48
|
+
- Editing generated route manifests by hand
|
|
49
|
+
- Adding API files without contract verification when the plan includes API work
|
|
50
|
+
|
|
51
|
+
Repair path:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
mandu agent repair --from .mandu/agent-verify.json --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## When to Apply
|
|
58
|
+
|
|
59
|
+
Reference these guidelines when:
|
|
60
60
|
- Creating new pages or API endpoints
|
|
61
61
|
- Setting up dynamic routes with parameters
|
|
62
62
|
- Implementing shared layouts
|
|
@@ -10,53 +10,53 @@ metadata:
|
|
|
10
10
|
version: "1.0.0"
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# Mandu Guard
|
|
14
|
-
|
|
15
|
-
Mandu Guard는 아키텍처 규칙을 강제하는 시스템입니다.
|
|
16
|
-
레이어 간 의존성을 검사하고 위반을 실시간으로 감지합니다.
|
|
17
|
-
|
|
18
|
-
## Agent Workflow Contract
|
|
19
|
-
|
|
20
|
-
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
21
|
-
Use it only after `mandu.agent.verify` reports guard diagnostics or `mandu.agent.plan` selects the guard domain.
|
|
22
|
-
|
|
23
|
-
Canonical workflow step: `verify -> repair`.
|
|
24
|
-
|
|
25
|
-
Preferred MCP tools:
|
|
26
|
-
|
|
27
|
-
| Step | Tools |
|
|
28
|
-
|------|-------|
|
|
29
|
-
| plan | `mandu.agent.plan` |
|
|
30
|
-
| verify | `mandu.agent.verify`, `mandu.guard.check`, `mandu.guard.explain` |
|
|
31
|
-
| repair | `mandu.agent.repair`, `mandu.guard.heal` |
|
|
32
|
-
|
|
33
|
-
Allowed file edits:
|
|
34
|
-
|
|
35
|
-
- Source files that violate import/layer rules
|
|
36
|
-
- `mandu.config.*` guard settings only when the plan explicitly changes policy
|
|
37
|
-
- Generated files are not direct-edit targets
|
|
38
|
-
|
|
39
|
-
Verification command:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
mandu agent verify --changed --json --write
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Common failures:
|
|
46
|
-
|
|
47
|
-
- Running low-level guard commands before reading the agent verify report
|
|
48
|
-
- Weakening guard config instead of fixing the import boundary
|
|
49
|
-
- Directly editing generated files to silence diagnostics
|
|
50
|
-
|
|
51
|
-
Repair path:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
mandu agent repair --from .mandu/agent-verify.json --json
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## When to Apply
|
|
58
|
-
|
|
59
|
-
Reference these guidelines when:
|
|
13
|
+
# Mandu Guard
|
|
14
|
+
|
|
15
|
+
Mandu Guard는 아키텍처 규칙을 강제하는 시스템입니다.
|
|
16
|
+
레이어 간 의존성을 검사하고 위반을 실시간으로 감지합니다.
|
|
17
|
+
|
|
18
|
+
## Agent Workflow Contract
|
|
19
|
+
|
|
20
|
+
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
21
|
+
Use it only after `mandu.agent.verify` reports guard diagnostics or `mandu.agent.plan` selects the guard domain.
|
|
22
|
+
|
|
23
|
+
Canonical workflow step: `verify -> repair`.
|
|
24
|
+
|
|
25
|
+
Preferred MCP tools:
|
|
26
|
+
|
|
27
|
+
| Step | Tools |
|
|
28
|
+
|------|-------|
|
|
29
|
+
| plan | `mandu.agent.plan` |
|
|
30
|
+
| verify | `mandu.agent.verify`, `mandu.guard.check`, `mandu.guard.explain` |
|
|
31
|
+
| repair | `mandu.agent.repair`, `mandu.guard.heal` |
|
|
32
|
+
|
|
33
|
+
Allowed file edits:
|
|
34
|
+
|
|
35
|
+
- Source files that violate import/layer rules
|
|
36
|
+
- `mandu.config.*` guard settings only when the plan explicitly changes policy
|
|
37
|
+
- Generated files are not direct-edit targets
|
|
38
|
+
|
|
39
|
+
Verification command:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
mandu agent verify --changed --json --write
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Common failures:
|
|
46
|
+
|
|
47
|
+
- Running low-level guard commands before reading the agent verify report
|
|
48
|
+
- Weakening guard config instead of fixing the import boundary
|
|
49
|
+
- Directly editing generated files to silence diagnostics
|
|
50
|
+
|
|
51
|
+
Repair path:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
mandu agent repair --from .mandu/agent-verify.json --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## When to Apply
|
|
58
|
+
|
|
59
|
+
Reference these guidelines when:
|
|
60
60
|
- Setting up architecture rules
|
|
61
61
|
- Checking layer dependencies
|
|
62
62
|
- Validating import paths
|
|
@@ -142,17 +142,17 @@ shared # Shared
|
|
|
142
142
|
| `SLOT_NAMING` | Slot file naming rule violation |
|
|
143
143
|
| `FORBIDDEN_IMPORT` | Forbidden import (fs, child_process, etc.) |
|
|
144
144
|
|
|
145
|
-
## Low-Level CLI Commands
|
|
146
|
-
|
|
147
|
-
Use these only when `agent verify` or `agent repair` asks for guard-specific detail:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
mandu agent verify --changed --json --write
|
|
151
|
-
mandu guard arch --ci
|
|
152
|
-
mandu guard arch --preset fsd
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## How to Use
|
|
145
|
+
## Low-Level CLI Commands
|
|
146
|
+
|
|
147
|
+
Use these only when `agent verify` or `agent repair` asks for guard-specific detail:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
mandu agent verify --changed --json --write
|
|
151
|
+
mandu guard arch --ci
|
|
152
|
+
mandu guard arch --preset fsd
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## How to Use
|
|
156
156
|
|
|
157
157
|
Read individual rule files for detailed explanations:
|
|
158
158
|
|
|
@@ -10,54 +10,54 @@ metadata:
|
|
|
10
10
|
version: "1.0.0"
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# Mandu Island Hydration
|
|
14
|
-
|
|
15
|
-
Island Hydration은 페이지의 일부분만 클라이언트에서 인터랙티브하게 만드는 기술입니다.
|
|
16
|
-
대부분의 페이지는 정적 HTML로 유지하고, 필요한 부분만 JavaScript를 로드합니다.
|
|
17
|
-
|
|
18
|
-
## Agent Workflow Contract
|
|
19
|
-
|
|
20
|
-
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
21
|
-
Use it only after `mandu.agent.plan` selects the hydration, island, partial, or route domain.
|
|
22
|
-
|
|
23
|
-
Canonical workflow step: `plan -> apply -> verify -> repair`.
|
|
24
|
-
|
|
25
|
-
Preferred MCP tools:
|
|
26
|
-
|
|
27
|
-
| Step | Tools |
|
|
28
|
-
|------|-------|
|
|
29
|
-
| plan | `mandu.agent.plan`, `mandu.island.list` |
|
|
30
|
-
| apply | `mandu.agent.apply`, `mandu.hydration.set`, `mandu.hydration.addClientSlot` |
|
|
31
|
-
| verify | `mandu.agent.verify`, `mandu.build`, `mandu.build.status` |
|
|
32
|
-
| repair | `mandu.agent.repair` |
|
|
33
|
-
|
|
34
|
-
Allowed file edits:
|
|
35
|
-
|
|
36
|
-
- `app/**/*.partial.tsx`, `app/**/*.island.tsx`, route-local client components
|
|
37
|
-
- Page hydration metadata only when the plan names the route
|
|
38
|
-
- Shared client utilities only after inspecting existing client boundaries
|
|
39
|
-
|
|
40
|
-
Verification command:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
mandu agent verify --changed --json --write
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Common failures:
|
|
47
|
-
|
|
48
|
-
- Rendering page-level islands inline instead of using `partial().Render`
|
|
49
|
-
- Forgetting route hydration metadata when a server page renders partials
|
|
50
|
-
- Moving server-only imports into client bundles
|
|
51
|
-
|
|
52
|
-
Repair path:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
mandu agent repair --from .mandu/agent-verify.json --json
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## When to Apply
|
|
59
|
-
|
|
60
|
-
Reference these guidelines when:
|
|
13
|
+
# Mandu Island Hydration
|
|
14
|
+
|
|
15
|
+
Island Hydration은 페이지의 일부분만 클라이언트에서 인터랙티브하게 만드는 기술입니다.
|
|
16
|
+
대부분의 페이지는 정적 HTML로 유지하고, 필요한 부분만 JavaScript를 로드합니다.
|
|
17
|
+
|
|
18
|
+
## Agent Workflow Contract
|
|
19
|
+
|
|
20
|
+
This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
|
|
21
|
+
Use it only after `mandu.agent.plan` selects the hydration, island, partial, or route domain.
|
|
22
|
+
|
|
23
|
+
Canonical workflow step: `plan -> apply -> verify -> repair`.
|
|
24
|
+
|
|
25
|
+
Preferred MCP tools:
|
|
26
|
+
|
|
27
|
+
| Step | Tools |
|
|
28
|
+
|------|-------|
|
|
29
|
+
| plan | `mandu.agent.plan`, `mandu.island.list` |
|
|
30
|
+
| apply | `mandu.agent.apply`, `mandu.hydration.set`, `mandu.hydration.addClientSlot` |
|
|
31
|
+
| verify | `mandu.agent.verify`, `mandu.build`, `mandu.build.status` |
|
|
32
|
+
| repair | `mandu.agent.repair` |
|
|
33
|
+
|
|
34
|
+
Allowed file edits:
|
|
35
|
+
|
|
36
|
+
- `app/**/*.partial.tsx`, `app/**/*.island.tsx`, route-local client components
|
|
37
|
+
- Page hydration metadata only when the plan names the route
|
|
38
|
+
- Shared client utilities only after inspecting existing client boundaries
|
|
39
|
+
|
|
40
|
+
Verification command:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
mandu agent verify --changed --json --write
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Common failures:
|
|
47
|
+
|
|
48
|
+
- Rendering page-level islands inline instead of using `partial().Render`
|
|
49
|
+
- Forgetting route hydration metadata when a server page renders partials
|
|
50
|
+
- Moving server-only imports into client bundles
|
|
51
|
+
|
|
52
|
+
Repair path:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
mandu agent repair --from .mandu/agent-verify.json --json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## When to Apply
|
|
59
|
+
|
|
60
|
+
Reference these guidelines when:
|
|
61
61
|
- Creating interactive client components
|
|
62
62
|
- Adding client-side state to pages
|
|
63
63
|
- Implementing partial hydration
|
|
@@ -97,25 +97,25 @@ Reference these guidelines when:
|
|
|
97
97
|
- `hydration-data-server` - Access server data with useServerData
|
|
98
98
|
- `hydration-data-event` - Communicate between Islands with useIslandEvent
|
|
99
99
|
|
|
100
|
-
## Hydration Strategies
|
|
101
|
-
|
|
102
|
-
| Strategy | Description | Use Case |
|
|
103
|
-
|----------|-------------|----------|
|
|
104
|
-
| `none` | No JavaScript | Pure static pages |
|
|
105
|
-
| `island` | Partial hydration (default) | Static + interactive mix |
|
|
106
|
-
| `full` | Full hydration | SPA-style pages |
|
|
107
|
-
|
|
108
|
-
## Runtime API Constraints
|
|
109
|
-
|
|
110
|
-
- `island()` / `Mandu.island()` takes one definition object: `island({ setup, render })`.
|
|
111
|
-
- Do not call `island("visible", Component)`; use `wrapComponent(Component)` for a simple page-level island wrapper.
|
|
112
|
-
- Islands are page-level client bundles. Do not render them as inline JSX like `<MyIsland />`.
|
|
113
|
-
- For an embedded interactive region inside a server page, use `partial()`: put it in `*.partial.tsx`, export `partial({ id, component })`, and render the returned `.Render` component from the server page.
|
|
114
|
-
- A server page that renders partials must opt into hydration, for example `export const hydration = { strategy: "island", priority: "visible", preload: false }`.
|
|
115
|
-
|
|
116
|
-
## Client Hooks
|
|
117
|
-
|
|
118
|
-
```typescript
|
|
100
|
+
## Hydration Strategies
|
|
101
|
+
|
|
102
|
+
| Strategy | Description | Use Case |
|
|
103
|
+
|----------|-------------|----------|
|
|
104
|
+
| `none` | No JavaScript | Pure static pages |
|
|
105
|
+
| `island` | Partial hydration (default) | Static + interactive mix |
|
|
106
|
+
| `full` | Full hydration | SPA-style pages |
|
|
107
|
+
|
|
108
|
+
## Runtime API Constraints
|
|
109
|
+
|
|
110
|
+
- `island()` / `Mandu.island()` takes one definition object: `island({ setup, render })`.
|
|
111
|
+
- Do not call `island("visible", Component)`; use `wrapComponent(Component)` for a simple page-level island wrapper.
|
|
112
|
+
- Islands are page-level client bundles. Do not render them as inline JSX like `<MyIsland />`.
|
|
113
|
+
- For an embedded interactive region inside a server page, use `partial()`: put it in `*.partial.tsx`, export `partial({ id, component })`, and render the returned `.Render` component from the server page.
|
|
114
|
+
- A server page that renders partials must opt into hydration, for example `export const hydration = { strategy: "island", priority: "visible", preload: false }`.
|
|
115
|
+
|
|
116
|
+
## Client Hooks
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
119
|
import {
|
|
120
120
|
useServerData,
|
|
121
121
|
useHydrated,
|