Skip to content

Commit 73c594b

Browse files
committed
feat(article): add agentic workflows article
1 parent 06db044 commit 73c594b

5 files changed

Lines changed: 199 additions & 93 deletions

File tree

.github/prompts/new-article.prompt.md

Lines changed: 0 additions & 93 deletions
This file was deleted.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
name: new-article
3+
description: "Initialize a new blog article for TechWatching.dev with sequential numbering, frontmatter, and placeholder content. Use when creating a new blog post, starting a new article, scaffolding a post, or adding content to the blog."
4+
argument-hint: "topic or title for the new article"
5+
---
6+
7+
# New Blog Article
8+
9+
Initialize a new blog article for TechWatching.dev with correct frontmatter and placeholder content.
10+
11+
## When to Use
12+
13+
- Creating a new blog post / article
14+
- Scaffolding a post with frontmatter and placeholder sections
15+
- Starting content for TechWatching.dev
16+
17+
## Procedure
18+
19+
### 1. Determine the next article number
20+
21+
Check the files in `content/1.posts/` directory. Find the highest numeric prefix and increment by 1 to get the next article number.
22+
23+
### 2. Create the article file
24+
25+
Use the naming convention: `{number}.{slug}.md` inside `content/1.posts/`.
26+
27+
- The slug should be lowercase, hyphen-separated, and derived from the topic/title.
28+
- Example: `79.my-new-topic.md`
29+
30+
### 3. Choose the badge category
31+
32+
Pick the `badge.label` based on the topic:
33+
34+
| Category | When to use |
35+
|----------|-------------|
36+
| `Tooling` | Tools, extensions, CLI utilities, developer productivity |
37+
| `DevOps` | CI/CD, infrastructure, cloud platforms, deployment |
38+
| `Development` | Programming concepts, frameworks, coding practices |
39+
| `Essay` | Thoughts, retrospectives, career advice, learning |
40+
| `Tips` | Weekly tips posts |
41+
42+
### 4. Choose tags
43+
44+
Tags should be relevant to the content. Follow these casing rules:
45+
46+
- **Proper casing for technologies**: `.NET`, `ASP.NET Core`, `Nuxt`, `Vue.js`, `TypeScript`, `OpenTelemetry`
47+
- **Lowercase for concepts**: `tooling`, `learning`, `thoughts`, `devops`, `api`
48+
- **Weekly tips**: always include `tips learned this week` tag
49+
50+
### 5. Fill in frontmatter fields
51+
52+
| Field | Required | Notes |
53+
|-------|----------|-------|
54+
| `title` | Yes | Use quotes for titles with colons or special characters |
55+
| `description` | Yes | Brief summary (can use quotes) |
56+
| `date` | Yes | Today's date in `YYYY-MM-DD` format |
57+
| `image.src` | Yes | Cover image path (default: `/images/placeholder_1.jpg`) |
58+
| `badge.label` | Yes | Category from the table above |
59+
| `tags` | No | Array of relevant tags |
60+
| `canonical` | No | URL if cross-posted from another site |
61+
| `ImageAttribution` | No | Credit for stock photos |
62+
63+
### 6. Apply the template
64+
65+
Use the [article template](./templates/article.md) as the body structure. Fill in frontmatter based on the topic but keep the placeholder body content as-is.
66+
67+
### 7. Code block convention
68+
69+
Code blocks with filenames use `[filename]` syntax after the language identifier:
70+
71+
````markdown
72+
```typescript [nuxt.config.ts]
73+
// code here
74+
```
75+
````
76+
77+
## Output
78+
79+
Create only the initialized article file in `content/1.posts/` with frontmatter filled based on the topic and the placeholder structure from the template. Do NOT write actual article content.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: {Title based on topic}
3+
description: {Brief description}
4+
date: {Today's date YYYY-MM-DD}
5+
image:
6+
src: /images/placeholder_1.jpg
7+
badge:
8+
label: {Category}
9+
tags:
10+
- {tag1}
11+
- {tag2}
12+
---
13+
14+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
15+
16+
## Section Title
17+
18+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
19+
20+
![Image description](/posts/images/{number}.{slug}_1.png){.rounded-lg .mx-auto}
21+
22+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
23+
24+
```typescript [example.ts]
25+
// Sample code block
26+
const example = "Hello World";
27+
console.log(example);
28+
```
29+
30+
## Another Section
31+
32+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
33+
34+
### Subsection
35+
36+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
37+
38+
::callout{icon="i-heroicons-light-bulb"}
39+
This is a callout for tips or important notes.
40+
::
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: I created my first GitHub Agentic Workflow to keep my blog up to date
3+
description: Exploring GitHub's agentic workflows.
4+
date: 2026-03-31
5+
image:
6+
src: /images/robot-hand_1.jpg
7+
badge:
8+
label: Development
9+
tags:
10+
- GitHub
11+
- GitHub Copilot
12+
- AI
13+
- tooling
14+
---
15+
16+
This blog you are reading is based on the [Nuxt UI SaaS template](https://github.com/nuxt-ui-templates/saas) that I have heavily modified. The Nuxt UI template is maintained and regularly updated by the Nuxt team, especially when they make evolutions to the Nuxt UI component library.
17+
18+
That means, when I want to get the latest features and improvements of the template, I have to compare what has changed in the template repository and apply only the relevant bits to my codebase. This is a complex and boring task that I don't want to do manually, and that is not something I can easily automate with traditional scripts because it's not completely deterministic.
19+
20+
That's where [GitHub Agentic Workflows](https://github.github.com/gh-aw/) come into play.
21+
22+
With GitHub Agentic Workflows, you have the power of an AI coding agent running inside a GitHub Action, to perform tasks on your codebase based on instructions you have written in natural language. That way you have an automation that can adapt to your context, without fixed rules.
23+
24+
For my use case, I need a workflow that regularly checks the Nuxt UI SaaS template repository for updates, checks if there are any relevant changes for my codebase, and eventually creates a pull request with the modifications.
25+
26+
So after a quick brainstorming session with GitHub Copilot, I created the agentic workflow markdown file like this:
27+
28+
```md [template-sync.md]
29+
You are helping sync the personal blog at TechWatching/techwatching.dev with its upstream
30+
template nuxt-ui-templates/saas. This blog was originally created from that template and has
31+
been heavily customized: some pages were removed, new pages were added, components were
32+
renamed, and new features (RSS feeds, tags, goodies page, speaking page, Giscus comments)
33+
were added. Your job is to apply useful upstream improvements without breaking anything.
34+
35+
## Step 1: Check for new template changes
36+
## Step 2: Identify changed files
37+
## Step 3: Apply changes using these rules
38+
## Step 4: Update state file
39+
## Step 5: Validate changes
40+
## Step 6: Create pull request
41+
```
42+
43+
For the sake of simplicity, I did not share the details of each step but you can find the complete agentic workflow file [here](https://github.com/TechWatching/techwatching.dev/blob/main/.github/agentic-workflows/template-sync.md)
44+
45+
There is a front matter section at the top of the file to specify the workflow trigger, the permissions of the workflow, and the tools it can use:
46+
47+
```yaml
48+
name: "Template sync"
49+
on:
50+
schedule: weekly on monday
51+
workflow_dispatch:
52+
skip-if-match: "repo:TechWatching/techwatching.dev is:pr is:open label:template-sync"
53+
54+
permissions:
55+
contents: read
56+
pull-requests: read
57+
58+
network: defaults
59+
60+
tools:
61+
bash: true
62+
github:
63+
toolsets:
64+
- repos
65+
- pull_requests
66+
67+
safe-outputs:
68+
create-pull-request:
69+
protected-files: allowed
70+
```
71+
72+
Then the corresponding GitHub Action workflow file can be generated from this front matter using the `gh aw compile` command. This gives you a `template-sync.lock.yml` that should not be manually edited and that will be used by GitHub to run the workflow.
73+
74+
One thing I did not mention: to be able to easily compare the changes in the template repository, I also created a state file to keep track of the last template commit that was applied to my codebase. This state file is updated by the workflow at each run and can be used by the agent to know which commits to analyze in the template repository.
75+
76+
And here is a Pull Request created by my new GitHub Agentic Workflow:
77+
78+
![Pull Request created by Agentic Workflow](/posts/images/78.github-agentic-workflows_1.png){.rounded-lg .mx-auto}
79+
80+
This is not a very complex use case but it solves a real problem for me that would have been difficult to solve with traditional automation.
142 KB
Loading

0 commit comments

Comments
 (0)