@1agh/maude 0.15.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/LICENSE +21 -0
- package/README.md +166 -0
- package/cli/bin/maude.exe +15 -0
- package/cli/bin/maude.mjs +45 -0
- package/cli/bin/mdcc.exe +10 -0
- package/cli/bin/mdcc.mjs +7 -0
- package/cli/cli-wrapper.cjs +67 -0
- package/cli/commands/config.mjs +94 -0
- package/cli/commands/design.mjs +386 -0
- package/cli/commands/help.mjs +57 -0
- package/cli/commands/init.mjs +178 -0
- package/cli/commands/version.mjs +7 -0
- package/cli/install.cjs +113 -0
- package/cli/lib/argv.mjs +37 -0
- package/cli/lib/argv.test.mjs +46 -0
- package/cli/lib/copy-tree.mjs +78 -0
- package/package.json +94 -0
- package/plugins/design/dev-server/annotations-context-toolbar.tsx +397 -0
- package/plugins/design/dev-server/annotations-layer.tsx +1717 -0
- package/plugins/design/dev-server/api.ts +674 -0
- package/plugins/design/dev-server/bin/_screenshot-playwright.mjs +50 -0
- package/plugins/design/dev-server/bin/bootstrap-check.sh +83 -0
- package/plugins/design/dev-server/bin/canvas-edit.sh +48 -0
- package/plugins/design/dev-server/bin/handoff.sh +27 -0
- package/plugins/design/dev-server/bin/screenshot.sh +232 -0
- package/plugins/design/dev-server/bin/server-up.sh +135 -0
- package/plugins/design/dev-server/bin/slug.sh +22 -0
- package/plugins/design/dev-server/bin/smoke.sh +272 -0
- package/plugins/design/dev-server/build.ts +267 -0
- package/plugins/design/dev-server/canvas-build.ts +219 -0
- package/plugins/design/dev-server/canvas-edit.ts +388 -0
- package/plugins/design/dev-server/canvas-header.ts +165 -0
- package/plugins/design/dev-server/canvas-icons.tsx +131 -0
- package/plugins/design/dev-server/canvas-lib-inline.ts +260 -0
- package/plugins/design/dev-server/canvas-lib-resolver.ts +85 -0
- package/plugins/design/dev-server/canvas-lib.tsx +1995 -0
- package/plugins/design/dev-server/canvas-meta.schema.json +181 -0
- package/plugins/design/dev-server/canvas-pipeline.ts +270 -0
- package/plugins/design/dev-server/canvas-shell.tsx +813 -0
- package/plugins/design/dev-server/client/app.jsx +2027 -0
- package/plugins/design/dev-server/client/hmr.mjs +85 -0
- package/plugins/design/dev-server/client/iframe-lazy.mjs +121 -0
- package/plugins/design/dev-server/client/index.html +15 -0
- package/plugins/design/dev-server/client/styles/0-reset.css +18 -0
- package/plugins/design/dev-server/client/styles/1-tokens.css +297 -0
- package/plugins/design/dev-server/client/styles/2-layout.css +35 -0
- package/plugins/design/dev-server/client/styles/3-shell.css +906 -0
- package/plugins/design/dev-server/client/styles/4-components.css +1268 -0
- package/plugins/design/dev-server/client/styles/5-utilities.css +4 -0
- package/plugins/design/dev-server/client/styles/_index.css +24 -0
- package/plugins/design/dev-server/client/styles.css +1419 -0
- package/plugins/design/dev-server/config.schema.json +147 -0
- package/plugins/design/dev-server/context-menu.tsx +343 -0
- package/plugins/design/dev-server/context.ts +173 -0
- package/plugins/design/dev-server/dist/client.bundle.js +20323 -0
- package/plugins/design/dev-server/dist/styles.css +2875 -0
- package/plugins/design/dev-server/examples/README.md +9 -0
- package/plugins/design/dev-server/examples/perf-100-artboards.tsx +113 -0
- package/plugins/design/dev-server/fs-watch.ts +63 -0
- package/plugins/design/dev-server/handoff.ts +721 -0
- package/plugins/design/dev-server/history.ts +125 -0
- package/plugins/design/dev-server/hmr-broadcast.ts +114 -0
- package/plugins/design/dev-server/http.ts +413 -0
- package/plugins/design/dev-server/input-router.tsx +485 -0
- package/plugins/design/dev-server/inspect.ts +365 -0
- package/plugins/design/dev-server/locator.ts +159 -0
- package/plugins/design/dev-server/mem.ts +97 -0
- package/plugins/design/dev-server/runtime-bundle.ts +235 -0
- package/plugins/design/dev-server/server.mjs +1246 -0
- package/plugins/design/dev-server/server.ts +131 -0
- package/plugins/design/dev-server/test/_helpers.ts +81 -0
- package/plugins/design/dev-server/test/active-state.test.ts +145 -0
- package/plugins/design/dev-server/test/annotations-api.test.ts +146 -0
- package/plugins/design/dev-server/test/annotations-layer.test.ts +419 -0
- package/plugins/design/dev-server/test/binary-smoke.test.ts +47 -0
- package/plugins/design/dev-server/test/bundle-smoke.test.ts +29 -0
- package/plugins/design/dev-server/test/canvas-build.test.ts +78 -0
- package/plugins/design/dev-server/test/canvas-edit.test.ts +139 -0
- package/plugins/design/dev-server/test/canvas-header.test.ts +127 -0
- package/plugins/design/dev-server/test/canvas-lib-inline.test.ts +146 -0
- package/plugins/design/dev-server/test/canvas-lib-resolver.test.ts +112 -0
- package/plugins/design/dev-server/test/canvas-meta-api.test.ts +236 -0
- package/plugins/design/dev-server/test/canvas-pipeline.test.ts +180 -0
- package/plugins/design/dev-server/test/canvas-route.test.ts +176 -0
- package/plugins/design/dev-server/test/fs-watch.test.ts +41 -0
- package/plugins/design/dev-server/test/handoff-static-frames.test.ts +215 -0
- package/plugins/design/dev-server/test/handoff.test.ts +281 -0
- package/plugins/design/dev-server/test/history-rollback.test.ts +62 -0
- package/plugins/design/dev-server/test/hmr-broadcast.test.ts +108 -0
- package/plugins/design/dev-server/test/input-router.test.ts +316 -0
- package/plugins/design/dev-server/test/locator.test.ts +214 -0
- package/plugins/design/dev-server/test/perf-harness.ts +193 -0
- package/plugins/design/dev-server/test/phase-3.6-smoke.test.ts +77 -0
- package/plugins/design/dev-server/test/runtime-bundle.test.ts +69 -0
- package/plugins/design/dev-server/test/server-lifecycle.test.ts +28 -0
- package/plugins/design/dev-server/test/tool-palette.test.tsx +55 -0
- package/plugins/design/dev-server/test/use-annotation-selection.test.tsx +77 -0
- package/plugins/design/dev-server/test/use-artboard-drag.test.ts +325 -0
- package/plugins/design/dev-server/test/use-selection-set.test.tsx +166 -0
- package/plugins/design/dev-server/test/use-snap-guides.test.ts +190 -0
- package/plugins/design/dev-server/test/use-tool-mode.test.tsx +93 -0
- package/plugins/design/dev-server/test/ws-handshake.test.ts +33 -0
- package/plugins/design/dev-server/tool-palette.tsx +278 -0
- package/plugins/design/dev-server/tsconfig.json +26 -0
- package/plugins/design/dev-server/use-annotation-selection.tsx +92 -0
- package/plugins/design/dev-server/use-annotations-visibility.tsx +43 -0
- package/plugins/design/dev-server/use-artboard-drag.tsx +445 -0
- package/plugins/design/dev-server/use-selection-set.tsx +224 -0
- package/plugins/design/dev-server/use-snap-guides.tsx +215 -0
- package/plugins/design/dev-server/use-tool-mode.tsx +114 -0
- package/plugins/design/dev-server/ws.ts +90 -0
- package/plugins/design/templates/_shell.html +177 -0
- package/plugins/design/templates/canvas.tsx.template +54 -0
- package/plugins/design/templates/design-system-inspiration/_MAPPING.md +277 -0
- package/plugins/design/templates/design-system-inspiration/_README.md +71 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-banner.html +68 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-empty-state-generous.html +39 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-feature-grid.html +62 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-marketing-card.html +63 -0
- package/plugins/design/templates/design-system-inspiration/audience-consumer/components-testimonial.html +80 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-code-block.html +71 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-diff-view.html +65 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-log-stream.html +62 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-monospace-table.html +57 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/components-terminal-pane.html +67 -0
- package/plugins/design/templates/design-system-inspiration/audience-developer/type-mono.html +57 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/colors-presence.html +74 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-command-palette.html +90 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-keyboard.html +51 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-list.html +89 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-shortcuts-overlay.html +85 -0
- package/plugins/design/templates/design-system-inspiration/audience-pro/components-toast-menu.html +80 -0
- package/plugins/design/templates/design-system-inspiration/core/INDEX.md.tpl +25 -0
- package/plugins/design/templates/design-system-inspiration/core/README.orchestration.md.tpl +71 -0
- package/plugins/design/templates/design-system-inspiration/core/README.philosophy.md.tpl +77 -0
- package/plugins/design/templates/design-system-inspiration/core/SKILL.md.tpl +50 -0
- package/plugins/design/templates/design-system-inspiration/core/colors_and_type.css.tpl +111 -0
- package/plugins/design/templates/design-system-inspiration/core/config.json.tpl +28 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/_layout.css +113 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/colors-accent.html +48 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/colors-surfaces.html +49 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/colors-text.html +52 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/components-buttons.html +83 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/components-cards.html +79 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/components-inputs.html +82 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/motion.html +66 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/spacing-scale.html +53 -0
- package/plugins/design/templates/design-system-inspiration/core/preview/type-scale.html +62 -0
- package/plugins/design/templates/design-system-inspiration/foundations/borders.html +39 -0
- package/plugins/design/templates/design-system-inspiration/foundations/elevation.html +46 -0
- package/plugins/design/templates/design-system-inspiration/foundations/focus.html +48 -0
- package/plugins/design/templates/design-system-inspiration/foundations/grid.html +51 -0
- package/plugins/design/templates/design-system-inspiration/foundations/iconography.html +73 -0
- package/plugins/design/templates/design-system-inspiration/foundations/opacity.html +45 -0
- package/plugins/design/templates/design-system-inspiration/foundations/radii.html +40 -0
- package/plugins/design/templates/design-system-inspiration/foundations/selection.html +45 -0
- package/plugins/design/templates/design-system-inspiration/meta/accessibility.html +62 -0
- package/plugins/design/templates/design-system-inspiration/meta/i18n.html +73 -0
- package/plugins/design/templates/design-system-inspiration/meta/presence-multiplayer.html +71 -0
- package/plugins/design/templates/design-system-inspiration/meta/tokens-index.html +80 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-auth.html +78 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-data-density.html +61 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-error-pages.html +70 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-form-layouts.html +70 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-onboarding.html +71 -0
- package/plugins/design/templates/design-system-inspiration/patterns/patterns-pricing.html +83 -0
- package/plugins/design/templates/design-system-inspiration/platform-desktop/components-resize-panels.html +63 -0
- package/plugins/design/templates/design-system-inspiration/platform-desktop/ui_kits-desktop-index.html +55 -0
- package/plugins/design/templates/design-system-inspiration/platform-desktop/ui_kits-desktop-showcase.html +302 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-bottom-sheet.html +63 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-pull-to-refresh.html +74 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-segmented-control.html +51 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/components-tab-bar.html +57 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/ui_kits-mobile-index.html +58 -0
- package/plugins/design/templates/design-system-inspiration/platform-mobile/ui_kits-mobile-showcase.html +237 -0
- package/plugins/design/templates/design-system-inspiration/status/colors-status.html +49 -0
- package/plugins/design/templates/design-system-inspiration/status/components-status.html +63 -0
- package/plugins/design/templates/design-system-inspiration/status/skeletons.html +74 -0
- package/plugins/design/templates/design-system-inspiration/theme-both/colors-themes-side-by-side.html +59 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-callout.html +74 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-dialogs.html +81 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-tables.html +101 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-toggles.html +74 -0
- package/plugins/design/templates/design-system-inspiration/universal/components-tooltips.html +74 -0
- package/plugins/design/templates/design-system-inspiration/universal/empty-state.html.tpl +34 -0
- package/plugins/design/templates/design-system-inspiration/universal/logo.html +42 -0
- package/plugins/design/templates/ds-specimen.tsx.template +59 -0
- package/plugins/flow/.claude-plugin/config.schema.json +398 -0
- package/plugins/flow/README.md +45 -0
- package/plugins/flow/templates/ai-skeleton/INDEX.md +50 -0
- package/plugins/flow/templates/ai-skeleton/README.md +46 -0
- package/plugins/flow/templates/ai-skeleton/browser/har/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/browser/snapshots/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/business/README.md +12 -0
- package/plugins/flow/templates/ai-skeleton/context/README.md +12 -0
- package/plugins/flow/templates/ai-skeleton/decisions/README.md +20 -0
- package/plugins/flow/templates/ai-skeleton/design-import/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/dev-logs/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/device/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/docs/README.md +5 -0
- package/plugins/flow/templates/ai-skeleton/logs/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/logs/README.md +13 -0
- package/plugins/flow/templates/ai-skeleton/plans/README.md +16 -0
- package/plugins/flow/templates/ai-skeleton/plans/archive/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/release-guide.md +35 -0
- package/plugins/flow/templates/ai-skeleton/reviews/README.md +15 -0
- package/plugins/flow/templates/ai-skeleton/scenarios/README.md +26 -0
- package/plugins/flow/templates/ai-skeleton/scenarios/_lib/.gitkeep +0 -0
- package/plugins/flow/templates/ai-skeleton/state/STATE.md +25 -0
- package/plugins/flow/templates/ai-skeleton/templates/HANDOFF.md +32 -0
- package/plugins/flow/templates/ai-skeleton/workflows.config.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 1aGh
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Maude — Claude Code marketplace
|
|
2
|
+
|
|
3
|
+
A personal marketplace of Claude Code plugins. Two plugins today, plus a `maude` CLI for scaffolding and running the bundled dev tooling.
|
|
4
|
+
|
|
5
|
+
> **Renamed from `md-claude`.** See [`docs/MIGRATING-MD-CLAUDE-TO-MAUDE.md`](./docs/MIGRATING-MD-CLAUDE-TO-MAUDE.md) if you came from the old name.
|
|
6
|
+
|
|
7
|
+
> **📚 Full docs: https://maude.iagh.cz** (or browse the source under [`site/content/docs/`](./site/content/docs/) until the public URL lands).
|
|
8
|
+
> Contributing? See [CONTRIBUTING.md](./CONTRIBUTING.md). Security? See [SECURITY.md](./SECURITY.md).
|
|
9
|
+
|
|
10
|
+
| Plugin | What it does |
|
|
11
|
+
| ------ | ------------ |
|
|
12
|
+
| **`design`** | Canvas-first iteration on HTML/JSX mocks under `.design/` — element selection via Cmd+Click, auto-managed dev server, chained UX/DS critique. |
|
|
13
|
+
| **`flow`** | Generic agentic workflow loop with a second-brain `.ai/` workspace. `/flow:plan`, `/flow:execute`, `/flow:utils-verify`, `/flow:validate`, `/flow:done`, `/flow:init`, `/flow:record-ddr`, `/flow:scenario`, …. Project-agnostic via `<project>` placeholders + per-repo `.ai/workflows.config.json`. |
|
|
14
|
+
|
|
15
|
+
Plus the **`maude`** CLI — `maude init` scaffolds a fresh `.ai/` workspace from the flow plugin skeleton; `maude design serve` boots the design dev server. The legacy `mdcc` alias still works (prints a deprecation warning) and will be removed in v0.17.x.
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
### 1. Add the marketplace inside Claude Code
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/plugin marketplace add 1aGh/maude
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. Install the plugins you want
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/plugin install design@maude
|
|
29
|
+
/plugin install flow@maude
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Then `/reload-plugins` and you should see `/design:edit`, `/design:*`, `/flow:plan`, `/flow:execute`, etc.
|
|
33
|
+
|
|
34
|
+
### 3. Install the CLI
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
# From npm:
|
|
38
|
+
npm i -g @1agh/maude
|
|
39
|
+
|
|
40
|
+
# Or directly from GitHub:
|
|
41
|
+
npm i -g github:1aGh/maude
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
After install you have these bins on `$PATH`:
|
|
45
|
+
|
|
46
|
+
- `maude` — the primary CLI (`init`, `config`, `design serve`).
|
|
47
|
+
- `mdcc` — legacy alias for `maude`. Prints a deprecation warning; will be removed in v0.17.x.
|
|
48
|
+
|
|
49
|
+
### 4. Bootstrap a repo
|
|
50
|
+
|
|
51
|
+
In any project root:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
maude init # scaffold .ai/ second-brain workspace
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then inside Claude Code (with `flow@maude` installed):
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
/init # Anthropic's built-in — generates CLAUDE.md tailored to your codebase
|
|
61
|
+
/flow:init # populates .ai/workflows.config.json with detected stack
|
|
62
|
+
/flow:status # confirm everything wired up
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`/init` writes the `CLAUDE.md` Claude auto-loads every session (conventions, build commands, gotchas). `/flow:init` handles the structured workspace config — they're complementary, not duplicates.
|
|
66
|
+
|
|
67
|
+
## Runtime requirements
|
|
68
|
+
|
|
69
|
+
- **Node ≥ 20** — for the dev server and CLI. Zero npm runtime deps.
|
|
70
|
+
- **Claude Code** — desktop app, CLI, or IDE extension.
|
|
71
|
+
- Optional: **`agent-browser`** for design screenshot evidence.
|
|
72
|
+
|
|
73
|
+
## What's where
|
|
74
|
+
|
|
75
|
+
User-facing docs live in two places — the README points you the right way:
|
|
76
|
+
|
|
77
|
+
- **Reference** (every command, every config key, recipes for Next.js / Expo / monorepo) → [`site/content/docs/`](./site/content/docs/) (served at https://maude.iagh.cz once Vercel is wired — see [DDR-005](.ai/decisions/DDR-005-docs-site-stack-and-hosting.md)).
|
|
78
|
+
- **Quickstart** + **contributor info** → this README.
|
|
79
|
+
|
|
80
|
+
The docs site auto-generates per-command pages from `plugins/{flow,design}/commands/*.md` frontmatter and a typed schema reference from `plugins/flow/.claude-plugin/config.schema.json`. Adding a new command → docs update on next build.
|
|
81
|
+
|
|
82
|
+
## Workspaces
|
|
83
|
+
|
|
84
|
+
The repo is a **pnpm workspace monorepo** with one published npm package (`@1agh/maude`). Internal workspaces are `"private": true` and never publish:
|
|
85
|
+
|
|
86
|
+
| Workspace | Purpose |
|
|
87
|
+
| --------- | ------- |
|
|
88
|
+
| `.` (root) | The single npm publisher — CLI, dev-server entry, plugin templates that ship to npm. |
|
|
89
|
+
| `site/` | Docs site — Fumadocs + Next.js, deployed to Vercel ([DDR-005](.ai/decisions/DDR-005-docs-site-stack-and-hosting.md)). |
|
|
90
|
+
| `plugins/design/dev-server/` | Zero-dep Node dev server + browser client. Bundled output (`dist/`) is the only thing in the npm tarball. |
|
|
91
|
+
| `plugins/design/hub/` | Reserved for the v1.1 federated hub (Phase 9). |
|
|
92
|
+
|
|
93
|
+
Common scripts at the root:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
pnpm install # bootstrap everything
|
|
97
|
+
pnpm dev # boot the design dev server
|
|
98
|
+
pnpm dev:site # docs site dev server
|
|
99
|
+
pnpm build # build every workspace that defines `build`
|
|
100
|
+
pnpm lint # biome over the whole repo
|
|
101
|
+
pnpm test # node --test over cli/**/*.test.mjs
|
|
102
|
+
pnpm changeset # add a changeset for the next release
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The site workspace's Next.js dependencies are heavy — contributors fixing plugin code can keep working with `pnpm install --filter '!@maude/site'` to skip them.
|
|
106
|
+
|
|
107
|
+
## Updating
|
|
108
|
+
|
|
109
|
+
In Claude Code, after a new version lands on the marketplace:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
/plugin marketplace update maude
|
|
113
|
+
/plugin install design@maude
|
|
114
|
+
/plugin install flow@maude
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Releasing
|
|
118
|
+
|
|
119
|
+
The npm package (`@1agh/maude`) and the Claude Code plugins (`design@maude`, `flow@maude`) share one version. The standard release path is **Changesets**:
|
|
120
|
+
|
|
121
|
+
```sh
|
|
122
|
+
# 1. Each PR with shipped behavior includes a changeset
|
|
123
|
+
pnpm changeset
|
|
124
|
+
|
|
125
|
+
# 2. When ready to release, the maintainer runs:
|
|
126
|
+
pnpm version # = bash scripts/changesets-version.sh
|
|
127
|
+
# → consumes .changeset/*.md
|
|
128
|
+
# → bumps package.json + CHANGELOG
|
|
129
|
+
# → propagates version to plugin manifests
|
|
130
|
+
# → re-runs scripts/check-version-parity.sh
|
|
131
|
+
|
|
132
|
+
git commit -am "chore: release v$(node -p "require('./package.json').version")"
|
|
133
|
+
git tag "v$(node -p "require('./package.json').version")"
|
|
134
|
+
git push --follow-tags
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The `v*` tag triggers `.github/workflows/publish.yml`, which re-runs the parity check, verifies the tag matches `package.json`, builds workspaces, publishes with `--access public --provenance`, and creates a GitHub Release using the CHANGELOG entry for that version.
|
|
138
|
+
|
|
139
|
+
`scripts/bump-version.sh patch|minor|major|X.Y.Z` remains as a manual fallback for emergency hotfixes outside the Changesets flow.
|
|
140
|
+
|
|
141
|
+
### One-time setup (project owner)
|
|
142
|
+
|
|
143
|
+
1. Create an **Automation** token at <https://www.npmjs.com/settings/~/tokens>.
|
|
144
|
+
2. GitHub repo → **Settings → Secrets → Actions** → `NPM_TOKEN`.
|
|
145
|
+
3. `id-token: write` is already enabled in `publish.yml` for npm provenance.
|
|
146
|
+
|
|
147
|
+
## Local development (plugin authors)
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
/plugin marketplace add /absolute/path/to/maude
|
|
151
|
+
/plugin install design@maude
|
|
152
|
+
/plugin install flow@maude
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Working on plugin internals:
|
|
156
|
+
|
|
157
|
+
1. **Edit in place** — the local marketplace points at your working tree.
|
|
158
|
+
2. **Reload after edits:**
|
|
159
|
+
- Commands / agents / skills → `/plugin marketplace update maude` then `/reload-plugins`.
|
|
160
|
+
- Dev server code → kill the running process (`lsof -i :<port>` → `kill`) and let the next `/design:edit` invocation auto-restart.
|
|
161
|
+
3. **Test in isolation** — open Claude Code from a scratch project (`cd /tmp && claude`) so plugins aren't entangled with this repo's own `.ai/`.
|
|
162
|
+
4. **Dogfood** — Maude itself uses `flow` for plan/execute/done. Once `flow` is installed against this marketplace, you can drive its own development with `/flow:plan`, `/flow:execute`, etc.
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
MIT — see [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Placeholder bin shipped in the main @1agh/maude tarball.
|
|
3
|
+
#
|
|
4
|
+
# This file is HARDLINKED over by `cli/install.cjs` (the postinstall hook),
|
|
5
|
+
# which replaces it with the real native binary from the matching per-platform
|
|
6
|
+
# sub-package (@1agh/maude-<slug>). After postinstall, invoking `maude`
|
|
7
|
+
# execs the native binary directly with zero Node startup overhead.
|
|
8
|
+
#
|
|
9
|
+
# If you see this message at runtime, your installer skipped postinstall.
|
|
10
|
+
# Either run `npm rebuild @1agh/maude` to retry, or invoke the safe-mode
|
|
11
|
+
# fallback (`maude-safe` / `mdcc-safe`) which performs platform detection on every call.
|
|
12
|
+
echo "@1agh/maude: postinstall did not complete (the bin stub is still in place)." >&2
|
|
13
|
+
echo " Run \`npm rebuild @1agh/maude\` to retry the postinstall hardlink." >&2
|
|
14
|
+
echo " Or use the safe fallback: \`maude-safe <args>\`." >&2
|
|
15
|
+
exit 1
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { dirname, resolve } from 'node:path';
|
|
3
|
+
// maude — Maude CLI. Scaffold .ai workspace, run dev servers, manage config.
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = dirname(__filename);
|
|
8
|
+
const CLI_ROOT = resolve(__dirname, '..');
|
|
9
|
+
const PKG_ROOT = resolve(CLI_ROOT, '..');
|
|
10
|
+
|
|
11
|
+
const COMMANDS = {
|
|
12
|
+
init: () => import('../commands/init.mjs'),
|
|
13
|
+
config: () => import('../commands/config.mjs'),
|
|
14
|
+
design: () => import('../commands/design.mjs'),
|
|
15
|
+
help: () => import('../commands/help.mjs'),
|
|
16
|
+
version: () => import('../commands/version.mjs'),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
async function main(argv) {
|
|
20
|
+
const args = argv.slice(2);
|
|
21
|
+
const cmd = args[0];
|
|
22
|
+
|
|
23
|
+
if (!cmd || cmd === '--help' || cmd === '-h') {
|
|
24
|
+
const { run } = await COMMANDS.help();
|
|
25
|
+
return run({ args: args.slice(1), pkgRoot: PKG_ROOT });
|
|
26
|
+
}
|
|
27
|
+
if (cmd === '--version' || cmd === '-v') {
|
|
28
|
+
const { run } = await COMMANDS.version();
|
|
29
|
+
return run({ args: [], pkgRoot: PKG_ROOT });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const loader = COMMANDS[cmd];
|
|
33
|
+
if (!loader) {
|
|
34
|
+
process.stderr.write(`maude: unknown command "${cmd}"\nRun \`maude help\` for usage.\n`);
|
|
35
|
+
process.exit(2);
|
|
36
|
+
}
|
|
37
|
+
const { run } = await loader();
|
|
38
|
+
return run({ args: args.slice(1), pkgRoot: PKG_ROOT });
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
main(process.argv).catch((err) => {
|
|
42
|
+
process.stderr.write(`maude: ${err.message}\n`);
|
|
43
|
+
if (process.env.MAUDE_DEBUG || process.env.MDCC_DEBUG) process.stderr.write(`${err.stack}\n`);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
});
|
package/cli/bin/mdcc.exe
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Legacy alias for `maude.exe`. Prints deprecation warning, then delegates.
|
|
3
|
+
# Will be removed in v0.17.x. Use `maude` directly.
|
|
4
|
+
#
|
|
5
|
+
# Like maude.exe, this is HARDLINKED over by `cli/install.cjs` on postinstall
|
|
6
|
+
# to the same native binary. If the hardlink failed, this stub fires.
|
|
7
|
+
echo "mdcc: ⚠ \`mdcc\` is deprecated. Use \`maude\` instead. This alias will be removed in v0.17.x." >&2
|
|
8
|
+
echo "@1agh/maude: postinstall did not complete (the bin stub is still in place)." >&2
|
|
9
|
+
echo " Run \`npm rebuild @1agh/maude\` to retry the postinstall hardlink." >&2
|
|
10
|
+
exit 1
|
package/cli/bin/mdcc.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// mdcc — legacy alias for `maude`. Prints deprecation warning, forwards args.
|
|
3
|
+
// Will be removed in v0.17.x. Use `maude` directly.
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
'mdcc: ⚠ `mdcc` is deprecated. Use `maude` instead. This alias will be removed in v0.17.x.\n'
|
|
6
|
+
);
|
|
7
|
+
await import('./maude.mjs');
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Safe-mode entry. Exposed as the `maude-safe` bin (legacy alias: `mdcc-safe`) in main package.json.
|
|
4
|
+
//
|
|
5
|
+
// Used when postinstall was skipped (`npm install --ignore-scripts`) or when
|
|
6
|
+
// the hardlink failed for some reason. Performs platform detection on every
|
|
7
|
+
// invocation, then spawnSyncs the matching sub-package binary. Slower than
|
|
8
|
+
// the hardlinked path but always works.
|
|
9
|
+
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
const fs = require('node:fs');
|
|
13
|
+
const path = require('node:path');
|
|
14
|
+
const { spawnSync } = require('node:child_process');
|
|
15
|
+
|
|
16
|
+
function detectSlug() {
|
|
17
|
+
const p = process.platform;
|
|
18
|
+
const a = process.arch;
|
|
19
|
+
if (p === 'darwin') {
|
|
20
|
+
if (a === 'arm64') return 'darwin-arm64';
|
|
21
|
+
try {
|
|
22
|
+
const t = spawnSync('sysctl', ['-n', 'sysctl.proc_translated'], { encoding: 'utf8' });
|
|
23
|
+
if (t.stdout?.trim() === '1') return 'darwin-arm64';
|
|
24
|
+
} catch {
|
|
25
|
+
/* not Rosetta */
|
|
26
|
+
}
|
|
27
|
+
return 'darwin-x64';
|
|
28
|
+
}
|
|
29
|
+
if (p === 'linux') {
|
|
30
|
+
const report = process.report?.getReport?.();
|
|
31
|
+
const isMusl = !report?.header?.glibcVersionRuntime;
|
|
32
|
+
if (a === 'arm64') return isMusl ? 'linux-arm64-musl' : 'linux-arm64';
|
|
33
|
+
return isMusl ? 'linux-x64-musl' : 'linux-x64';
|
|
34
|
+
}
|
|
35
|
+
if (p === 'win32') return 'win32-x64';
|
|
36
|
+
throw new Error(`Unsupported platform: ${p}-${a}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function resolveBinary(slug) {
|
|
40
|
+
const filename = process.platform === 'win32' ? 'maude.exe' : 'maude';
|
|
41
|
+
const pkg = `@1agh/maude-${slug}`;
|
|
42
|
+
try {
|
|
43
|
+
const manifest = require.resolve(`${pkg}/package.json`);
|
|
44
|
+
return path.join(path.dirname(manifest), filename);
|
|
45
|
+
} catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function main() {
|
|
51
|
+
const slug = detectSlug();
|
|
52
|
+
const bin = resolveBinary(slug);
|
|
53
|
+
if (!bin || !fs.existsSync(bin)) {
|
|
54
|
+
console.error(
|
|
55
|
+
`maude-safe: missing @1agh/maude-${slug}. Reinstall without --ignore-scripts: \`npm i -g @1agh/maude\`.`
|
|
56
|
+
);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
const res = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
60
|
+
if (res.error) {
|
|
61
|
+
console.error('maude-safe:', res.error.message);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
process.exit(res.status ?? 0);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
main();
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { readFile, stat, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { parseArgs } from '../lib/argv.mjs';
|
|
4
|
+
|
|
5
|
+
const CONFIG_PATH = '.ai/workflows.config.json';
|
|
6
|
+
|
|
7
|
+
export async function run({ args }) {
|
|
8
|
+
const { positional } = parseArgs(args);
|
|
9
|
+
const sub = positional[0];
|
|
10
|
+
if (!sub || sub === 'help') {
|
|
11
|
+
process.stdout.write(usage());
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (sub === 'show') {
|
|
15
|
+
const cfg = await loadConfig();
|
|
16
|
+
process.stdout.write(`${JSON.stringify(cfg, null, 2)}\n`);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (sub === 'get') {
|
|
20
|
+
const key = positional[1];
|
|
21
|
+
if (!key) throw new Error('maude config get <dotted.key>');
|
|
22
|
+
const cfg = await loadConfig();
|
|
23
|
+
const v = getPath(cfg, key);
|
|
24
|
+
if (v === undefined) {
|
|
25
|
+
process.stderr.write('(unset)\n');
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
if (typeof v === 'object') process.stdout.write(`${JSON.stringify(v, null, 2)}\n`);
|
|
29
|
+
else process.stdout.write(`${String(v)}\n`);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (sub === 'set') {
|
|
33
|
+
const key = positional[1];
|
|
34
|
+
const rawValue = positional[2];
|
|
35
|
+
if (!key || rawValue === undefined) throw new Error('maude config set <dotted.key> <value>');
|
|
36
|
+
const value = coerce(rawValue);
|
|
37
|
+
const cfg = await loadConfig();
|
|
38
|
+
setPath(cfg, key, value);
|
|
39
|
+
await saveConfig(cfg);
|
|
40
|
+
process.stdout.write(`set ${key} = ${JSON.stringify(value)}\n`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
process.stderr.write(`maude config: unknown subcommand "${sub}"\n${usage()}`);
|
|
44
|
+
process.exit(2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function usage() {
|
|
48
|
+
return `maude config <show|get|set> [args]
|
|
49
|
+
|
|
50
|
+
config show Print the full resolved config.
|
|
51
|
+
config get <dotted.key> Print a single value (e.g. motion.complex).
|
|
52
|
+
config set <dotted.key> <value> Write a value. JSON-parseable values are
|
|
53
|
+
stored typed (numbers, booleans, arrays).
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function loadConfig() {
|
|
58
|
+
const path = resolve(process.cwd(), CONFIG_PATH);
|
|
59
|
+
try {
|
|
60
|
+
await stat(path);
|
|
61
|
+
} catch {
|
|
62
|
+
throw new Error(`${CONFIG_PATH} not found. Run \`maude init\` first.`);
|
|
63
|
+
}
|
|
64
|
+
return JSON.parse(await readFile(path, 'utf8'));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function saveConfig(cfg) {
|
|
68
|
+
const path = resolve(process.cwd(), CONFIG_PATH);
|
|
69
|
+
await writeFile(path, `${JSON.stringify(cfg, null, 2)}\n`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function getPath(obj, dotted) {
|
|
73
|
+
return dotted.split('.').reduce((acc, k) => (acc == null ? undefined : acc[k]), obj);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function setPath(obj, dotted, value) {
|
|
77
|
+
const parts = dotted.split('.');
|
|
78
|
+
let cur = obj;
|
|
79
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
80
|
+
const k = parts[i];
|
|
81
|
+
if (cur[k] == null || typeof cur[k] !== 'object') cur[k] = {};
|
|
82
|
+
cur = cur[k];
|
|
83
|
+
}
|
|
84
|
+
cur[parts[parts.length - 1]] = value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function coerce(raw) {
|
|
88
|
+
// Try JSON first (covers numbers, booleans, null, arrays, objects, quoted strings).
|
|
89
|
+
try {
|
|
90
|
+
return JSON.parse(raw);
|
|
91
|
+
} catch {
|
|
92
|
+
return raw;
|
|
93
|
+
}
|
|
94
|
+
}
|