Skip to content

Commit 6dd272f

Browse files
author
Jacques de Vos
committed
Add integrated article testing skill.
1 parent 4438201 commit 6dd272f

3 files changed

Lines changed: 131 additions & 63 deletions

File tree

.agents/skills/publish-article/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
name: publish-blog
2+
name: publish-article
33
description: >-
44
Wires supplied content into a Jekyll post (_posts file, front matter, assets,
55
optional includes) and previews it locally. Use when publishing or updating
66
post packaging — not when writing the article or talk content itself.
77
---
88

9-
# Publish Blog
9+
# Publish Article
1010

1111
Wire supplied content into the site and verify it. Packaging only — do not invent the piece.
1212

1313
Canonical example: `_posts/2017-03-10-we-are-all-product-designers.md`
1414

15-
If the server is not running, use `setup-dev-environment` first.
15+
Use `test-article` for the local build, preview, screenshots, and article review.
1616

1717
## Checklist
1818

@@ -75,4 +75,4 @@ Excerpt on the homepage = first ~30 words of content (unless `excerpt_separator`
7575

7676
## Verify
7777

78-
Confirm the build succeeds, open the post URL and the homepage card, optionally refresh `.screenshots/`. Summarize what was wired; do not commit unless asked.
78+
Hand off to `test-article` for full local verification. Summarize what was wired; do not commit unless asked.

.agents/skills/setup-dev-environment/SKILL.md

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
name: test-article
3+
description: >-
4+
Sets up and runs the local Jekyll site, tests a blog article on its catalogue
5+
overview and post page at desktop and mobile sizes, captures screenshots, and
6+
performs a fresh editorial review. Use after writing or packaging an article,
7+
or when the user asks to run, preview, test, or review a post locally.
8+
---
9+
10+
# Test Article
11+
12+
Build the site, test one article in context, and report technical, visual, and editorial findings. Publishing remains a separate workflow.
13+
14+
Canonical example: `_posts/2017-03-10-we-are-all-product-designers.md`.
15+
16+
## Checklist
17+
18+
```text
19+
- [ ] Identify the target post and expected URL
20+
- [ ] Install the build dependencies if needed
21+
- [ ] Build successfully and start or reuse the local server
22+
- [ ] Verify the overview card and article page
23+
- [ ] Capture and inspect desktop and mobile screenshots of both
24+
- [ ] Review the complete article afresh
25+
- [ ] Report findings and screenshot paths
26+
```
27+
28+
## 1. Identify the article
29+
30+
Use the post the user names. Otherwise, use the post created or edited in the current work; if that is ambiguous, ask.
31+
32+
Read its front matter, body, referenced includes, and assets. Derive the URL using `_config.yml`; do not assume the filename slug is the permalink when the title controls it. Determine which paginated catalogue page contains the post after building.
33+
34+
Before running commands, preserve the user's work. Do not pull, reset, clean, publish, commit, or rewrite the article as part of testing.
35+
36+
## 2. Set up and build
37+
38+
Run `bundle install` when dependencies are missing or stale. If Bundler rejects the lockfile's `BUNDLED WITH` version, update only that line to the installed Bundler version and retry.
39+
40+
Build once before serving so compilation failures are explicit:
41+
42+
```bash
43+
RUBYOPT="-r$(pwd)/_plugins/taint_compat.rb" bundle exec jekyll build
44+
```
45+
46+
Ruby 3.4 removed `tainted?`, which Liquid still calls. Expect `[taint_compat] Applied to Object`.
47+
48+
Reuse a healthy server on port 4000. Otherwise start:
49+
50+
```bash
51+
RUBYOPT="-r$(pwd)/_plugins/taint_compat.rb" bundle exec jekyll serve \
52+
--host 127.0.0.1 --port 4000 --livereload
53+
```
54+
55+
Confirm the catalogue URL and article URL return HTTP 200. Treat build warnings, Liquid errors, missing includes, and failed local asset requests as findings.
56+
57+
## 3. Test the catalogue overview
58+
59+
Verify the target card, not merely the page:
60+
61+
- title, date, context, and excerpt are correct and readable
62+
- the card links to the expected article URL
63+
- the catalogue image loads, has the intended crop/aspect ratio, and does not distort or break the layout
64+
- spacing, alignment, and neighbouring cards remain sound
65+
- no text or image overflows at desktop or mobile width
66+
67+
If the post is not on the first catalogue page, test the page where it actually appears.
68+
69+
## 4. Test the article page
70+
71+
Verify:
72+
73+
- title, date, context, headings, paragraphs, lists, links, code, embeds, and includes render correctly
74+
- every expected image loads, is correctly sized and positioned, has useful alt text, and behaves at both viewport sizes
75+
- the catalogue image or article hero appears on the article page if the site's intended layout calls for it
76+
- navigation and previous/next links work
77+
- there is no clipping, horizontal scrolling, overlap, or unreadably small content
78+
79+
Do not silently compensate for a layout defect. Record a missing image or unsupported template behaviour clearly.
80+
81+
## 5. Capture and inspect screenshots
82+
83+
Write screenshots under `.screenshots/test-article/<post-slug>/` using stable names:
84+
85+
```text
86+
overview-desktop.png
87+
overview-mobile.png
88+
article-desktop.png
89+
article-mobile.png
90+
```
91+
92+
Use a 1440×900 desktop viewport and a 390×844 mobile viewport. With local Chrome, for example:
93+
94+
```bash
95+
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
96+
"$CHROME" --headless=new --disable-gpu --hide-scrollbars \
97+
--window-size=1440,900 --screenshot="<output.png>" "<local-url>"
98+
```
99+
100+
Repeat for each URL and viewport. Read all four PNGs and inspect them visually; creating files alone is not verification. Capture additional focused screenshots when an important section falls below the initial viewport.
101+
102+
## 6. Review the article afresh
103+
104+
Only after the technical and visual checks pass far enough to read the article reliably, review the complete piece without relying on prior approvals.
105+
106+
Check:
107+
108+
- the title, opening, argument, examples, transitions, and conclusion form a coherent whole
109+
- claims are accurate, appropriately qualified, and supported; verify time-sensitive or external claims when needed
110+
- repetition, gaps, contradictions, unclear references, awkward phrasing, grammar, and typos
111+
- links, captions, image relevance, alt text, and front matter
112+
- the overview excerpt represents the article well and is not polluted by include markup or hidden content
113+
114+
Separate objective defects from optional editorial suggestions. Do not edit approved prose or templates without the user's approval.
115+
116+
## 7. Report
117+
118+
Lead with whether the build and local preview passed. Then provide:
119+
120+
1. blocking defects
121+
2. visual/layout findings
122+
3. editorial findings
123+
4. checks that passed
124+
5. local article and catalogue URLs
125+
6. screenshot paths
126+
127+
For each defect, name the affected viewport/page and give a concrete proposed fix. If there are no findings in a category, say so briefly.

0 commit comments

Comments
 (0)