design-playbook 0.11.0 → 0.12.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 +28 -28
- package/NOTICE +37 -37
- package/README.md +163 -144
- package/codex/AGENTS.md +70 -0
- package/codex/install_skills.py +69 -0
- package/commands/design-io.md +8 -8
- package/commands/doctor.md +15 -0
- package/commands/run-review.md +30 -30
- package/commands/run-status.md +21 -0
- package/commands/ui-review.md +8 -8
- package/commands/ux-spec.md +8 -8
- package/examples/README.md +11 -0
- package/examples/craft-detectors/composition-contrast.md +16 -0
- package/examples/craft-detectors/existing-brand-contrast.md +22 -0
- package/examples/craft-detectors/landing-product-contrast.md +12 -0
- package/examples/craft-detectors/saas-dashboard.md +29 -0
- package/examples/ops-list-spec.md +44 -0
- package/examples/point-back-findings.md +29 -0
- package/examples/reference-intake/README.md +11 -0
- package/examples/reference-intake/product-analogy/contract.md +53 -0
- package/examples/reference-intake/product-analogy/manifest.json +15 -0
- package/examples/reference-intake/screenshot/assets/README.md +1 -0
- package/examples/reference-intake/screenshot/contract.md +55 -0
- package/examples/reference-intake/screenshot/manifest.json +15 -0
- package/examples/reference-intake/url/contract.md +55 -0
- package/examples/reference-intake/url/manifest.json +15 -0
- package/examples/settings-decision-report.md +26 -0
- package/mcp/_transport.py +242 -242
- package/mcp/evidence/README.md +40 -40
- package/mcp/evidence/server.py +659 -475
- package/mcp/evidence/test_server_stdio.py +809 -699
- package/mcp/preview/browser.py +759 -759
- package/mcp/preview/control.css +545 -482
- package/mcp/preview/control.html +80 -67
- package/mcp/preview/control.js +930 -786
- package/mcp/preview/control.py +192 -182
- package/mcp/preview/i18n.py +172 -162
- package/mcp/preview/server.py +129 -129
- package/mcp/preview/test_anchor_v2.py +69 -69
- package/mcp/preview/test_browser_control.py +699 -667
- package/mcp/preview/test_server_stdio.py +639 -639
- package/mcp/preview/test_transaction.py +674 -674
- package/mcp/preview/test_versions.py +572 -572
- package/mcp/preview/transaction.py +864 -864
- package/mcp/preview/util.py +35 -35
- package/mcp/preview/versions.py +396 -396
- package/mcp/test_transport.py +39 -39
- package/package.json +45 -42
- package/scripts/_diagnostics.py +94 -0
- package/scripts/_preview_integrity.py +288 -0
- package/scripts/contract_v1.py +443 -0
- package/scripts/doctor.py +142 -0
- package/scripts/g7_contract_drift.py +236 -0
- package/scripts/run_status.py +331 -0
- package/scripts/validate_run.py +1213 -0
- package/skills/craft-guard/SKILL.md +61 -59
- package/skills/craft-guard/references/craft.md +29 -29
- package/skills/craft-guard/references/detectors.md +124 -124
- package/skills/design-baseline/SKILL.md +134 -134
- package/skills/design-baseline/agents/openai.yaml +4 -4
- package/skills/design-baseline/references/design-template.md +73 -73
- package/skills/design-baseline/references/extraction-guidance.md +39 -39
- package/skills/design-baseline/scripts/design_baseline.py +780 -780
- package/skills/design-playbook/SKILL.md +218 -221
- package/skills/design-playbook/references/first-run.md +33 -0
- package/skills/design-playbook/references/load-map.md +8 -0
- package/skills/design-playbook/references/observe-ops.md +10 -0
- package/skills/design-playbook/references/preview-ops.md +11 -0
- package/skills/native-craft/SKILL.md +59 -59
- package/skills/native-craft/references/native-feel.md +79 -79
- package/skills/reference-intake/SKILL.md +86 -86
- package/skills/reference-intake/references/contract-template.md +82 -82
- package/skills/ui-evaluator/SKILL.md +114 -110
- package/skills/ui-evaluator/references/a11y-tree.md +31 -0
- package/skills/ui-evaluator/references/repair.md +20 -0
- package/skills/ui-evaluator/references/rubric.md +45 -45
- package/skills/ui-picker/SKILL.md +63 -63
- package/skills/ui-picker/references/components.md +31 -31
- package/skills/ui-picker/references/design.md +21 -21
- package/skills/ui-picker/references/domain.md +26 -26
- package/skills/ui-picker/references/template.md +24 -24
- package/skills/ux-spec/SKILL.md +59 -51
- package/skills/ux-spec/references/spec-template.md +43 -43
package/LICENSE
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Bandersnatch0x and contributors
|
|
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.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
This LICENSE covers only the authored materials in this package (skills,
|
|
26
|
-
commands, plugin metadata, and self-written examples). It does not grant
|
|
27
|
-
rights to any third-party playbook manuscript, figures, or trademarks that may
|
|
28
|
-
exist elsewhere in a parent monorepo for learning purposes.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bandersnatch0x and contributors
|
|
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.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
This LICENSE covers only the authored materials in this package (skills,
|
|
26
|
+
commands, plugin metadata, and self-written examples). It does not grant
|
|
27
|
+
rights to any third-party playbook manuscript, figures, or trademarks that may
|
|
28
|
+
exist elsewhere in a parent monorepo for learning purposes.
|
package/NOTICE
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
# NOTICE
|
|
2
|
-
|
|
3
|
-
design-playbook is an original agent plugin (skills, commands, plugin metadata,
|
|
4
|
-
workflow docs, and self-authored examples), licensed under MIT (see `LICENSE`).
|
|
5
|
-
|
|
6
|
-
It is **not** a port, overlay, or redistribution of any third-party design
|
|
7
|
-
playbook's manuscript, figures, brand marks, or demo site. No rights to such
|
|
8
|
-
materials are claimed or granted here.
|
|
9
|
-
|
|
10
|
-
The `native-craft` skill is a derivative of yetone/native-feel-skill (MIT). We
|
|
11
|
-
authored our own Design I/O leaf and condensed its decision gate and native
|
|
12
|
-
conventions audit in our own voice; the full depth (WebView survival, IPC
|
|
13
|
-
contract, memory truths, Raycast evidence) remains in the original skill, which
|
|
14
|
-
users may install separately. The MIT License of the original is reproduced
|
|
15
|
-
below in full, as required for derivative works:
|
|
16
|
-
|
|
17
|
-
The MIT License (MIT)
|
|
18
|
-
|
|
19
|
-
Copyright (c) 2026 yetone
|
|
20
|
-
|
|
21
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
23
|
-
in the Software without restriction, including without limitation the rights
|
|
24
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
25
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
26
|
-
furnished to do so, subject to the following conditions:
|
|
27
|
-
|
|
28
|
-
The above copyright notice and this permission notice shall be included in all
|
|
29
|
-
copies or substantial portions of the Software.
|
|
30
|
-
|
|
31
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
32
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
33
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
34
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
35
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
36
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
37
|
-
SOFTWARE.
|
|
1
|
+
# NOTICE
|
|
2
|
+
|
|
3
|
+
design-playbook is an original agent plugin (skills, commands, plugin metadata,
|
|
4
|
+
workflow docs, and self-authored examples), licensed under MIT (see `LICENSE`).
|
|
5
|
+
|
|
6
|
+
It is **not** a port, overlay, or redistribution of any third-party design
|
|
7
|
+
playbook's manuscript, figures, brand marks, or demo site. No rights to such
|
|
8
|
+
materials are claimed or granted here.
|
|
9
|
+
|
|
10
|
+
The `native-craft` skill is a derivative of yetone/native-feel-skill (MIT). We
|
|
11
|
+
authored our own Design I/O leaf and condensed its decision gate and native
|
|
12
|
+
conventions audit in our own voice; the full depth (WebView survival, IPC
|
|
13
|
+
contract, memory truths, Raycast evidence) remains in the original skill, which
|
|
14
|
+
users may install separately. The MIT License of the original is reproduced
|
|
15
|
+
below in full, as required for derivative works:
|
|
16
|
+
|
|
17
|
+
The MIT License (MIT)
|
|
18
|
+
|
|
19
|
+
Copyright (c) 2026 yetone
|
|
20
|
+
|
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
23
|
+
in the Software without restriction, including without limitation the rights
|
|
24
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
25
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
26
|
+
furnished to do so, subject to the following conditions:
|
|
27
|
+
|
|
28
|
+
The above copyright notice and this permission notice shall be included in all
|
|
29
|
+
copies or substantial portions of the Software.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
32
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
33
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
34
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
35
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
36
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
37
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,144 +1,163 @@
|
|
|
1
|
-
# design-playbook
|
|
2
|
-
|
|
3
|
-
Agent plugin: **Design I/O** for product UI (Claude Code / Codex).
|
|
4
|
-
|
|
5
|
-
Declarations + contracts — not a style CSV pack. Compose with [ui-ux-pro-max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) and Anthropic `frontend-design` for aesthetics; this package owns pipeline and acceptance.
|
|
6
|
-
|
|
7
|
-
## Install (Claude Code)
|
|
8
|
-
|
|
9
|
-
Path of record (published) - the marketplace catalog lives at the **repo root**, not in this package:
|
|
10
|
-
|
|
11
|
-
```text
|
|
12
|
-
/plugin marketplace add https://github.com/Bandersnatch0x/design-playbook.git
|
|
13
|
-
/plugin install design-playbook@design-playbook
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Local dev / self-test:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
claude --plugin-dir <abs-path>/packages/design-playbook # dev load, no install
|
|
20
|
-
# or local marketplace (point at the repo root, where the catalog lives)
|
|
21
|
-
/plugin marketplace add <abs-path-to-repo-root>
|
|
22
|
-
/plugin install design-playbook@design-playbook
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Install (Codex)
|
|
26
|
-
|
|
27
|
-
Same GitHub repo / monorepo root catalog. Codex-native manifest lives at `.codex-plugin/` (MCP uses relative paths).
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
codex plugin marketplace add Bandersnatch0x/design-playbook
|
|
31
|
-
codex plugin add design-playbook@design-playbook
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Local monorepo:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
codex plugin marketplace add <abs-path-to-repo-root>
|
|
38
|
-
codex plugin add design-playbook@design-playbook
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Details + skills-only fallback: [`codex/AGENTS.md`](codex/AGENTS.md).
|
|
42
|
-
|
|
43
|
-
After install, skills and commands are **namespaced** by the plugin name:
|
|
44
|
-
|
|
45
|
-
| Invoke | Role |
|
|
46
|
-
| --- | --- |
|
|
47
|
-
| `/design-playbook:design-playbook` | Orchestrator skill (model-invoked) |
|
|
48
|
-
| `/design-playbook:design-baseline` | Discover/validate/draft the project `DESIGN.md` baseline |
|
|
49
|
-
| `/design-playbook:reference-intake` | Reference contract skill (screenshot/URL/analogy) |
|
|
50
|
-
| `/design-playbook:ux-spec` | Six-layer spec skill |
|
|
51
|
-
| `/design-playbook:ui-picker` | Shell + components skill |
|
|
52
|
-
| `/design-playbook:craft-guard` | Craft / anti-slop skill |
|
|
53
|
-
| `/design-playbook:native-craft` | Native-feel desktop declaration skill |
|
|
54
|
-
| `/design-playbook:ui-evaluator` | Point-back acceptance skill |
|
|
55
|
-
| `/design-playbook:design-io` | Full pipeline command |
|
|
56
|
-
| `/design-playbook:ux-spec` | Spec-only command |
|
|
57
|
-
| `/design-playbook:ui-review` | Review command |
|
|
58
|
-
| `/design-playbook:run-review` | Cross-run review command |
|
|
59
|
-
|
|
60
|
-
Bare `/design-io` is **not** the installed name — always use the `design-playbook:` prefix.
|
|
61
|
-
|
|
62
|
-
## Install (pi)
|
|
63
|
-
|
|
64
|
-
Published to npm, listed in the [pi package gallery](https://pi.dev/packages).
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pi install npm:design-playbook
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
pi has no plugin namespace — skills are `/skill:<name>`, commands are bare `/<name>`:
|
|
71
|
-
|
|
72
|
-
| Invoke | Role |
|
|
73
|
-
| --- | --- |
|
|
74
|
-
| `/skill:design-playbook` | Orchestrator skill (model-invoked) |
|
|
75
|
-
| `/skill:ux-spec` … `/skill:ui-evaluator` | Same eight skills as above |
|
|
76
|
-
| `/design-io` · `/ux-spec` · `/ui-review` · `/run-review` | Pipeline / spec-only / review / cross-run commands |
|
|
77
|
-
|
|
78
|
-
pi ships no built-in MCP, so `preview*` and `observe*` skip by default (ADR-0009 absent→skip; the pipeline still runs spec → picker → fill → craft → accept). To enable both gates, install an MCP adapter and register the bundled servers in your project `.mcp.json`:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
pi install npm:pi-mcp-adapter
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"mcpServers": {
|
|
87
|
-
"design-playbook-preview": {
|
|
88
|
-
"command": "python",
|
|
89
|
-
"args": ["<pkg>/mcp/preview/server.py"],
|
|
90
|
-
"timeout": 3600000
|
|
91
|
-
},
|
|
92
|
-
"design-playbook-evidence": {
|
|
93
|
-
"command": "python",
|
|
94
|
-
"args": ["<pkg>/mcp/evidence/server.py"],
|
|
95
|
-
"env": { "DESIGN_PLAYBOOK_RUN_ROOT": "." },
|
|
96
|
-
"timeout": 3600000
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
`<pkg>` is the installed package root — `~/.pi/agent/npm/node_modules/design-playbook` for a user install, `.pi/npm/node_modules/design-playbook` for a project install. Evidence also needs `pip install playwright && playwright install chromium`.
|
|
103
|
-
|
|
104
|
-
## Stack with other skills
|
|
105
|
-
|
|
106
|
-
| Package | Use for |
|
|
107
|
-
| --- | --- |
|
|
108
|
-
| **design-playbook** | Baseline? → Reference? → Spec? → plan? → shell → optional preview* → fill → craft → optional observe* → evaluate / recirculate |
|
|
109
|
-
| ui-ux-pro-max | Style / palette / type search |
|
|
110
|
-
| frontend-design | Anti-template visual direction |
|
|
111
|
-
|
|
112
|
-
## Layout
|
|
113
|
-
|
|
114
|
-
```text
|
|
115
|
-
.claude-plugin/
|
|
116
|
-
plugin.json ← plugin manifest (the marketplace catalog lives at the repo root)
|
|
117
|
-
.mcp.json ← bundled MCP servers, launched via ${CLAUDE_PLUGIN_ROOT} (ADR-0009)
|
|
118
|
-
mcp/{preview,evidence}/← MCP adapter runtimes (preview_prototype / execute_capture_plan)
|
|
119
|
-
skills/<name>/SKILL.md ← model-invoked skills
|
|
120
|
-
commands/<name>.md ← slash commands (design-io, ux-spec, ui-review, run-review)
|
|
121
|
-
codex/AGENTS.md ← Codex bridge notes
|
|
122
|
-
examples/ ← self-authored onboarding samples
|
|
123
|
-
LICENSE · NOTICE ← authored-only scope
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## What ships
|
|
127
|
-
|
|
128
|
-
Only authored content in this package (skills, pipeline commands, metadata, self-written examples, self-authored bundled MCP adapters). See `NOTICE` and repo ADRs 0003–0006, 0009. Repo-maintainer polish commands live in the monorepo root `.claude/commands/`, not in this package.
|
|
129
|
-
|
|
130
|
-
## Contract vs enforcement
|
|
131
|
-
|
|
132
|
-
Evidence exists only to satisfy a declared criterion — an observation without a binding to an L6 acceptance item is telemetry, not evidence. Runtime capture is done by external providers; design-playbook owns the binding (manifest) and the verdict (ledger), never the runtime.
|
|
133
|
-
|
|
134
|
-
The Design I/O run is a **declared, host-neutral contract** over plain-Markdown artifacts (`DESIGN.md`, spec, decision report, point-back ledger). Any coding agent that emits that shape can be checked; Claude Code and Codex are adapters over the same artifacts. Generators and bridges remain optional; existing-product UI work must bind a valid/accepted project baseline or record an explicit waiver.
|
|
135
|
-
|
|
136
|
-
Run artifacts land under `.scratch/<run>/` (`design-baseline/`, `plan.md`, `preview/`, `evidence/manifest.jsonl`, `point-back.md`); see the orchestrator skill for what lands when. That is where to look — and manually intervene — when a run stalls.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
1
|
+
# design-playbook
|
|
2
|
+
|
|
3
|
+
Agent plugin: **Design I/O** for product UI (Claude Code / Codex).
|
|
4
|
+
|
|
5
|
+
Declarations + contracts — not a style CSV pack. Compose with [ui-ux-pro-max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) and Anthropic `frontend-design` for aesthetics; this package owns pipeline and acceptance.
|
|
6
|
+
|
|
7
|
+
## Install (Claude Code)
|
|
8
|
+
|
|
9
|
+
Path of record (published) - the marketplace catalog lives at the **repo root**, not in this package:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
/plugin marketplace add https://github.com/Bandersnatch0x/design-playbook.git
|
|
13
|
+
/plugin install design-playbook@design-playbook
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Local dev / self-test:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
claude --plugin-dir <abs-path>/packages/design-playbook # dev load, no install
|
|
20
|
+
# or local marketplace (point at the repo root, where the catalog lives)
|
|
21
|
+
/plugin marketplace add <abs-path-to-repo-root>
|
|
22
|
+
/plugin install design-playbook@design-playbook
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Install (Codex)
|
|
26
|
+
|
|
27
|
+
Same GitHub repo / monorepo root catalog. Codex-native manifest lives at `.codex-plugin/` (MCP uses relative paths).
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
codex plugin marketplace add Bandersnatch0x/design-playbook
|
|
31
|
+
codex plugin add design-playbook@design-playbook
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Local monorepo:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
codex plugin marketplace add <abs-path-to-repo-root>
|
|
38
|
+
codex plugin add design-playbook@design-playbook
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Details + skills-only fallback: [`codex/AGENTS.md`](codex/AGENTS.md).
|
|
42
|
+
|
|
43
|
+
After install, skills and commands are **namespaced** by the plugin name:
|
|
44
|
+
|
|
45
|
+
| Invoke | Role |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `/design-playbook:design-playbook` | Orchestrator skill (model-invoked) |
|
|
48
|
+
| `/design-playbook:design-baseline` | Discover/validate/draft the project `DESIGN.md` baseline |
|
|
49
|
+
| `/design-playbook:reference-intake` | Reference contract skill (screenshot/URL/analogy) |
|
|
50
|
+
| `/design-playbook:ux-spec` | Six-layer spec skill |
|
|
51
|
+
| `/design-playbook:ui-picker` | Shell + components skill |
|
|
52
|
+
| `/design-playbook:craft-guard` | Craft / anti-slop skill |
|
|
53
|
+
| `/design-playbook:native-craft` | Native-feel desktop declaration skill |
|
|
54
|
+
| `/design-playbook:ui-evaluator` | Point-back acceptance skill |
|
|
55
|
+
| `/design-playbook:design-io` | Full pipeline command |
|
|
56
|
+
| `/design-playbook:ux-spec` | Spec-only command |
|
|
57
|
+
| `/design-playbook:ui-review` | Review command |
|
|
58
|
+
| `/design-playbook:run-review` | Cross-run review command |
|
|
59
|
+
|
|
60
|
+
Bare `/design-io` is **not** the installed name — always use the `design-playbook:` prefix.
|
|
61
|
+
|
|
62
|
+
## Install (pi)
|
|
63
|
+
|
|
64
|
+
Published to npm, listed in the [pi package gallery](https://pi.dev/packages).
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pi install npm:design-playbook
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
pi has no plugin namespace — skills are `/skill:<name>`, commands are bare `/<name>`:
|
|
71
|
+
|
|
72
|
+
| Invoke | Role |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `/skill:design-playbook` | Orchestrator skill (model-invoked) |
|
|
75
|
+
| `/skill:ux-spec` … `/skill:ui-evaluator` | Same eight skills as above |
|
|
76
|
+
| `/design-io` · `/ux-spec` · `/ui-review` · `/run-review` | Pipeline / spec-only / review / cross-run commands |
|
|
77
|
+
|
|
78
|
+
pi ships no built-in MCP, so `preview*` and `observe*` skip by default (ADR-0009 absent→skip; the pipeline still runs spec → picker → fill → craft → accept). To enable both gates, install an MCP adapter and register the bundled servers in your project `.mcp.json`:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pi install npm:pi-mcp-adapter
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"mcpServers": {
|
|
87
|
+
"design-playbook-preview": {
|
|
88
|
+
"command": "python",
|
|
89
|
+
"args": ["<pkg>/mcp/preview/server.py"],
|
|
90
|
+
"timeout": 3600000
|
|
91
|
+
},
|
|
92
|
+
"design-playbook-evidence": {
|
|
93
|
+
"command": "python",
|
|
94
|
+
"args": ["<pkg>/mcp/evidence/server.py"],
|
|
95
|
+
"env": { "DESIGN_PLAYBOOK_RUN_ROOT": "." },
|
|
96
|
+
"timeout": 3600000
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`<pkg>` is the installed package root — `~/.pi/agent/npm/node_modules/design-playbook` for a user install, `.pi/npm/node_modules/design-playbook` for a project install. Evidence also needs `pip install playwright && playwright install chromium`.
|
|
103
|
+
|
|
104
|
+
## Stack with other skills
|
|
105
|
+
|
|
106
|
+
| Package | Use for |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| **design-playbook** | Baseline? → Reference? → Spec? → plan? → shell → optional preview* → fill → craft → optional observe* → evaluate / recirculate |
|
|
109
|
+
| ui-ux-pro-max | Style / palette / type search |
|
|
110
|
+
| frontend-design | Anti-template visual direction |
|
|
111
|
+
|
|
112
|
+
## Layout
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
.claude-plugin/
|
|
116
|
+
plugin.json ← plugin manifest (the marketplace catalog lives at the repo root)
|
|
117
|
+
.mcp.json ← bundled MCP servers, launched via ${CLAUDE_PLUGIN_ROOT} (ADR-0009)
|
|
118
|
+
mcp/{preview,evidence}/← MCP adapter runtimes (preview_prototype / execute_capture_plan)
|
|
119
|
+
skills/<name>/SKILL.md ← model-invoked skills
|
|
120
|
+
commands/<name>.md ← slash commands (design-io, ux-spec, ui-review, run-review)
|
|
121
|
+
codex/AGENTS.md ← Codex bridge notes
|
|
122
|
+
examples/ ← self-authored onboarding samples
|
|
123
|
+
LICENSE · NOTICE ← authored-only scope
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## What ships
|
|
127
|
+
|
|
128
|
+
Only authored content in this package (skills, pipeline commands, metadata, self-written examples, self-authored bundled MCP adapters). See `NOTICE` and repo ADRs 0003–0006, 0009. Repo-maintainer polish commands live in the monorepo root `.claude/commands/`, not in this package.
|
|
129
|
+
|
|
130
|
+
## Contract vs enforcement
|
|
131
|
+
|
|
132
|
+
Evidence exists only to satisfy a declared criterion — an observation without a binding to an L6 acceptance item is telemetry, not evidence. Runtime capture is done by external providers; design-playbook owns the binding (manifest) and the verdict (ledger), never the runtime.
|
|
133
|
+
|
|
134
|
+
The Design I/O run is a **declared, host-neutral contract** over plain-Markdown artifacts (`DESIGN.md`, spec, decision report, point-back ledger). Any coding agent that emits that shape can be checked; Claude Code and Codex are adapters over the same artifacts. Generators and bridges remain optional; existing-product UI work must bind a valid/accepted project baseline or record an explicit waiver.
|
|
135
|
+
|
|
136
|
+
Run artifacts land under `.scratch/<run>/` (`design-baseline/`, `plan.md`, `preview/`, `evidence/manifest.jsonl`, `point-back.md`); see the orchestrator skill for what lands when. That is where to look — and manually intervene — when a run stalls.
|
|
137
|
+
|
|
138
|
+
### Stuck / resume
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
python <pkg>/scripts/run_status.py .scratch/<run> # text phases + next action
|
|
142
|
+
python <pkg>/scripts/run_status.py .scratch/<run> --json # machine-readable
|
|
143
|
+
python <pkg>/scripts/run_status.py --list # newest runs under .scratch/
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The status command reuses the packaged validator’s G5 confirm rules. It is part of the installed package — not monorepo-only tooling.
|
|
147
|
+
|
|
148
|
+
### Doctor
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
python <pkg>/scripts/doctor.py
|
|
152
|
+
python <pkg>/scripts/doctor.py --json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
One packaged diagnosis for interpreter, package surface, optional Playwright, and run-root configuration. Distinguishes `ok` / `degraded` / `broken` with repair actions.
|
|
156
|
+
|
|
157
|
+
**Bundled MCP (v0.3+):** Preview (`mcp/preview/`) and Evidence (`mcp/evidence/`) runtimes ship inside this package and are registered by `.mcp.json` (`${CLAUDE_PLUGIN_ROOT}`). Sibling monorepo dirs remain compatibility launchers/docs. The orchestrator still **probes** MCP `tools/list` and skips `preview*` / `observe*` when tools are absent. Evidence provider writes artifacts only — never the manifest. **`DESIGN_PLAYBOOK_RUN_ROOT`:** default `"."` in `.mcp.json` is the **MCP process cwd**, not the chat workspace — for a host-app dogfood, set an **absolute** path to `.scratch/<run>/` (see [`mcp/evidence/README.md`](mcp/evidence/README.md)). Capture responses include `written_path` (absolute) so mis-rooted writes are visible without a filesystem search.
|
|
158
|
+
|
|
159
|
+
What is **deterministically enforced** today: repository install/structure CI checks and the run-artifact shape (`scripts/validate_run.py` — L1–L6 present; every top-level L6 item ordered `Given -> When -> Then`; one non-empty four-field evidence ledger row per `L6.<n>` with allowed results; four non-empty finding fields with non-empty source; exactly one explicit `## Verdict` of `Pass` or `Recirculate`; Pass requires every evidence result to be `pass` and exactly one issue-linked `0 blocking` closure per blocking finding; exit 0/`RUN OK`, exit 1/`RUN INVALID`, exit 2/`RUN ERROR`; regression-tested by `tests/test_validate_run.py`, which also validates the showcase artifacts directly; **G5** is a *conditional* preview-confirm gate — enforced only when preview artifacts exist / `--preview-dir` is used; **G6** is a *conditional* evidence-binding gate — enforced only when a ledger `observed` references an `evidence/` artifact / `--evidence-dir` is used; opt-in **strict mode** via `--require-preview` / `--require-evidence` / `--strict`). The `observe*` step probes MCP tool `execute_capture_plan` and is skipped when absent. Everything else in the pipeline is agent-executed craft judgment, not a machine gate.
|
|
160
|
+
|
|
161
|
+
## Codex
|
|
162
|
+
|
|
163
|
+
See `codex/AGENTS.md`.
|
package/codex/AGENTS.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# design-playbook for Codex
|
|
2
|
+
|
|
3
|
+
## Install (path of record)
|
|
4
|
+
|
|
5
|
+
Marketplace catalog lives at the **repo root** (same GitHub repo as Claude Code).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# published
|
|
9
|
+
codex plugin marketplace add Bandersnatch0x/design-playbook
|
|
10
|
+
codex plugin add design-playbook@design-playbook
|
|
11
|
+
|
|
12
|
+
# local monorepo (dev)
|
|
13
|
+
codex plugin marketplace add <abs-path-to-repo-root>
|
|
14
|
+
codex plugin add design-playbook@design-playbook
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Verify:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
codex plugin list -m design-playbook --available --json
|
|
21
|
+
# expect: design-playbook@design-playbook, enabled=true after add
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Codex-native manifest: `packages/design-playbook/.codex-plugin/plugin.json`
|
|
25
|
+
Codex MCP (relative paths, no `CLAUDE_PLUGIN_ROOT`): `.codex-plugin/mcp.json`
|
|
26
|
+
Skills: `packages/design-playbook/skills/*`
|
|
27
|
+
|
|
28
|
+
## Fallback: skills-only install
|
|
29
|
+
|
|
30
|
+
If you only want skills under `~/.codex/skills` (no plugin marketplace):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# from repo root — copies/symlinks skill trees into ~/.codex/skills
|
|
34
|
+
python packages/design-playbook/codex/install_skills.py --force
|
|
35
|
+
# or @-reference a single skill:
|
|
36
|
+
# @packages/design-playbook/skills/design-playbook/SKILL.md
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Manual MCP (only if not using `codex plugin add`):
|
|
40
|
+
|
|
41
|
+
```toml
|
|
42
|
+
# ~/.codex/config.toml
|
|
43
|
+
[mcp_servers.design-playbook-preview]
|
|
44
|
+
command = "python"
|
|
45
|
+
args = ["<abs>/packages/design-playbook/mcp/preview/server.py"]
|
|
46
|
+
|
|
47
|
+
[mcp_servers.design-playbook-evidence]
|
|
48
|
+
command = "python"
|
|
49
|
+
args = ["<abs>/packages/design-playbook/mcp/evidence/server.py"]
|
|
50
|
+
# evidence also needs: pip install playwright && playwright install chromium
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Load order
|
|
54
|
+
|
|
55
|
+
1. `skills/design-playbook/SKILL.md`
|
|
56
|
+
2. Standard order: `design-baseline?` → `ux-spec` → `ui-picker` → `fill` → `craft-guard` → `ui-evaluator`.
|
|
57
|
+
|
|
58
|
+
Native desktop order: `ux-spec` → `native-craft` → `ui-picker` → `fill` → `craft-guard` → `ui-evaluator`.
|
|
59
|
+
|
|
60
|
+
Conditional entry `reference-intake?` (screenshot/URL/design/product analogy, ADR-0011) runs **before** `ux-spec?` when reference materials are present — fixed orchestrator order, not reorderable. Run `native-craft` only for an explicit native-desktop/native-feel target. Web and mobile Web skip `native-craft`; if the platform is unclear, ask before choosing the order. The orchestrator owns the decision gate, render-surface seam handoff, and fail-closed behavior.
|
|
61
|
+
|
|
62
|
+
Conditional entry `design-baseline?` (ADR-0012) runs before `reference-intake?` for UI builds/fixes in repositories with meaningful existing first-party UI. Existing-product Fill requires a valid existing baseline, an accepted generated baseline, or an explicit user waiver.
|
|
63
|
+
|
|
64
|
+
Mirror the orchestrator's skip narration (SKILL.md Steps preamble): when a step is skipped, output one line — step name + reason + how to enable, with the gate label when one applies, e.g. `-> preview*: adapter absent, skipped (G5 not triggered; enable via packages/design-playbook/mcp/preview/ or host MCP)`.
|
|
65
|
+
|
|
66
|
+
## Compose
|
|
67
|
+
|
|
68
|
+
- Style DB → ui-ux-pro-max
|
|
69
|
+
- Visual risk → frontend-design
|
|
70
|
+
- Pipeline + acceptance → design-playbook
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Cross-platform Codex skill installer for design-playbook.
|
|
3
|
+
|
|
4
|
+
Creates (or refreshes) symlinks under ``~/.codex/skills/<name>`` pointing at
|
|
5
|
+
this package's ``skills/*`` directories. Falls back to directory copy when
|
|
6
|
+
symlinks are unavailable (common on Windows without Developer Mode).
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import argparse
|
|
11
|
+
import os
|
|
12
|
+
import shutil
|
|
13
|
+
import sys
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
PACKAGE = Path(__file__).resolve().parents[1]
|
|
17
|
+
SKILLS_SRC = PACKAGE / "skills"
|
|
18
|
+
DEFAULT_DEST = Path.home() / ".codex" / "skills"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def install_one(src: Path, dest: Path, *, force: bool) -> str:
|
|
22
|
+
if not src.is_dir():
|
|
23
|
+
return f"skip {src.name}: source missing"
|
|
24
|
+
if dest.exists() or dest.is_symlink():
|
|
25
|
+
if not force:
|
|
26
|
+
return f"skip {src.name}: {dest} exists (pass --force)"
|
|
27
|
+
if dest.is_symlink() or dest.is_file():
|
|
28
|
+
dest.unlink()
|
|
29
|
+
else:
|
|
30
|
+
shutil.rmtree(dest)
|
|
31
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
32
|
+
try:
|
|
33
|
+
os.symlink(src, dest, target_is_directory=True)
|
|
34
|
+
return f"link {src.name} -> {dest}"
|
|
35
|
+
except OSError:
|
|
36
|
+
shutil.copytree(src, dest)
|
|
37
|
+
return f"copy {src.name} -> {dest}"
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def main(argv: list[str] | None = None) -> int:
|
|
41
|
+
parser = argparse.ArgumentParser(description="Install design-playbook skills for Codex")
|
|
42
|
+
parser.add_argument(
|
|
43
|
+
"--dest",
|
|
44
|
+
type=Path,
|
|
45
|
+
default=DEFAULT_DEST,
|
|
46
|
+
help=f"skills directory (default: {DEFAULT_DEST})",
|
|
47
|
+
)
|
|
48
|
+
parser.add_argument(
|
|
49
|
+
"--force",
|
|
50
|
+
action="store_true",
|
|
51
|
+
help="replace existing skill directories/links",
|
|
52
|
+
)
|
|
53
|
+
args = parser.parse_args(argv)
|
|
54
|
+
|
|
55
|
+
if not SKILLS_SRC.is_dir():
|
|
56
|
+
print(f"skills source missing: {SKILLS_SRC}", file=sys.stderr)
|
|
57
|
+
return 2
|
|
58
|
+
|
|
59
|
+
print(f"source: {SKILLS_SRC}")
|
|
60
|
+
print(f"dest: {args.dest}")
|
|
61
|
+
for skill in sorted(p for p in SKILLS_SRC.iterdir() if p.is_dir()):
|
|
62
|
+
print(" ", install_one(skill, args.dest / skill.name, force=args.force))
|
|
63
|
+
print("done. Load design-playbook via Codex skills or @ references.")
|
|
64
|
+
print("MCP: see packages/design-playbook/codex/AGENTS.md")
|
|
65
|
+
return 0
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if __name__ == "__main__":
|
|
69
|
+
sys.exit(main())
|
package/commands/design-io.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run Design I/O end-to-end (reference-intake? → spec? → plan? → shell → preview* → fill → craft → accept)
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Run skill **design-playbook** in full. Honor each step’s completion criterion before the next. Recirculate blocking evaluator findings to the owning declaration. Entry routing and plan/preview orchestration live in that skill (not here).
|
|
6
|
-
|
|
7
|
-
User request:
|
|
8
|
-
$ARGUMENTS
|
|
1
|
+
---
|
|
2
|
+
description: Run Design I/O end-to-end (reference-intake? → spec? → plan? → shell → preview* → fill → craft → accept)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Run skill **design-playbook** in full. Honor each step’s completion criterion before the next. Recirculate blocking evaluator findings to the owning declaration. Entry routing and plan/preview orchestration live in that skill (not here).
|
|
6
|
+
|
|
7
|
+
User request:
|
|
8
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Diagnose installed design-playbook capability and repairs
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# doctor
|
|
6
|
+
|
|
7
|
+
One packaged diagnosis entry for install/runtime capability.
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
python <plugin>/scripts/doctor.py
|
|
11
|
+
python <plugin>/scripts/doctor.py --json
|
|
12
|
+
python <plugin>/scripts/doctor.py --run-root .scratch/<run>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Reports `ok` / `degraded` / `broken`. Failed checks include a concrete repair. Optional adapters (Playwright, run-root env) degrade rather than hard-fail the install.
|