@mandujs/mcp 0.37.3 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/index.ts +5 -4
- package/src/profiles.ts +50 -27
- package/src/resources/skills/loader.ts +8 -6
- package/src/resources/skills/mandu-agent-workflow/SKILL.md +124 -0
- package/src/resources/skills/mandu-agent-workflow/metadata.json +7 -0
- package/src/resources/skills/mandu-composition/SKILL.md +47 -7
- package/src/resources/skills/mandu-deployment/SKILL.md +53 -10
- package/src/resources/skills/mandu-fs-routes/SKILL.md +47 -7
- package/src/resources/skills/mandu-guard/SKILL.md +58 -25
- package/src/resources/skills/mandu-hydration/SKILL.md +48 -8
- package/src/resources/skills/mandu-performance/SKILL.md +47 -7
- package/src/resources/skills/mandu-security/SKILL.md +47 -7
- package/src/resources/skills/mandu-slot/SKILL.md +48 -8
- package/src/resources/skills/mandu-styling/SKILL.md +52 -10
- package/src/resources/skills/mandu-testing/SKILL.md +55 -22
- package/src/resources/skills/mandu-ui/SKILL.md +52 -10
- package/src/server.ts +3 -4
- package/src/tools/agent.ts +443 -0
- package/src/tools/hydration.ts +143 -103
- package/src/tools/index.ts +8 -5
- package/src/tools/runtime.ts +327 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mandujs/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Mandu MCP Server - Agent-native interface for Mandu framework operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@mandujs/core": "^0.54.
|
|
37
|
+
"@mandujs/core": "^0.54.6",
|
|
38
38
|
"@mandujs/ate": "^0.26.1",
|
|
39
39
|
"@mandujs/skills": "^0.20.1",
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.25.3"
|
package/src/index.ts
CHANGED
|
@@ -86,10 +86,11 @@ export {
|
|
|
86
86
|
// Profile exports
|
|
87
87
|
export {
|
|
88
88
|
type McpProfile,
|
|
89
|
-
PROFILE_CATEGORIES,
|
|
90
|
-
getProfileCategories,
|
|
91
|
-
isValidProfile,
|
|
92
|
-
|
|
89
|
+
PROFILE_CATEGORIES,
|
|
90
|
+
getProfileCategories,
|
|
91
|
+
isValidProfile,
|
|
92
|
+
resolveMcpProfile,
|
|
93
|
+
} from "./profiles.js";
|
|
93
94
|
|
|
94
95
|
// CLI entry point
|
|
95
96
|
import { startServer } from "./server.js";
|
package/src/profiles.ts
CHANGED
|
@@ -1,34 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Tool Profiles
|
|
3
|
-
*
|
|
4
|
-
* Controls how many tool categories are exposed to AI agents.
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export type McpProfile = "
|
|
11
|
-
|
|
12
|
-
export const PROFILE_CATEGORIES: Record<McpProfile, string[] | null> = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Profiles
|
|
3
|
+
*
|
|
4
|
+
* Controls how many tool categories are exposed to AI agents.
|
|
5
|
+
* - agent-core: Canonical agent workflow plus docs grounding (default)
|
|
6
|
+
* - agent-full: Agent workflow plus Mandu domain tools
|
|
7
|
+
* - internal: All categories, no filtering
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export type McpProfile = "agent-core" | "agent-full" | "internal";
|
|
11
|
+
|
|
12
|
+
export const PROFILE_CATEGORIES: Record<McpProfile, string[] | null> = {
|
|
13
|
+
"agent-core": ["agent", "docs"],
|
|
14
|
+
"agent-full": [
|
|
15
|
+
"agent",
|
|
16
|
+
"docs",
|
|
17
|
+
"spec",
|
|
18
|
+
"generate",
|
|
19
|
+
"slot",
|
|
20
|
+
"slot-validation",
|
|
21
|
+
"hydration",
|
|
22
|
+
"contract",
|
|
23
|
+
"guard",
|
|
24
|
+
"run-tests",
|
|
25
|
+
"lint",
|
|
26
|
+
],
|
|
27
|
+
internal: null,
|
|
28
|
+
};
|
|
21
29
|
|
|
22
30
|
/**
|
|
23
31
|
* Returns allowed category names for a profile, or null if all categories are allowed.
|
|
24
32
|
*/
|
|
25
|
-
export function getProfileCategories(profile: McpProfile): string[] | null {
|
|
26
|
-
return PROFILE_CATEGORIES[profile] ?? null;
|
|
27
|
-
}
|
|
28
|
-
|
|
33
|
+
export function getProfileCategories(profile: McpProfile): string[] | null {
|
|
34
|
+
return PROFILE_CATEGORIES[profile] ?? null;
|
|
35
|
+
}
|
|
36
|
+
|
|
29
37
|
/**
|
|
30
38
|
* Type guard for valid profile strings.
|
|
31
39
|
*/
|
|
32
|
-
export function isValidProfile(value: string): value is McpProfile {
|
|
33
|
-
return value === "
|
|
34
|
-
}
|
|
40
|
+
export function isValidProfile(value: string): value is McpProfile {
|
|
41
|
+
return value === "agent-core" || value === "agent-full" || value === "internal";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Resolve current and legacy profile names to the new official profile set.
|
|
46
|
+
*/
|
|
47
|
+
export function resolveMcpProfile(
|
|
48
|
+
value: string | undefined,
|
|
49
|
+
fallback: McpProfile = "agent-core",
|
|
50
|
+
): McpProfile {
|
|
51
|
+
if (!value) return fallback;
|
|
52
|
+
if (isValidProfile(value)) return value;
|
|
53
|
+
if (value === "minimal") return "agent-core";
|
|
54
|
+
if (value === "standard") return "agent-full";
|
|
55
|
+
if (value === "full") return "internal";
|
|
56
|
+
return fallback;
|
|
57
|
+
}
|
|
@@ -27,10 +27,11 @@ export interface RuleMeta {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Available skills
|
|
30
|
-
const SKILL_IDS = [
|
|
31
|
-
"mandu-
|
|
32
|
-
"mandu-
|
|
33
|
-
"mandu-
|
|
30
|
+
const SKILL_IDS = [
|
|
31
|
+
"mandu-agent-workflow",
|
|
32
|
+
"mandu-slot",
|
|
33
|
+
"mandu-fs-routes",
|
|
34
|
+
"mandu-hydration",
|
|
34
35
|
"mandu-guard",
|
|
35
36
|
"mandu-performance",
|
|
36
37
|
"mandu-composition",
|
|
@@ -94,8 +95,9 @@ export function listSkills(): SkillMeta[] {
|
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
function getSkillDescription(id: string): string {
|
|
97
|
-
const descriptions: Record<string, string> = {
|
|
98
|
-
"mandu-
|
|
98
|
+
const descriptions: Record<string, string> = {
|
|
99
|
+
"mandu-agent-workflow": "Canonical context -> plan -> apply -> verify -> repair workflow for Mandu agents",
|
|
100
|
+
"mandu-slot": "Business logic with Mandu.filling() API",
|
|
99
101
|
"mandu-fs-routes": "File-system based routing patterns",
|
|
100
102
|
"mandu-hydration": "Island hydration and client components",
|
|
101
103
|
"mandu-guard": "Architecture enforcement and layer dependencies",
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mandu-agent-workflow
|
|
3
|
+
description: |
|
|
4
|
+
Canonical Mandu agent workflow. Use first in Mandu projects before direct
|
|
5
|
+
source edits so Codex, Claude Code, Gemini CLI, and other agents follow the
|
|
6
|
+
same context -> plan -> apply -> verify -> repair loop.
|
|
7
|
+
license: MIT
|
|
8
|
+
metadata:
|
|
9
|
+
author: mandu
|
|
10
|
+
version: "1.0.0"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Mandu Agent Workflow
|
|
14
|
+
|
|
15
|
+
Mandu is an agent-native fullstack framework. Agents should not begin by
|
|
16
|
+
guessing file structure or calling low-level tools directly. Start with the
|
|
17
|
+
official agent surface, then use domain tools only when the plan identifies a
|
|
18
|
+
specific domain.
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
Use this skill for every Mandu project task that may inspect, create, modify, or
|
|
23
|
+
verify application code, framework configuration, contracts, slots, islands, or
|
|
24
|
+
deployment artifacts.
|
|
25
|
+
|
|
26
|
+
## Canonical Workflow
|
|
27
|
+
|
|
28
|
+
Always follow this loop:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
context -> plan -> apply -> verify -> repair
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
1. `context`: read the project map.
|
|
35
|
+
2. `plan`: convert the user request into domains, files, risks, and checks.
|
|
36
|
+
3. `apply`: prefer intent-level MCP/domain tools; direct edits must be grounded
|
|
37
|
+
in the plan.
|
|
38
|
+
4. `verify`: run the single agent-facing verification report.
|
|
39
|
+
5. `repair`: convert failures into next actions, then verify again.
|
|
40
|
+
|
|
41
|
+
## Preferred MCP Tools
|
|
42
|
+
|
|
43
|
+
Use these first when MCP is available:
|
|
44
|
+
|
|
45
|
+
| Step | Tool | Purpose |
|
|
46
|
+
|------|------|---------|
|
|
47
|
+
| context | `mandu.agent.context` | Project map, routes, APIs, slots, contracts, guard, diagnostics. |
|
|
48
|
+
| plan | `mandu.agent.plan` | Deterministic task plan with domains, files, tools, risks. |
|
|
49
|
+
| apply | `mandu.agent.apply` | Ordered action preview from `.mandu/agent-plan.json`. |
|
|
50
|
+
| verify | `mandu.agent.verify` | Unified post-change guard/diagnose/contract report. |
|
|
51
|
+
| repair | `mandu.agent.repair` | Structured next actions from `.mandu/agent-verify.json`. |
|
|
52
|
+
|
|
53
|
+
If MCP is unavailable, use the CLI equivalents:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mandu agent context --json
|
|
57
|
+
mandu agent plan "<task>" --json --write
|
|
58
|
+
mandu agent apply --from .mandu/agent-plan.json --json
|
|
59
|
+
mandu agent verify --changed --json --write
|
|
60
|
+
mandu agent repair --from .mandu/agent-verify.json --json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Allowed File Edits
|
|
64
|
+
|
|
65
|
+
Direct file edits are allowed only after `plan` identifies the relevant domain
|
|
66
|
+
and the agent has inspected the local pattern. Prefer MCP/domain generation for:
|
|
67
|
+
|
|
68
|
+
- pages, layouts, and API routes
|
|
69
|
+
- contracts and OpenAPI-related files
|
|
70
|
+
- slots and fillings
|
|
71
|
+
- islands, partials, and hydration boundaries
|
|
72
|
+
- deploy intent and provider artifacts
|
|
73
|
+
|
|
74
|
+
Do not use destructive cleanup, cache removal, deploy execution, or broad
|
|
75
|
+
refactors without an explicit plan and verification path.
|
|
76
|
+
|
|
77
|
+
## Domain Skill Escalation
|
|
78
|
+
|
|
79
|
+
Read the matching domain skill when `mandu.agent.plan` includes that domain:
|
|
80
|
+
|
|
81
|
+
| Domain | Skill |
|
|
82
|
+
|--------|-------|
|
|
83
|
+
| route/api | `mandu-fs-routes` |
|
|
84
|
+
| hydration/island/partial | `mandu-hydration` |
|
|
85
|
+
| slot/filling | `mandu-slot` |
|
|
86
|
+
| guard/import boundary | `mandu-guard` |
|
|
87
|
+
| test/e2e/ATE | `mandu-testing` |
|
|
88
|
+
| deploy | `mandu-deployment` |
|
|
89
|
+
| security/auth/session | `mandu-security` |
|
|
90
|
+
| styling/ui/design | `mandu-styling`, `mandu-ui`, `mandu-composition` |
|
|
91
|
+
| performance | `mandu-performance` |
|
|
92
|
+
|
|
93
|
+
Domain skills are addenda. They must not replace the canonical workflow.
|
|
94
|
+
|
|
95
|
+
## Verification Command
|
|
96
|
+
|
|
97
|
+
Every code-changing task should end with:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
mandu agent verify --changed --json --write
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Run additional commands listed in the plan or verify report, usually
|
|
104
|
+
`bun run typecheck` and targeted `bun test` commands.
|
|
105
|
+
|
|
106
|
+
## Repair Path
|
|
107
|
+
|
|
108
|
+
When verify fails:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
mandu agent repair --from .mandu/agent-verify.json --json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Apply only actions that are explicitly safe and scoped. After any repair, run
|
|
115
|
+
`mandu agent verify --changed --json --write` again.
|
|
116
|
+
|
|
117
|
+
## Common Failures
|
|
118
|
+
|
|
119
|
+
- Skipping context and editing the wrong route or contract path.
|
|
120
|
+
- Calling low-level Guard, Doctor, Fix, ATE, or deploy tools before a plan.
|
|
121
|
+
- Treating a domain skill as the full workflow.
|
|
122
|
+
- Ending a task after tests without writing or reading the agent verify report.
|
|
123
|
+
- Applying broad file changes when `agent.apply` only produced a dry-run action
|
|
124
|
+
report.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"organization": "Mandu Framework",
|
|
4
|
+
"date": "May 2026",
|
|
5
|
+
"abstract": "Canonical Mandu agent workflow for Codex, Claude Code, Gemini CLI, and other coding agents. Establishes context -> plan -> apply -> verify -> repair as the default loop and routes domain work through focused Mandu skills and MCP tools.",
|
|
6
|
+
"tags": ["agent", "workflow", "mcp", "skills", "mandu"]
|
|
7
|
+
}
|
|
@@ -11,13 +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
|
-
##
|
|
19
|
-
|
|
20
|
-
|
|
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:
|
|
21
61
|
- Designing Island component architecture
|
|
22
62
|
- Managing shared state between Islands
|
|
23
63
|
- Building reusable component APIs
|
|
@@ -12,20 +12,63 @@ globs:
|
|
|
12
12
|
- "bunfig.toml"
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
# Mandu Deployment Skill
|
|
16
|
-
|
|
17
|
-
Mandu 앱을 프로덕션 환경에 안전하고 효율적으로 배포하기 위한 가이드입니다.
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
|
|
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 런타임과 번들러를 최대한 활용
|
|
22
62
|
2. **환경 분리**: 개발/스테이징/프로덕션 환경 명확히 구분
|
|
23
63
|
3. **자동화**: CI/CD를 통한 일관된 배포 프로세스
|
|
24
64
|
4. **보안 우선**: 민감 정보는 환경 변수로 관리
|
|
25
65
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
|
|
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 배포 (권장)
|
|
29
72
|
|
|
30
73
|
```yaml
|
|
31
74
|
# render.yaml
|
|
@@ -10,13 +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
|
-
##
|
|
18
|
-
|
|
19
|
-
|
|
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:
|
|
20
60
|
- Creating new pages or API endpoints
|
|
21
61
|
- Setting up dynamic routes with parameters
|
|
22
62
|
- Implementing shared layouts
|
|
@@ -10,14 +10,53 @@ metadata:
|
|
|
10
10
|
version: "1.0.0"
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# Mandu Guard
|
|
14
|
-
|
|
15
|
-
Mandu Guard는 아키텍처 규칙을 강제하는 시스템입니다.
|
|
16
|
-
레이어 간 의존성을 검사하고 위반을 실시간으로 감지합니다.
|
|
17
|
-
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
|
|
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:
|
|
21
60
|
- Setting up architecture rules
|
|
22
61
|
- Checking layer dependencies
|
|
23
62
|
- Validating import paths
|
|
@@ -103,23 +142,17 @@ shared # Shared
|
|
|
103
142
|
| `SLOT_NAMING` | Slot file naming rule violation |
|
|
104
143
|
| `FORBIDDEN_IMPORT` | Forbidden import (fs, child_process, etc.) |
|
|
105
144
|
|
|
106
|
-
## CLI Commands
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
# Use specific preset
|
|
119
|
-
bunx mandu guard arch --preset fsd
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## 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
|
|
123
156
|
|
|
124
157
|
Read individual rule files for detailed explanations:
|
|
125
158
|
|
|
@@ -10,14 +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
|
-
##
|
|
19
|
-
|
|
20
|
-
|
|
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:
|
|
21
61
|
- Creating interactive client components
|
|
22
62
|
- Adding client-side state to pages
|
|
23
63
|
- Implementing partial hydration
|