gm-cc 2.0.505 → 2.0.507
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/.claude-plugin/marketplace.json +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/pages/SKILL.md +258 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "AnEntrypoint"
|
|
5
5
|
},
|
|
6
6
|
"description": "State machine agent with hooks, skills, and automated git enforcement",
|
|
7
|
-
"version": "2.0.
|
|
7
|
+
"version": "2.0.507",
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "State machine agent with hooks, skills, and automated git enforcement"
|
|
10
10
|
},
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pages
|
|
3
|
+
description: Scaffold and maintain a GitHub Pages site. Buildless in browser (webjsx + rippleui via CDN), flatspace for content aggregation built during GH Actions. Use when user wants to create or update a GH Pages site.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pages — GitHub Pages Site Scaffolder
|
|
7
|
+
|
|
8
|
+
Scaffold a complete GH Pages site: **no local build step**, content managed via flatspace flat-file CMS, UI via webjsx + rippleui CDN, GH Actions builds and deploys.
|
|
9
|
+
|
|
10
|
+
**Follow full gm skill chain: planning → gm-execute → gm-emit → gm-complete → update-docs.**
|
|
11
|
+
|
|
12
|
+
## Stack
|
|
13
|
+
|
|
14
|
+
| Layer | Tool | How |
|
|
15
|
+
|-------|------|-----|
|
|
16
|
+
| UI rendering | [webjsx](https://webjsx.org) | ES module via importmap, `applyDiff` for DOM updates |
|
|
17
|
+
| Styling | [rippleui](https://ripple-ui.com) | CDN `<link>` — Tailwind-based component classes |
|
|
18
|
+
| Content CMS | [flatspace](https://npmjs.com/package/flatspace) | Aggregates `content/` → `docs/data/*.json` at build time |
|
|
19
|
+
| Build | GH Actions | `npx flatspace` runs in CI, commits output to `docs/` |
|
|
20
|
+
| Hosting | GitHub Pages | Source: `docs/` branch, or GH Actions deploy |
|
|
21
|
+
|
|
22
|
+
## Directory Layout
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
<project>/
|
|
26
|
+
content/ # Source content (markdown, json, yaml)
|
|
27
|
+
pages/ # Static pages (index.md, about.md, ...)
|
|
28
|
+
posts/ # Blog posts or articles
|
|
29
|
+
data/ # Structured data files
|
|
30
|
+
docs/ # GH Pages root (gitignored build output except index.html)
|
|
31
|
+
index.html # Entry point — committed, never regenerated
|
|
32
|
+
app.js # Main webjsx app — committed
|
|
33
|
+
data/ # flatspace output — gitignored, built by CI
|
|
34
|
+
.github/
|
|
35
|
+
workflows/
|
|
36
|
+
pages.yml # Build + deploy workflow
|
|
37
|
+
flatspace.config.js # flatspace aggregation config
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## index.html — Buildless Entry
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<!DOCTYPE html>
|
|
44
|
+
<html lang="en">
|
|
45
|
+
<head>
|
|
46
|
+
<meta charset="UTF-8">
|
|
47
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
48
|
+
<title>{{SITE_TITLE}}</title>
|
|
49
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/rippleui@1.12.1/dist/css/styles.css">
|
|
50
|
+
<script type="importmap">
|
|
51
|
+
{
|
|
52
|
+
"imports": {
|
|
53
|
+
"webjsx": "https://cdn.jsdelivr.net/npm/webjsx@0.0.42/dist/index.js",
|
|
54
|
+
"webjsx/jsx-runtime": "https://cdn.jsdelivr.net/npm/webjsx@0.0.42/dist/jsx-runtime.js"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
58
|
+
<script type="module" src="./app.js"></script>
|
|
59
|
+
</head>
|
|
60
|
+
<body class="bg-backgroundPrimary text-content1 min-h-screen">
|
|
61
|
+
<div id="root"></div>
|
|
62
|
+
</body>
|
|
63
|
+
</html>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## app.js — webjsx App Pattern
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
import { applyDiff } from 'webjsx';
|
|
70
|
+
|
|
71
|
+
const h = (tag, props, ...children) => ({ tag, props: props || {}, children });
|
|
72
|
+
|
|
73
|
+
const state = { page: null, data: {} };
|
|
74
|
+
|
|
75
|
+
async function loadData(path) {
|
|
76
|
+
const res = await fetch(path);
|
|
77
|
+
return res.json();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function render() {
|
|
81
|
+
applyDiff(document.getElementById('root'), App(state));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function App(s) {
|
|
85
|
+
if (!s.page) return h('div', { class: 'flex justify-center p-8' },
|
|
86
|
+
h('span', { class: 'spinner' })
|
|
87
|
+
);
|
|
88
|
+
return h('div', { class: 'max-w-4xl mx-auto p-4' },
|
|
89
|
+
h('nav', { class: 'navbar bg-backgroundSecondary mb-6' },
|
|
90
|
+
h('span', { class: 'navbar-brand text-xl font-bold' }, s.page.title)
|
|
91
|
+
),
|
|
92
|
+
h('main', {}, ...s.page.sections.map(Section))
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function Section(section) {
|
|
97
|
+
return h('section', { class: 'card mb-4 p-6' },
|
|
98
|
+
h('h2', { class: 'text-2xl font-bold mb-2' }, section.title),
|
|
99
|
+
h('p', { class: 'text-content2' }, section.body)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async function main() {
|
|
104
|
+
state.page = await loadData('./data/index.json');
|
|
105
|
+
render();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
main();
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## flatspace.config.js
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
module.exports = {
|
|
115
|
+
input: './content',
|
|
116
|
+
output: './docs/data',
|
|
117
|
+
collections: {
|
|
118
|
+
pages: { dir: 'pages', format: 'markdown' },
|
|
119
|
+
posts: { dir: 'posts', format: 'markdown', sortBy: 'date', order: 'desc' },
|
|
120
|
+
data: { dir: 'data', format: 'json' }
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## GH Actions Workflow — pages.yml
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
name: Deploy GitHub Pages
|
|
129
|
+
|
|
130
|
+
on:
|
|
131
|
+
push:
|
|
132
|
+
branches: [main]
|
|
133
|
+
workflow_dispatch:
|
|
134
|
+
|
|
135
|
+
permissions:
|
|
136
|
+
contents: write
|
|
137
|
+
pages: write
|
|
138
|
+
id-token: write
|
|
139
|
+
|
|
140
|
+
jobs:
|
|
141
|
+
build:
|
|
142
|
+
runs-on: ubuntu-latest
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@v4
|
|
145
|
+
|
|
146
|
+
- uses: actions/setup-node@v4
|
|
147
|
+
with:
|
|
148
|
+
node-version: '20'
|
|
149
|
+
|
|
150
|
+
- name: Build content with flatspace
|
|
151
|
+
run: npx flatspace
|
|
152
|
+
|
|
153
|
+
- name: Commit built data
|
|
154
|
+
run: |
|
|
155
|
+
git config user.name "github-actions[bot]"
|
|
156
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
157
|
+
git add docs/data/
|
|
158
|
+
git diff --staged --quiet || git commit -m "chore: build content [skip ci]"
|
|
159
|
+
git push
|
|
160
|
+
|
|
161
|
+
- name: Upload Pages artifact
|
|
162
|
+
uses: actions/upload-pages-artifact@v3
|
|
163
|
+
with:
|
|
164
|
+
path: docs/
|
|
165
|
+
|
|
166
|
+
deploy:
|
|
167
|
+
needs: build
|
|
168
|
+
runs-on: ubuntu-latest
|
|
169
|
+
environment:
|
|
170
|
+
name: github-pages
|
|
171
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
172
|
+
steps:
|
|
173
|
+
- id: deployment
|
|
174
|
+
uses: actions/deploy-pages@v4
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Scaffolding Steps
|
|
178
|
+
|
|
179
|
+
When user says "set up pages" or "create GH pages site":
|
|
180
|
+
|
|
181
|
+
1. **Read** existing `docs/` and `content/` if present — never clobber existing content
|
|
182
|
+
2. **Create** directory structure above
|
|
183
|
+
3. **Write** `docs/index.html` with correct site title
|
|
184
|
+
4. **Write** `docs/app.js` with webjsx app skeleton
|
|
185
|
+
5. **Write** `flatspace.config.js`
|
|
186
|
+
6. **Write** `.github/workflows/pages.yml`
|
|
187
|
+
7. **Write** `content/pages/index.md` with minimal frontmatter (`title`, `sections` array)
|
|
188
|
+
8. **Add** `docs/data/` to `.gitignore` (built by CI, not committed by humans)
|
|
189
|
+
9. **Verify** GH Pages setting is "GitHub Actions" in repo Settings — remind user if can't verify
|
|
190
|
+
|
|
191
|
+
## rippleui Component Classes Quick Reference
|
|
192
|
+
|
|
193
|
+
Use these directly in JSX className strings — no config needed:
|
|
194
|
+
|
|
195
|
+
| Component | Class |
|
|
196
|
+
|-----------|-------|
|
|
197
|
+
| Button | `btn btn-primary`, `btn btn-secondary`, `btn btn-ghost` |
|
|
198
|
+
| Card | `card p-4` |
|
|
199
|
+
| Input | `input input-primary` |
|
|
200
|
+
| Navbar | `navbar` + `navbar-brand` |
|
|
201
|
+
| Badge | `badge badge-primary` |
|
|
202
|
+
| Alert | `alert alert-success`, `alert alert-error` |
|
|
203
|
+
| Spinner | `spinner` |
|
|
204
|
+
| Divider | `divider` |
|
|
205
|
+
|
|
206
|
+
Background: `bg-backgroundPrimary`, `bg-backgroundSecondary`. Text: `text-content1`, `text-content2`.
|
|
207
|
+
|
|
208
|
+
**CSS variable warning**: rippleui color vars (e.g. `--gray-2`) are raw space-separated RGB tuples — not valid CSS colors. Never use them in `rgb()` directly from JS. Use the component classes instead.
|
|
209
|
+
|
|
210
|
+
## webjsx Patterns
|
|
211
|
+
|
|
212
|
+
**No JSX transpile needed** — use `h()` factory or import from CDN with importmap and write JSX in `.jsx` files served directly (Chrome supports importmap natively).
|
|
213
|
+
|
|
214
|
+
For `.js` files without transpile, use the `h` factory pattern shown above.
|
|
215
|
+
|
|
216
|
+
For `.jsx` with native importmap (no build):
|
|
217
|
+
```js
|
|
218
|
+
/** @jsxImportSource webjsx */
|
|
219
|
+
import { applyDiff } from 'webjsx';
|
|
220
|
+
```
|
|
221
|
+
Only works if server sets correct MIME type for `.jsx` — GH Pages does not. Use `.js` + `h()` factory.
|
|
222
|
+
|
|
223
|
+
**applyDiff signature**: `applyDiff(domNode, vnodeOrArray)` — never pass a string, always pass a vnode from `h()`.
|
|
224
|
+
|
|
225
|
+
**State updates**: mutate `state`, call `render()` — no reactive system, explicit re-render on every change.
|
|
226
|
+
|
|
227
|
+
## Content Format (flatspace input)
|
|
228
|
+
|
|
229
|
+
Markdown with YAML frontmatter:
|
|
230
|
+
```markdown
|
|
231
|
+
---
|
|
232
|
+
title: Home
|
|
233
|
+
sections:
|
|
234
|
+
- title: Welcome
|
|
235
|
+
body: Hello world
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
# Home
|
|
239
|
+
|
|
240
|
+
Full markdown body here.
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
flatspace outputs `docs/data/pages/index.json`:
|
|
244
|
+
```json
|
|
245
|
+
{ "title": "Home", "sections": [...], "body": "<p>Full markdown body here.</p>", "slug": "index" }
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Known Gotchas
|
|
249
|
+
|
|
250
|
+
**GH Pages must be set to "GitHub Actions"** in Settings → Pages. "Deploy from branch" ignores the deploy-pages action entirely.
|
|
251
|
+
|
|
252
|
+
**docs/data/ must be in .gitignore** but `docs/index.html` and `docs/app.js` must NOT be ignored — they are the committed source files.
|
|
253
|
+
|
|
254
|
+
**flatspace npx cold start**: first CI run downloads flatspace — takes ~10s extra. Subsequent runs use cache if `actions/setup-node` cache is configured.
|
|
255
|
+
|
|
256
|
+
**importmap browser support**: all modern browsers support importmap. No IE, no Safari < 16.4. For GH Pages this is fine.
|
|
257
|
+
|
|
258
|
+
**webjsx CDN version**: pin to explicit version in importmap (e.g. `@0.0.42`) — avoid `@latest` to prevent silent breakage on upstream updates.
|