@mandujs/mcp 0.38.11 → 0.39.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +3 -3
  2. package/package.json +3 -5
  3. package/src/activity-adapter.ts +23 -23
  4. package/src/activity-monitor.ts +39 -10
  5. package/src/adapters/index.ts +20 -20
  6. package/src/adapters/monitor-adapter.ts +100 -100
  7. package/src/adapters/tool-adapter.ts +90 -90
  8. package/src/executor/index.ts +22 -22
  9. package/src/executor/tool-executor.ts +148 -148
  10. package/src/hooks/config-watcher.ts +173 -173
  11. package/src/hooks/index.ts +23 -23
  12. package/src/hooks/mcp-hooks.ts +227 -227
  13. package/src/index.ts +5 -5
  14. package/src/logging/index.ts +15 -15
  15. package/src/logging/mcp-transport.ts +134 -134
  16. package/src/new-resources.ts +2 -2
  17. package/src/profiles.ts +25 -54
  18. package/src/prompts.ts +4 -4
  19. package/src/registry/index.ts +13 -13
  20. package/src/registry/mcp-tool-registry.ts +298 -298
  21. package/src/resources/generated-skills/catalog.ts +36 -0
  22. package/src/resources/generated-skills/mandu-agent-workflow/SKILL.md +48 -0
  23. package/src/resources/generated-skills/mandu-contract/SKILL.md +20 -0
  24. package/src/resources/generated-skills/mandu-fs-routes/SKILL.md +19 -0
  25. package/src/resources/generated-skills/mandu-guard/SKILL.md +20 -0
  26. package/src/resources/generated-skills/mandu-hydration/SKILL.md +19 -0
  27. package/src/resources/generated-skills/mandu-testing/SKILL.md +20 -0
  28. package/src/resources/handlers.ts +3 -3
  29. package/src/resources/skills/guides.ts +49 -49
  30. package/src/resources/skills/index.ts +12 -12
  31. package/src/resources/skills/loader.ts +8 -35
  32. package/src/resources/skills/recipes.ts +28 -28
  33. package/src/server.ts +1 -1
  34. package/src/tools/agent.ts +479 -409
  35. package/src/tools/ate-exemplar.ts +92 -92
  36. package/src/tools/ate-flakes.ts +90 -90
  37. package/src/tools/ate-mutate.ts +103 -103
  38. package/src/tools/ate-mutation-report.ts +64 -64
  39. package/src/tools/ate-oracle-pending.ts +49 -49
  40. package/src/tools/ate-oracle-replay.ts +44 -44
  41. package/src/tools/ate-oracle-verdict.ts +70 -70
  42. package/src/tools/ate-prompt.ts +146 -146
  43. package/src/tools/ate-run.ts +1 -1
  44. package/src/tools/ate.ts +38 -38
  45. package/src/tools/brain.ts +6 -6
  46. package/src/tools/composite.ts +19 -61
  47. package/src/tools/contract.ts +11 -9
  48. package/src/tools/deploy-plan.ts +2 -2
  49. package/src/tools/deploy-preview.ts +316 -316
  50. package/src/tools/design.ts +825 -825
  51. package/src/tools/docs.ts +350 -350
  52. package/src/tools/generate.ts +4 -3
  53. package/src/tools/guard.ts +1 -1
  54. package/src/tools/history.ts +1 -1
  55. package/src/tools/hydration.ts +64 -64
  56. package/src/tools/index.ts +0 -118
  57. package/src/tools/kitchen.ts +72 -72
  58. package/src/tools/lint.ts +226 -226
  59. package/src/tools/loop-close.ts +175 -175
  60. package/src/tools/negotiate.ts +263 -263
  61. package/src/tools/resource.ts +1 -1
  62. package/src/tools/run-tests.ts +424 -424
  63. package/src/tools/runtime.ts +1 -1
  64. package/src/tools/seo.ts +1 -1
  65. package/src/tools/slot-validation.ts +19 -19
  66. package/src/tools/spec.ts +201 -201
  67. package/src/tools/transaction.ts +1 -1
  68. package/src/tx-lock.ts +73 -73
  69. package/src/utils/runtime-control.ts +52 -52
  70. package/src/utils/withWarnings.ts +1 -1
  71. package/src/resources/skills/mandu-agent-workflow/SKILL.md +0 -124
  72. package/src/resources/skills/mandu-agent-workflow/metadata.json +0 -7
  73. package/src/resources/skills/mandu-composition/SKILL.md +0 -131
  74. package/src/resources/skills/mandu-composition/metadata.json +0 -13
  75. package/src/resources/skills/mandu-composition/rules/_sections.md +0 -26
  76. package/src/resources/skills/mandu-composition/rules/_template.md +0 -77
  77. package/src/resources/skills/mandu-composition/rules/comp-arch-avoid-boolean-props.md +0 -146
  78. package/src/resources/skills/mandu-composition/rules/comp-arch-compound-components.md +0 -164
  79. package/src/resources/skills/mandu-composition/rules/comp-island-event.md +0 -161
  80. package/src/resources/skills/mandu-composition/rules/comp-island-slot-split.md +0 -167
  81. package/src/resources/skills/mandu-composition/rules/comp-pattern-children.md +0 -149
  82. package/src/resources/skills/mandu-composition/rules/comp-state-context-interface.md +0 -148
  83. package/src/resources/skills/mandu-composition/rules/comp-state-lift-state.md +0 -150
  84. package/src/resources/skills/mandu-deployment/SKILL.md +0 -135
  85. package/src/resources/skills/mandu-deployment/_sections.md +0 -41
  86. package/src/resources/skills/mandu-deployment/_template.md +0 -38
  87. package/src/resources/skills/mandu-deployment/metadata.json +0 -13
  88. package/src/resources/skills/mandu-deployment/rules/db-provider-supabase.md +0 -300
  89. package/src/resources/skills/mandu-deployment/rules/deploy-build-bun.md +0 -109
  90. package/src/resources/skills/mandu-deployment/rules/deploy-build-output.md +0 -115
  91. package/src/resources/skills/mandu-deployment/rules/deploy-cicd-github.md +0 -219
  92. package/src/resources/skills/mandu-deployment/rules/deploy-docker-bun.md +0 -150
  93. package/src/resources/skills/mandu-deployment/rules/deploy-docker-compose.md +0 -223
  94. package/src/resources/skills/mandu-deployment/rules/deploy-platform-fly.md +0 -152
  95. package/src/resources/skills/mandu-deployment/rules/deploy-platform-render.md +0 -179
  96. package/src/resources/skills/mandu-deployment/rules/deploy-platform-vercel.md +0 -140
  97. package/src/resources/skills/mandu-fs-routes/SKILL.md +0 -122
  98. package/src/resources/skills/mandu-fs-routes/metadata.json +0 -12
  99. package/src/resources/skills/mandu-fs-routes/rules/_sections.md +0 -36
  100. package/src/resources/skills/mandu-fs-routes/rules/_template.md +0 -69
  101. package/src/resources/skills/mandu-fs-routes/rules/routes-api-methods.md +0 -65
  102. package/src/resources/skills/mandu-fs-routes/rules/routes-dynamic-param.md +0 -93
  103. package/src/resources/skills/mandu-fs-routes/rules/routes-naming-page.md +0 -55
  104. package/src/resources/skills/mandu-guard/SKILL.md +0 -162
  105. package/src/resources/skills/mandu-guard/metadata.json +0 -12
  106. package/src/resources/skills/mandu-guard/rules/_sections.md +0 -36
  107. package/src/resources/skills/mandu-guard/rules/_template.md +0 -82
  108. package/src/resources/skills/mandu-guard/rules/guard-config-rules.md +0 -100
  109. package/src/resources/skills/mandu-guard/rules/guard-layer-direction.md +0 -76
  110. package/src/resources/skills/mandu-guard/rules/guard-preset-mandu.md +0 -81
  111. package/src/resources/skills/mandu-guard/rules/guard-validate-import.md +0 -80
  112. package/src/resources/skills/mandu-hydration/SKILL.md +0 -139
  113. package/src/resources/skills/mandu-hydration/metadata.json +0 -12
  114. package/src/resources/skills/mandu-hydration/rules/_sections.md +0 -31
  115. package/src/resources/skills/mandu-hydration/rules/_template.md +0 -72
  116. package/src/resources/skills/mandu-hydration/rules/hydration-data-event.md +0 -109
  117. package/src/resources/skills/mandu-hydration/rules/hydration-directive-use-client.md +0 -55
  118. package/src/resources/skills/mandu-hydration/rules/hydration-island-setup.md +0 -160
  119. package/src/resources/skills/mandu-hydration/rules/hydration-priority-visible.md +0 -91
  120. package/src/resources/skills/mandu-performance/SKILL.md +0 -125
  121. package/src/resources/skills/mandu-performance/metadata.json +0 -14
  122. package/src/resources/skills/mandu-performance/rules/_sections.md +0 -31
  123. package/src/resources/skills/mandu-performance/rules/_template.md +0 -64
  124. package/src/resources/skills/mandu-performance/rules/perf-async-defer-await.md +0 -103
  125. package/src/resources/skills/mandu-performance/rules/perf-async-parallel.md +0 -95
  126. package/src/resources/skills/mandu-performance/rules/perf-bun-file.md +0 -124
  127. package/src/resources/skills/mandu-performance/rules/perf-bun-serve.md +0 -125
  128. package/src/resources/skills/mandu-performance/rules/perf-bundle-imports.md +0 -80
  129. package/src/resources/skills/mandu-performance/rules/perf-bundle-island-lazy.md +0 -145
  130. package/src/resources/skills/mandu-performance/rules/perf-cache-react.md +0 -98
  131. package/src/resources/skills/mandu-performance/rules/perf-render-transitions.md +0 -154
  132. package/src/resources/skills/mandu-security/SKILL.md +0 -127
  133. package/src/resources/skills/mandu-security/metadata.json +0 -13
  134. package/src/resources/skills/mandu-security/rules/_sections.md +0 -31
  135. package/src/resources/skills/mandu-security/rules/_template.md +0 -74
  136. package/src/resources/skills/mandu-security/rules/sec-auth-guard.md +0 -127
  137. package/src/resources/skills/mandu-security/rules/sec-env-management.md +0 -133
  138. package/src/resources/skills/mandu-security/rules/sec-input-validate.md +0 -148
  139. package/src/resources/skills/mandu-security/rules/sec-protect-csrf.md +0 -146
  140. package/src/resources/skills/mandu-security/rules/sec-protect-headers.md +0 -138
  141. package/src/resources/skills/mandu-slot/SKILL.md +0 -125
  142. package/src/resources/skills/mandu-slot/metadata.json +0 -12
  143. package/src/resources/skills/mandu-slot/rules/_sections.md +0 -36
  144. package/src/resources/skills/mandu-slot/rules/_template.md +0 -63
  145. package/src/resources/skills/mandu-slot/rules/slot-basic-structure.md +0 -38
  146. package/src/resources/skills/mandu-slot/rules/slot-ctx-response.md +0 -56
  147. package/src/resources/skills/mandu-slot/rules/slot-guard-auth.md +0 -59
  148. package/src/resources/skills/mandu-slot/rules/slot-http-methods.md +0 -64
  149. package/src/resources/skills/mandu-styling/SKILL.md +0 -196
  150. package/src/resources/skills/mandu-styling/_sections.md +0 -43
  151. package/src/resources/skills/mandu-styling/_template.md +0 -32
  152. package/src/resources/skills/mandu-styling/metadata.json +0 -15
  153. package/src/resources/skills/mandu-styling/rules/style-component-compound.md +0 -235
  154. package/src/resources/skills/mandu-styling/rules/style-component-slots.md +0 -255
  155. package/src/resources/skills/mandu-styling/rules/style-component-tokens.md +0 -205
  156. package/src/resources/skills/mandu-styling/rules/style-island-animations.md +0 -272
  157. package/src/resources/skills/mandu-styling/rules/style-island-scoping.md +0 -167
  158. package/src/resources/skills/mandu-styling/rules/style-island-variants.md +0 -221
  159. package/src/resources/skills/mandu-styling/rules/style-perf-critical.md +0 -209
  160. package/src/resources/skills/mandu-styling/rules/style-perf-purge.md +0 -192
  161. package/src/resources/skills/mandu-styling/rules/style-setup-modules.md +0 -162
  162. package/src/resources/skills/mandu-styling/rules/style-setup-panda.md +0 -164
  163. package/src/resources/skills/mandu-styling/rules/style-setup-tailwind.md +0 -170
  164. package/src/resources/skills/mandu-styling/rules/style-tailwind-v4-gotchas.md +0 -179
  165. package/src/resources/skills/mandu-styling/rules/style-theme-darkmode.md +0 -229
  166. package/src/resources/skills/mandu-testing/SKILL.md +0 -132
  167. package/src/resources/skills/mandu-testing/metadata.json +0 -13
  168. package/src/resources/skills/mandu-testing/rules/_sections.md +0 -26
  169. package/src/resources/skills/mandu-testing/rules/_template.md +0 -65
  170. package/src/resources/skills/mandu-testing/rules/test-component-island.md +0 -195
  171. package/src/resources/skills/mandu-testing/rules/test-e2e-playwright.md +0 -196
  172. package/src/resources/skills/mandu-testing/rules/test-mock-fetch.md +0 -219
  173. package/src/resources/skills/mandu-testing/rules/test-slot-unit.md +0 -192
  174. package/src/resources/skills/mandu-ui/SKILL.md +0 -159
  175. package/src/resources/skills/mandu-ui/_sections.md +0 -23
  176. package/src/resources/skills/mandu-ui/_template.md +0 -32
  177. package/src/resources/skills/mandu-ui/metadata.json +0 -13
  178. package/src/resources/skills/mandu-ui/rules/ui-accessibility-aria.md +0 -232
  179. package/src/resources/skills/mandu-ui/rules/ui-accessibility-focus.md +0 -238
  180. package/src/resources/skills/mandu-ui/rules/ui-composition-patterns.md +0 -259
  181. package/src/resources/skills/mandu-ui/rules/ui-island-integration.md +0 -258
  182. package/src/resources/skills/mandu-ui/rules/ui-radix-patterns.md +0 -213
  183. package/src/resources/skills/mandu-ui/rules/ui-shadcn-setup.md +0 -209
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: mandu-contract
3
+ description: Define and preserve typed Mandu API contracts.
4
+ license: MPL-2.0
5
+ ---
6
+
7
+ # Mandu Contracts
8
+
9
+ Use after planning selects an API or contract change.
10
+
11
+ - Keep request, response, method, and status schemas machine-readable.
12
+ - Co-locate or link the contract using the surrounding project convention.
13
+ - Change handler and contract together; do not weaken validation to silence a
14
+ mismatch.
15
+ - Generated clients and OpenAPI artifacts are outputs, not direct-edit inputs.
16
+ - Preserve existing consumer behavior unless the plan explicitly authorizes a
17
+ breaking change.
18
+
19
+ Prefer `mandu.agent.apply` for a typed contract operation. Run targeted tests
20
+ and finish with `mandu.agent.verify --changed --json --write`.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: mandu-fs-routes
3
+ description: Author Mandu pages and APIs through the app directory convention.
4
+ license: MPL-2.0
5
+ ---
6
+
7
+ # Mandu FS Routes
8
+
9
+ Use after `mandu.agent.plan` selects the route or API domain.
10
+
11
+ - `app/page.tsx` maps to `/`.
12
+ - `app/<segment>/page.tsx` maps to a page route.
13
+ - `app/api/<segment>/route.ts` maps to an API route.
14
+ - `[id]`, `[...slug]`, and `[[...slug]]` define dynamic segments.
15
+ - Layouts use `layout.tsx`; never edit generated route manifests directly.
16
+
17
+ Inspect the nearest existing route before writing. Prefer
18
+ `mandu.agent.apply`; otherwise keep direct edits inside the planned `app/**`
19
+ scope. Verify with `mandu.agent.verify --changed --json --write`.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: mandu-guard
3
+ description: Resolve Mandu architecture violations without weakening policy.
4
+ license: MPL-2.0
5
+ ---
6
+
7
+ # Mandu Guard
8
+
9
+ Use when planning or verification reports an import, layer, location, or
10
+ generated-artifact violation.
11
+
12
+ - Fix the dependency direction or file ownership that caused the diagnostic.
13
+ - Do not disable a rule or broaden an allowlist unless policy change is the
14
+ explicit task.
15
+ - Read generated data through the runtime registry; never import or edit
16
+ `.mandu/generated` artifacts directly.
17
+ - Keep fixes inside the plan scope and preserve user changes.
18
+
19
+ Start with `mandu.agent.verify`, use `mandu.agent.repair` for structured next
20
+ actions, and verify again after the repair.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: mandu-hydration
3
+ description: Keep Mandu server rendering and client islands deterministic.
4
+ license: MPL-2.0
5
+ ---
6
+
7
+ # Mandu Hydration
8
+
9
+ Use for islands, partials, client boundaries, or hydration diagnostics.
10
+
11
+ - Server pages remain server-owned; move interactive state into an island.
12
+ - Use explicit client-boundary metadata and serializable props.
13
+ - Never import a generated client artifact directly.
14
+ - Keep HTML, manifest, and client asset URLs pinned to one build generation.
15
+ - Treat missing client assets or hydration samples as failures when the route
16
+ declares hydration.
17
+
18
+ Run the targeted hydration tests requested by the plan, then
19
+ `mandu.agent.verify --changed --json --write`.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: mandu-testing
3
+ description: Select and run evidence-bearing Bun tests for Mandu changes.
4
+ license: MPL-2.0
5
+ ---
6
+
7
+ # Mandu Testing
8
+
9
+ Use after planning identifies the changed behavior or verification recommends
10
+ a test.
11
+
12
+ - Prefer the smallest test that executes the changed contract, then expand to
13
+ the affected package and Golden Path.
14
+ - Use `bun test`; do not substitute npm or pnpm runners.
15
+ - Test failure paths, scope preservation, and generated-output invariants.
16
+ - Do not treat a dry run, fixture string, or missing measurement as successful
17
+ runtime evidence.
18
+ - ATE and browser-healing experiments are Labs and not part of stable testing.
19
+
20
+ Finish with `mandu.agent.verify --changed --json --write`.
@@ -1,8 +1,8 @@
1
1
  import type { Resource } from "@modelcontextprotocol/sdk/types.js";
2
2
  import { loadManifest } from "@mandujs/core";
3
- import { getTransactionStatus } from "@mandujs/core/change";
4
- import type { GeneratedMap } from "@mandujs/core/generator";
5
- import { getWatcher } from "@mandujs/core/watcher";
3
+ import { getTransactionStatus } from "@mandujs/core/compat/change/index";
4
+ import type { GeneratedMap } from "@mandujs/core/compat/generator/index";
5
+ import { getWatcher } from "@mandujs/core/compat/watcher/index";
6
6
  import { getProjectPaths, readJsonFile } from "../utils/project.js";
7
7
  import {
8
8
  getGuide,
@@ -377,21 +377,21 @@ Island Hydration은 페이지의 일부분만 클라이언트에서 인터랙티
377
377
  | \`idle\` | 브라우저 유휴 시 | 비중요 기능 |
378
378
  | \`interaction\` | 사용자 상호작용 시 | 클릭해야 활성화 |
379
379
 
380
- ## Inline client region 만들기
381
-
382
- ### 1. 클라이언트 컴포넌트 작성
383
-
384
- \`\`\`tsx
385
- // app/counter/client.tsx
386
-
387
- "use client";
388
-
389
- import { useState } from "react";
390
-
391
- export function Counter({ initial = 0 }: { initial?: number }) {
392
- const [count, setCount] = useState(initial);
393
-
394
- return (
380
+ ## Inline client region 만들기
381
+
382
+ ### 1. 클라이언트 컴포넌트 작성
383
+
384
+ \`\`\`tsx
385
+ // app/counter/client.tsx
386
+
387
+ "use client";
388
+
389
+ import { useState } from "react";
390
+
391
+ export function Counter({ initial = 0 }: { initial?: number }) {
392
+ const [count, setCount] = useState(initial);
393
+
394
+ return (
395
395
  <div>
396
396
  <p>Count: {count}</p>
397
397
  <button onClick={() => setCount(c => c - 1)}>-</button>
@@ -399,43 +399,43 @@ export function Counter({ initial = 0 }: { initial?: number }) {
399
399
  </div>
400
400
  );
401
401
  }
402
- \`\`\`
403
-
404
- ### 2. 서버 페이지에서 partial로 사용
405
-
406
- \`\`\`tsx
407
- // app/counter/page.tsx
408
-
409
- import { partial } from "@mandujs/core/client";
410
- import { Counter } from "./client";
411
-
412
- const CounterPartial = partial({
413
- component: Counter,
414
- priority: "visible",
415
- });
416
-
417
- export default function CounterPage() {
418
- return (
402
+ \`\`\`
403
+
404
+ ### 2. 서버 페이지에서 partial로 사용
405
+
406
+ \`\`\`tsx
407
+ // app/counter/page.tsx
408
+
409
+ import { partial } from "@mandujs/core/client";
410
+ import { Counter } from "./client";
411
+
412
+ const CounterPartial = partial({
413
+ component: Counter,
414
+ priority: "visible",
415
+ });
416
+
417
+ export default function CounterPage() {
418
+ return (
419
419
  <div>
420
420
  <h1>Counter Demo</h1>
421
421
  <p>이 텍스트는 정적 HTML입니다.</p>
422
-
423
- {/* 이 부분만 hydration됩니다 */}
424
- <CounterPartial.Render initial={10} />
425
- </div>
426
- );
427
- }
428
- \`\`\`
429
-
430
- ## Mandu.island() API
431
-
432
- 고급 page-level Island 패턴을 위한 API입니다. \`Mandu.island()\`는 단일
433
- 정의 객체만 받습니다. \`island("visible", Component)\` 형태는 지원하지
434
- 않으며, 서버 페이지 안에 inline으로 렌더링할 영역은 \`partial()\`을
435
- 사용하세요.
436
-
437
- \`\`\`typescript
438
- // spec/slots/todos.client.ts
422
+
423
+ {/* 이 부분만 hydration됩니다 */}
424
+ <CounterPartial.Render initial={10} />
425
+ </div>
426
+ );
427
+ }
428
+ \`\`\`
429
+
430
+ ## Mandu.island() API
431
+
432
+ 고급 page-level Island 패턴을 위한 API입니다. \`Mandu.island()\`는 단일
433
+ 정의 객체만 받습니다. \`island("visible", Component)\` 형태는 지원하지
434
+ 않으며, 서버 페이지 안에 inline으로 렌더링할 영역은 \`partial()\`을
435
+ 사용하세요.
436
+
437
+ \`\`\`typescript
438
+ // spec/slots/todos.client.ts
439
439
 
440
440
  import { Mandu } from "@mandujs/core/client";
441
441
  import { useState, useCallback } from "react";
@@ -1,12 +1,12 @@
1
- export { GUIDES, getGuide, listGuides, type GuideId } from "./guides.js";
2
- export { RECIPES, getRecipe, listRecipes, type RecipeId } from "./recipes.js";
3
-
4
- // Agent Skills pattern
5
- export {
6
- listSkills,
7
- getSkill,
8
- listSkillRules,
9
- getSkillRule,
10
- type SkillMeta,
11
- type RuleMeta,
12
- } from "./loader.js";
1
+ export { GUIDES, getGuide, listGuides, type GuideId } from "./guides.js";
2
+ export { RECIPES, getRecipe, listRecipes, type RecipeId } from "./recipes.js";
3
+
4
+ // Agent Skills pattern
5
+ export {
6
+ listSkills,
7
+ getSkill,
8
+ listSkillRules,
9
+ getSkillRule,
10
+ type SkillMeta,
11
+ type RuleMeta,
12
+ } from "./loader.js";
@@ -5,7 +5,8 @@
5
5
 
6
6
  import { readdir, readFile } from "fs/promises";
7
7
  import { join, dirname } from "path";
8
- import { fileURLToPath } from "url";
8
+ import { fileURLToPath } from "url";
9
+ import { OFFICIAL_SKILLS, OFFICIAL_SKILL_IDS } from "../generated-skills/catalog.js";
9
10
 
10
11
  const __filename = fileURLToPath(import.meta.url);
11
12
  const __dirname = dirname(__filename);
@@ -26,21 +27,7 @@ export interface RuleMeta {
26
27
  tags: string[];
27
28
  }
28
29
 
29
- // Available skills
30
- const SKILL_IDS = [
31
- "mandu-agent-workflow",
32
- "mandu-slot",
33
- "mandu-fs-routes",
34
- "mandu-hydration",
35
- "mandu-guard",
36
- "mandu-performance",
37
- "mandu-composition",
38
- "mandu-security",
39
- "mandu-testing",
40
- "mandu-deployment",
41
- "mandu-styling",
42
- "mandu-ui",
43
- ];
30
+ const SKILL_IDS: readonly string[] = OFFICIAL_SKILL_IDS;
44
31
 
45
32
  /**
46
33
  * Parse YAML frontmatter from markdown content
@@ -94,22 +81,8 @@ export function listSkills(): SkillMeta[] {
94
81
  });
95
82
  }
96
83
 
97
- function getSkillDescription(id: string): string {
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",
101
- "mandu-fs-routes": "File-system based routing patterns",
102
- "mandu-hydration": "Island hydration and client components",
103
- "mandu-guard": "Architecture enforcement and layer dependencies",
104
- "mandu-performance": "Performance optimization patterns for Mandu apps",
105
- "mandu-composition": "React composition patterns for Islands and state",
106
- "mandu-security": "Security best practices for authentication and protection",
107
- "mandu-testing": "Testing patterns with Bun test and Playwright",
108
- "mandu-deployment": "Production deployment with Render, Supabase, Docker, and CI/CD",
109
- "mandu-styling": "CSS framework integration with Tailwind, Panda CSS, and theming",
110
- "mandu-ui": "UI component library integration with shadcn/ui and accessibility",
111
- };
112
- return descriptions[id] || "";
84
+ function getSkillDescription(id: string): string {
85
+ return OFFICIAL_SKILLS.find((skill) => skill.id === id)?.description ?? "";
113
86
  }
114
87
 
115
88
  /**
@@ -120,7 +93,7 @@ export async function getSkill(skillId: string): Promise<{ meta: SkillMeta; cont
120
93
  return null;
121
94
  }
122
95
 
123
- const skillPath = join(__dirname, skillId, "SKILL.md");
96
+ const skillPath = join(__dirname, "..", "generated-skills", skillId, "SKILL.md");
124
97
 
125
98
  try {
126
99
  const content = await readFile(skillPath, "utf-8");
@@ -149,7 +122,7 @@ export async function listSkillRules(skillId: string): Promise<RuleMeta[]> {
149
122
  return [];
150
123
  }
151
124
 
152
- const rulesPath = join(__dirname, skillId, "rules");
125
+ const rulesPath = join(__dirname, "..", "generated-skills", skillId, "rules");
153
126
 
154
127
  try {
155
128
  const files = await readdir(rulesPath);
@@ -194,7 +167,7 @@ export async function getSkillRule(
194
167
  return null;
195
168
  }
196
169
 
197
- const rulePath = join(__dirname, skillId, "rules", `${ruleId}.md`);
170
+ const rulePath = join(__dirname, "..", "generated-skills", skillId, "rules", `${ruleId}.md`);
198
171
 
199
172
  try {
200
173
  const content = await readFile(rulePath, "utf-8");
@@ -469,30 +469,30 @@ export default function Counter({ initial = 0, step = 1 }: CounterProps) {
469
469
  }
470
470
  \`\`\`
471
471
 
472
- ## Step 2: 서버 페이지에서 partial로 사용
473
-
474
- \`\`\`tsx
475
- // app/counter/page.tsx
476
-
477
- import { partial } from "@mandujs/core/client";
478
- import Counter from "./client";
479
-
480
- const CounterPartial = partial({
481
- component: Counter,
482
- priority: "visible",
483
- });
484
-
485
- export default function CounterPage() {
486
- return (
472
+ ## Step 2: 서버 페이지에서 partial로 사용
473
+
474
+ \`\`\`tsx
475
+ // app/counter/page.tsx
476
+
477
+ import { partial } from "@mandujs/core/client";
478
+ import Counter from "./client";
479
+
480
+ const CounterPartial = partial({
481
+ component: Counter,
482
+ priority: "visible",
483
+ });
484
+
485
+ export default function CounterPage() {
486
+ return (
487
487
  <div style={{ padding: "20px" }}>
488
488
  <h1>Counter Demo</h1>
489
489
  <p>아래 카운터는 클라이언트에서 hydration됩니다.</p>
490
-
491
- {/* Inline client region */}
492
- <CounterPartial.Render initial={10} step={5} />
493
-
494
- <p style={{ marginTop: "20px", color: "#666" }}>
495
- 이 텍스트는 정적 HTML입니다.
490
+
491
+ {/* Inline client region */}
492
+ <CounterPartial.Render initial={10} step={5} />
493
+
494
+ <p style={{ marginTop: "20px", color: "#666" }}>
495
+ 이 텍스트는 정적 HTML입니다.
496
496
  </p>
497
497
  </div>
498
498
  );
@@ -624,13 +624,13 @@ export default function UserList() {
624
624
 
625
625
  ## Mandu.island() API (고급)
626
626
 
627
- 서버 데이터와 클라이언트 상태를 분리하는 page-level Island가 필요하면
628
- \`Mandu.island({ setup, render })\`를 사용합니다. \`island("visible",
629
- Component)\`는 지원하지 않습니다. 서버 페이지 안에 inline으로 렌더링할
630
- 영역은 \`partial()\`을 사용하세요.
631
-
632
- \`\`\`typescript
633
- // spec/slots/todos.client.ts
627
+ 서버 데이터와 클라이언트 상태를 분리하는 page-level Island가 필요하면
628
+ \`Mandu.island({ setup, render })\`를 사용합니다. \`island("visible",
629
+ Component)\`는 지원하지 않습니다. 서버 페이지 안에 inline으로 렌더링할
630
+ 영역은 \`partial()\`을 사용하세요.
631
+
632
+ \`\`\`typescript
633
+ // spec/slots/todos.client.ts
634
634
 
635
635
  import { Mandu } from "@mandujs/core/client";
636
636
  import { useState } from "react";
package/src/server.ts CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  } from "@modelcontextprotocol/sdk/types.js";
23
23
 
24
24
  import { loadManduConfig, type ManduConfig } from "@mandujs/core";
25
- import { startWatcher } from "@mandujs/core/watcher";
25
+ import { startWatcher } from "@mandujs/core/compat/watcher/index";
26
26
 
27
27
  // DNA-001: 플러그인 기반 도구 레지스트리
28
28
  import { mcpToolRegistry } from "./registry/mcp-tool-registry.js";