Skip to content

Commit d081092

Browse files
CopilotTechWatching
andcommitted
docs(tooling): configure Copilot coding agent instructions for pnpm/Nuxt 4
Add development environment bootstrap, pnpm commands table, CI validation steps, and project layout to copilot-instructions.md. Remove redundant Project Context section (covered by Project Overview). Update devcontainer to use corepack for reliable pnpm setup. Co-authored-by: TechWatching <15186176+TechWatching@users.noreply.github.com>
1 parent 820763c commit d081092

2 files changed

Lines changed: 99 additions & 11 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"onAutoForward": "openPreview"
1919
}
2020
},
21-
"onCreateCommand": "pnpm self-update",
21+
"onCreateCommand": "corepack enable && corepack install",
2222
"updateContentCommand": "pnpm install --config.confirmModulesPurge=false",
2323
"postAttachCommand": "pnpm dev",
2424

.github/copilot-instructions.md

Lines changed: 98 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,103 @@
11
# GitHub Copilot Instructions
22

3+
## Project Overview
4+
5+
This is **TechWatching.dev**, Alexandre Nédélec's personal blog at https://techwatching.dev. It is a statically generated site built with:
6+
7+
- **Nuxt 4** — Vue.js meta-framework (compatibility date `2024-07-11`)
8+
- **Nuxt UI v3** (`@nuxt/ui`) — UI component library based on TailwindCSS v4
9+
- **Nuxt Content v3** (`@nuxt/content`) — Markdown/YAML content management with SQLite
10+
- **TailwindCSS v4** — Utility-first CSS
11+
- **@nuxtjs/seo** — SEO, OG images, schema.org, sitemap
12+
- **TypeScript** — strict typing throughout
13+
14+
## Development Environment
15+
16+
### Package Manager
17+
18+
This project uses **pnpm** (version specified in `package.json``"packageManager": "pnpm@10.29.2"`). Always use `pnpm` — never `npm` or `yarn`.
19+
20+
The `.npmrc` sets `shamefully-hoist=true`.
21+
22+
### Bootstrap
23+
24+
```bash
25+
corepack enable # ensure pnpm is managed by corepack
26+
pnpm install # install all dependencies
27+
```
28+
29+
### Common Commands
30+
31+
| Command | Description |
32+
|---------|-------------|
33+
| `pnpm dev` | Start dev server at http://localhost:3000 |
34+
| `pnpm build` | Build for production (SSR) |
35+
| `pnpm generate` | Generate static site (prerendered) |
36+
| `pnpm preview` | Preview production build |
37+
| `pnpm lint` | Run ESLint |
38+
| `pnpm lint:fix` | Run ESLint with auto-fix |
39+
| `pnpm typecheck` | Run TypeScript type checking via `nuxt typecheck` |
40+
41+
### CI Validation
42+
43+
The CI workflow (`.github/workflows/ci.yml`) runs on every push:
44+
45+
1. `pnpm install` — install dependencies
46+
2. `pnpm run lint`**must pass with zero errors**
47+
3. `pnpm run typecheck`**must pass with zero errors**
48+
49+
Always run both `pnpm lint` and `pnpm typecheck` before committing. Fix all lint and type errors before marking work as done.
50+
51+
## Project Layout
52+
53+
```
54+
techwatching.dev/
55+
├── .github/
56+
│ ├── copilot-instructions.md # this file — repository-wide Copilot instructions
57+
│ ├── git-commit-instructions.md # Conventional Commits format guide
58+
│ ├── instructions/ # path-specific instructions (.instructions.md)
59+
│ │ ├── content.instructions.md # applyTo: content/**/*.{md,yml}
60+
│ │ └── nuxt.instructions.md # applyTo: **/*.vue
61+
│ ├── prompts/ # reusable prompt templates
62+
│ │ └── new-article.prompt.md
63+
│ ├── agents/ # Copilot agent definitions
64+
│ │ └── nuxt.agent.md
65+
│ └── workflows/
66+
│ └── ci.yml # lint + typecheck on every push
67+
├── app/ # Nuxt app source (Nuxt 4 layout)
68+
│ ├── app.vue # root Vue component
69+
│ ├── app.config.ts # Nuxt UI theme config (colors, components)
70+
│ ├── components/ # shared Vue components (AppHeader, GiscusComments, etc.)
71+
│ ├── pages/ # file-based routes (index.vue, blog/[slug].vue, etc.)
72+
│ ├── layouts/ # Nuxt layouts (default.vue)
73+
│ ├── assets/css/main.css # global TailwindCSS entry point
74+
│ ├── plugins/ # Nuxt plugins (posthog.client.ts)
75+
│ ├── types/ # shared TypeScript types
76+
│ └── utils/ # utility functions
77+
├── content/ # @nuxt/content source files
78+
│ ├── 0.index.yml # home page structured data
79+
│ ├── 1.posts/ # blog posts — {number}.{slug}.md
80+
│ ├── 2.speaking.yml # speaking events array
81+
│ └── 3.goodies/ # goodies/tools — {slug}.md
82+
├── server/
83+
│ ├── api/ # JSON API endpoints (*.<method>.ts)
84+
│ └── routes/ # custom routes (RSS/Atom: *.rss, *.atom)
85+
├── public/ # static assets served as-is
86+
├── content.config.ts # @nuxt/content collection schemas (zod)
87+
├── nuxt.config.ts # Nuxt configuration
88+
├── eslint.config.mjs # ESLint flat config
89+
├── tsconfig.json # TypeScript config
90+
├── pnpm-workspace.yaml # pnpm workspace
91+
└── .npmrc # pnpm config
92+
```
93+
94+
### Key architecture notes
95+
96+
- **Static generation**: all routes prerendered via `routeRules: { '/**': { prerender: true } }` and Nitro crawl
97+
- **Content collections**: defined in `content.config.ts` using `defineCollection` + zod schemas; collection names are `index`, `posts`, `speaking`, `goodies`, `goodiesPage`, `content`
98+
- **Server handlers**: must import from `@nuxt/content/server` and pass `event` as first arg: `queryCollection(event, 'posts')`
99+
- **Commit messages**: follow Conventional Commits (see `.github/git-commit-instructions.md`)
100+
3101
## MCP Tool Usage
4102

5103
When answering questions about this project, use the appropriate MCP (Model Context Protocol) tools:
@@ -45,16 +143,6 @@ Activate additional tool groups as needed:
45143
- How do I deploy to Netlify/Vercel?
46144
- How do I create API routes in Nuxt?
47145

48-
## Project Context
49-
50-
This is a personal blog built with:
51-
- **Nuxt 4** - Vue.js meta-framework
52-
- **Nuxt UI v3** - UI component library
53-
- **Nuxt Content v3** - Markdown/content management
54-
- **TailwindCSS v4** - Styling
55-
56-
Content is stored in the `content/` directory with blog posts in `content/1.posts/`.
57-
58146
## Nuxt UI v3 Styling Guidelines
59147

60148
When customizing Nuxt UI v3 components:

0 commit comments

Comments
 (0)