@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.
@@ -10,13 +10,53 @@ metadata:
10
10
  version: "1.0.0"
11
11
  ---
12
12
 
13
- # Mandu Performance
14
-
15
- Mandu 애플리케이션의 성능 최적화 가이드. 워터폴 제거, 번들 최적화, 캐싱 패턴, Bun 런타임 활용법을 다룹니다. Vercel의 React Best Practices를 Mandu 컨텍스트로 변환하여 적용합니다.
16
-
17
- ## When to Apply
18
-
19
- Reference these guidelines when:
13
+ # Mandu Performance
14
+
15
+ Mandu 애플리케이션의 성능 최적화 가이드. 워터폴 제거, 번들 최적화, 캐싱 패턴, Bun 런타임 활용법을 다룹니다. Vercel의 React Best Practices를 Mandu 컨텍스트로 변환하여 적용합니다.
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 performance, hydration, route, API, or runtime domains.
21
+
22
+ Canonical workflow step: `plan -> verify -> repair`.
23
+
24
+ Preferred MCP tools:
25
+
26
+ | Step | Tools |
27
+ |------|-------|
28
+ | plan | `mandu.agent.plan`, `mandu.agent.context` |
29
+ | apply | `mandu.agent.apply` |
30
+ | verify | `mandu.agent.verify`, `mandu.build`, `mandu.run.tests` |
31
+ | repair | `mandu.agent.repair` |
32
+
33
+ Allowed file edits:
34
+
35
+ - Route, slot, island, or cache code named in the plan
36
+ - Import boundaries that reduce bundle/runtime cost
37
+ - Benchmark/test files scoped to the performance claim
38
+
39
+ Verification command:
40
+
41
+ ```bash
42
+ mandu agent verify --changed --json --write
43
+ ```
44
+
45
+ Common failures:
46
+
47
+ - Optimizing without a measurable route, bundle, or runtime target
48
+ - Moving server-only code into client islands for convenience
49
+ - Skipping typecheck or targeted tests after cache/import rewrites
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
  - Optimizing slot handler response times
21
61
  - Reducing Island component bundle size
22
62
  - Implementing caching strategies
@@ -10,13 +10,53 @@ metadata:
10
10
  version: "1.0.0"
11
11
  ---
12
12
 
13
- # Mandu Security
14
-
15
- Mandu 애플리케이션의 보안 모범 사례 가이드. slot guard를 통한 인증/인가, 입력 검증, CSRF/XSS 방어, 환경 변수 관리를 다룹니다.
16
-
17
- ## When to Apply
18
-
19
- Reference these guidelines when:
13
+ # Mandu Security
14
+
15
+ Mandu 애플리케이션의 보안 모범 사례 가이드. slot guard를 통한 인증/인가, 입력 검증, CSRF/XSS 방어, 환경 변수 관리를 다룹니다.
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 security, auth, slot, API, or runtime domains.
21
+
22
+ Canonical workflow step: `plan -> verify -> repair`.
23
+
24
+ Preferred MCP tools:
25
+
26
+ | Step | Tools |
27
+ |------|-------|
28
+ | plan | `mandu.agent.plan`, `mandu.docs.search` |
29
+ | apply | `mandu.agent.apply` |
30
+ | verify | `mandu.agent.verify`, `mandu.guard.check`, `mandu.contract.validate` |
31
+ | repair | `mandu.agent.repair`, `mandu.guard.explain` |
32
+
33
+ Allowed file edits:
34
+
35
+ - Auth/session slot logic named in the plan
36
+ - Server-only validation and security header configuration
37
+ - Environment templates, never secret values
38
+
39
+ Verification command:
40
+
41
+ ```bash
42
+ mandu agent verify --changed --json --write
43
+ ```
44
+
45
+ Common failures:
46
+
47
+ - Exposing secrets through client bundles or sync artifacts
48
+ - Changing auth behavior without route/API/slot verification
49
+ - Treating guard findings as policy problems before checking source boundaries
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
  - Implementing authentication in slots
21
61
  - Adding authorization guards
22
62
  - Validating user input
@@ -11,14 +11,54 @@ metadata:
11
11
  version: "1.0.0"
12
12
  ---
13
13
 
14
- # Mandu Slot
15
-
16
- Slot은 비즈니스 로직을 작성하는 파일입니다. `Mandu.filling()` API를 사용하여
17
- API 핸들러, 인증 가드, 라이프사이클 훅을 구현합니다.
18
-
19
- ## When to Apply
20
-
21
- Reference these guidelines when:
14
+ # Mandu Slot
15
+
16
+ Slot은 비즈니스 로직을 작성하는 파일입니다. `Mandu.filling()` API를 사용하여
17
+ API 핸들러, 인증 가드, 라이프사이클 훅을 구현합니다.
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 slot, API, or security domain.
23
+
24
+ Canonical workflow step: `plan -> apply -> verify -> repair`.
25
+
26
+ Preferred MCP tools:
27
+
28
+ | Step | Tools |
29
+ |------|-------|
30
+ | plan | `mandu.agent.plan`, `mandu.slot.read`, `mandu.slot.constraints` |
31
+ | apply | `mandu.agent.apply`, `mandu.generate` |
32
+ | verify | `mandu.agent.verify`, `mandu.slot.validate`, `mandu.contract.validate` |
33
+ | repair | `mandu.agent.repair` |
34
+
35
+ Allowed file edits:
36
+
37
+ - `spec/slots/**/*.slot.ts`
38
+ - Route handlers that bind to the planned slot
39
+ - Contract files only when the plan includes contract work
40
+
41
+ Verification command:
42
+
43
+ ```bash
44
+ mandu agent verify --changed --json --write
45
+ ```
46
+
47
+ Common failures:
48
+
49
+ - Creating slot logic without checking `mandu.slot.constraints`
50
+ - Mixing auth/security changes into slot edits without security verification
51
+ - Returning untyped responses that drift from the linked contract
52
+
53
+ Repair path:
54
+
55
+ ```bash
56
+ mandu agent repair --from .mandu/agent-verify.json --json
57
+ ```
58
+
59
+ ## When to Apply
60
+
61
+ Reference these guidelines when:
22
62
  - Creating new API endpoints with business logic
23
63
  - Implementing authentication or authorization
24
64
  - Adding request/response lifecycle hooks
@@ -11,13 +11,53 @@ globs:
11
11
  - "app/globals.css"
12
12
  ---
13
13
 
14
- # Mandu Styling Skill
15
-
16
- Mandu Island 아키텍처에 최적화된 Tailwind CSS v4 스타일링 가이드입니다.
17
-
18
- ## 핵심 원칙
19
-
20
- 1. **Zero-Runtime**: 빌드 타임 CSS 생성 (SSR 호환)
14
+ # Mandu Styling Skill
15
+
16
+ Mandu Island 아키텍처에 최적화된 Tailwind CSS v4 스타일링 가이드입니다.
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 styling, design, UI, hydration, 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` |
30
+ | apply | `mandu.agent.apply`, `mandu.design.patch` |
31
+ | verify | `mandu.agent.verify`, `mandu.design.check`, `mandu.lint` |
32
+ | repair | `mandu.agent.repair` |
33
+
34
+ Allowed file edits:
35
+
36
+ - CSS files named in the plan, especially `app/globals.css`
37
+ - Component className changes scoped to the target UI
38
+ - Theme tokens only after inspecting the project's design source
39
+
40
+ Verification command:
41
+
42
+ ```bash
43
+ mandu agent verify --changed --json --write
44
+ ```
45
+
46
+ Common failures:
47
+
48
+ - Installing or changing styling stacks before checking the existing project style
49
+ - Editing broad theme tokens for a local component issue
50
+ - Skipping design/lint verification after Tailwind v4 syntax changes
51
+
52
+ Repair path:
53
+
54
+ ```bash
55
+ mandu agent repair --from .mandu/agent-verify.json --json
56
+ ```
57
+
58
+ ## 핵심 원칙
59
+
60
+ 1. **Zero-Runtime**: 빌드 타임 CSS 생성 (SSR 호환)
21
61
  2. **CSS-First**: JavaScript 설정 대신 CSS에서 테마 정의
22
62
  3. **Island 격리**: 컴포넌트 간 스타일 충돌 방지
23
63
  4. **Auto Integration**: Mandu가 Tailwind v4 자동 감지 및 빌드
@@ -29,9 +69,11 @@ Primary: Tailwind CSS v4 + clsx/tailwind-merge
29
69
  Alternative: CSS Modules (최소 의존성)
30
70
  ```
31
71
 
32
- ## 빠른 시작
33
-
34
- ### 1. 설치
72
+ ## Setup Examples
73
+
74
+ Use these examples only after `mandu.agent.plan` selects styling setup or migration.
75
+
76
+ ### 1. 설치
35
77
 
36
78
  ```bash
37
79
  bun add -d tailwindcss@^4.1 @tailwindcss/cli@^4.1
@@ -10,13 +10,52 @@ metadata:
10
10
  version: "1.0.0"
11
11
  ---
12
12
 
13
- # Mandu Testing
14
-
15
- Mandu 애플리케이션의 테스트 패턴 가이드. Bun test를 활용한 단위 테스트, slot 테스트, Island 컴포넌트 테스트, Playwright E2E 테스트를 다룹니다.
16
-
17
- ## When to Apply
18
-
19
- Reference these guidelines when:
13
+ # Mandu Testing
14
+
15
+ Mandu 애플리케이션의 테스트 패턴 가이드. Bun test를 활용한 단위 테스트, slot 테스트, Island 컴포넌트 테스트, Playwright E2E 테스트를 다룹니다.
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 testing or `mandu.agent.verify` asks for targeted test coverage.
21
+
22
+ Canonical workflow step: `verify -> repair`.
23
+
24
+ Preferred MCP tools:
25
+
26
+ | Step | Tools |
27
+ |------|-------|
28
+ | plan | `mandu.agent.plan` |
29
+ | verify | `mandu.agent.verify`, `mandu.run.tests`, `mandu.ate.generate`, `mandu.ate.run` |
30
+ | repair | `mandu.agent.repair`, `mandu.ate.heal` |
31
+
32
+ Allowed file edits:
33
+
34
+ - Co-located `*.test.ts` / `*.test.tsx` files
35
+ - `tests/e2e/**/*.spec.ts`
36
+ - Test fixtures and mocks scoped to the planned domain
37
+
38
+ Verification command:
39
+
40
+ ```bash
41
+ mandu agent verify --changed --json --write
42
+ ```
43
+
44
+ Common failures:
45
+
46
+ - Running broad watch-mode tests as an agent default
47
+ - Adding tests that bypass the route/slot/contract path under change
48
+ - Applying ATE healing before reading the verify report
49
+
50
+ Repair path:
51
+
52
+ ```bash
53
+ mandu agent repair --from .mandu/agent-verify.json --json
54
+ ```
55
+
56
+ ## When to Apply
57
+
58
+ Reference these guidelines when:
20
59
  - Writing unit tests for slots
21
60
  - Testing Island components
22
61
  - Setting up E2E tests with Playwright
@@ -57,21 +96,15 @@ Reference these guidelines when:
57
96
  - `test-mock-fetch` - Mock fetch requests
58
97
  - `test-mock-database` - Mock database operations
59
98
 
60
- ## Bun Test Quick Start
61
-
62
- ```bash
63
- # Run all tests
64
- bun test
65
-
66
- # Run specific test file
67
- bun test src/slots/user.test.ts
68
-
69
- # Watch mode
70
- bun test --watch
71
-
72
- # Coverage
73
- bun test --coverage
74
- ```
99
+ ## Low-Level Test Commands
100
+
101
+ Use these only after `agent plan` or `agent verify` identifies the target:
102
+
103
+ ```bash
104
+ mandu agent verify --changed --json --write
105
+ bun test src/slots/user.test.ts
106
+ bun test --coverage
107
+ ```
75
108
 
76
109
  ## Test File Convention
77
110
 
@@ -9,13 +9,53 @@ globs:
9
9
  - "app/**/client.tsx"
10
10
  ---
11
11
 
12
- # Mandu UI Skill
13
-
14
- Mandu Island 아키텍처에 UI 컴포넌트 라이브러리를 통합하는 가이드입니다.
15
-
16
- ## 핵심 원칙
17
-
18
- 1. **Headless First**: Radix UI 기반으로 동작과 스타일 분리
12
+ # Mandu UI Skill
13
+
14
+ Mandu Island 아키텍처에 UI 컴포넌트 라이브러리를 통합하는 가이드입니다.
15
+
16
+ ## Agent Workflow Contract
17
+
18
+ This skill is a Domain addendum. It must not replace `mandu-agent-workflow`.
19
+ Use it only after `mandu.agent.plan` selects UI, design, styling, component, or hydration domains.
20
+
21
+ Canonical workflow step: `plan -> apply -> verify`.
22
+
23
+ Preferred MCP tools:
24
+
25
+ | Step | Tools |
26
+ |------|-------|
27
+ | plan | `mandu.agent.plan`, `mandu.design.get`, `mandu.component.list` |
28
+ | apply | `mandu.agent.apply`, `mandu.component.add` |
29
+ | verify | `mandu.agent.verify`, `mandu.design.check`, `mandu.lint` |
30
+ | repair | `mandu.agent.repair` |
31
+
32
+ Allowed file edits:
33
+
34
+ - `components/ui/**/*.tsx`
35
+ - Route-local island/client components named in the plan
36
+ - Styling utilities only when they are required by the selected component
37
+
38
+ Verification command:
39
+
40
+ ```bash
41
+ mandu agent verify --changed --json --write
42
+ ```
43
+
44
+ Common failures:
45
+
46
+ - Adding UI libraries before reading the existing design/component inventory
47
+ - Mixing server components and island-only UI imports
48
+ - Skipping accessibility or design checks for interactive components
49
+
50
+ Repair path:
51
+
52
+ ```bash
53
+ mandu agent repair --from .mandu/agent-verify.json --json
54
+ ```
55
+
56
+ ## 핵심 원칙
57
+
58
+ 1. **Headless First**: Radix UI 기반으로 동작과 스타일 분리
19
59
  2. **Copy-Paste**: shadcn/ui 방식으로 소유권 유지
20
60
  3. **Accessibility**: WCAG 2.1 AA 수준 준수
21
61
  4. **Island 호환**: 클라이언트 컴포넌트로 올바르게 분리
@@ -29,9 +69,11 @@ Icons: Lucide React
29
69
  Utilities: clsx, tailwind-merge, cva
30
70
  ```
31
71
 
32
- ## 빠른 시작
33
-
34
- ### shadcn/ui 초기화
72
+ ## Setup Examples
73
+
74
+ Use these examples only after `mandu.agent.plan` selects UI library setup.
75
+
76
+ ### shadcn/ui 초기화
35
77
 
36
78
  ```bash
37
79
  bunx shadcn-ui@latest init
package/src/server.ts CHANGED
@@ -52,7 +52,7 @@ import { resourceHandlers, resourceDefinitions } from "./resources/handlers.js";
52
52
  import { findProjectRoot } from "./utils/project.js";
53
53
 
54
54
  import { ActivityMonitor } from "./activity-monitor.js";
55
- import { type McpProfile, isValidProfile } from "./profiles.js";
55
+ import { type McpProfile, resolveMcpProfile } from "./profiles.js";
56
56
 
57
57
  /**
58
58
  * MCP 서버 버전
@@ -130,9 +130,8 @@ export class ManduMcpServer {
130
130
  this.projectRoot = projectRoot;
131
131
  this.monitor = new ActivityMonitor(projectRoot);
132
132
 
133
- // Resolve profile from environment variable (default: "full")
134
- const envProfile = process.env.MANDU_MCP_PROFILE ?? "full";
135
- this.profile = isValidProfile(envProfile) ? envProfile : "full";
133
+ // Resolve profile from environment variable (default: "agent-core")
134
+ this.profile = resolveMcpProfile(process.env.MANDU_MCP_PROFILE);
136
135
 
137
136
  // MCP Server 초기화
138
137
  this.server = new Server(