From 820763c408f36350af8e522743dd7dd71a4ae921 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 10:39:45 +0000 Subject: [PATCH 1/3] Initial plan From d081092bc704f5efbd82a9b79e1529d68ca2816a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 10:46:10 +0000 Subject: [PATCH 2/3] 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> --- .devcontainer/devcontainer.json | 2 +- .github/copilot-instructions.md | 108 +++++++++++++++++++++++++++++--- 2 files changed, 99 insertions(+), 11 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3484cec..059a921 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,7 +18,7 @@ "onAutoForward": "openPreview" } }, - "onCreateCommand": "pnpm self-update", + "onCreateCommand": "corepack enable && corepack install", "updateContentCommand": "pnpm install --config.confirmModulesPurge=false", "postAttachCommand": "pnpm dev", diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index b93df1b..89e808f 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,5 +1,103 @@ # GitHub Copilot Instructions +## Project Overview + +This is **TechWatching.dev**, Alexandre Nédélec's personal blog at https://techwatching.dev. It is a statically generated site built with: + +- **Nuxt 4** — Vue.js meta-framework (compatibility date `2024-07-11`) +- **Nuxt UI v3** (`@nuxt/ui`) — UI component library based on TailwindCSS v4 +- **Nuxt Content v3** (`@nuxt/content`) — Markdown/YAML content management with SQLite +- **TailwindCSS v4** — Utility-first CSS +- **@nuxtjs/seo** — SEO, OG images, schema.org, sitemap +- **TypeScript** — strict typing throughout + +## Development Environment + +### Package Manager + +This project uses **pnpm** (version specified in `package.json` → `"packageManager": "pnpm@10.29.2"`). Always use `pnpm` — never `npm` or `yarn`. + +The `.npmrc` sets `shamefully-hoist=true`. + +### Bootstrap + +```bash +corepack enable # ensure pnpm is managed by corepack +pnpm install # install all dependencies +``` + +### Common Commands + +| Command | Description | +|---------|-------------| +| `pnpm dev` | Start dev server at http://localhost:3000 | +| `pnpm build` | Build for production (SSR) | +| `pnpm generate` | Generate static site (prerendered) | +| `pnpm preview` | Preview production build | +| `pnpm lint` | Run ESLint | +| `pnpm lint:fix` | Run ESLint with auto-fix | +| `pnpm typecheck` | Run TypeScript type checking via `nuxt typecheck` | + +### CI Validation + +The CI workflow (`.github/workflows/ci.yml`) runs on every push: + +1. `pnpm install` — install dependencies +2. `pnpm run lint` — **must pass with zero errors** +3. `pnpm run typecheck` — **must pass with zero errors** + +Always run both `pnpm lint` and `pnpm typecheck` before committing. Fix all lint and type errors before marking work as done. + +## Project Layout + +``` +techwatching.dev/ +├── .github/ +│ ├── copilot-instructions.md # this file — repository-wide Copilot instructions +│ ├── git-commit-instructions.md # Conventional Commits format guide +│ ├── instructions/ # path-specific instructions (.instructions.md) +│ │ ├── content.instructions.md # applyTo: content/**/*.{md,yml} +│ │ └── nuxt.instructions.md # applyTo: **/*.vue +│ ├── prompts/ # reusable prompt templates +│ │ └── new-article.prompt.md +│ ├── agents/ # Copilot agent definitions +│ │ └── nuxt.agent.md +│ └── workflows/ +│ └── ci.yml # lint + typecheck on every push +├── app/ # Nuxt app source (Nuxt 4 layout) +│ ├── app.vue # root Vue component +│ ├── app.config.ts # Nuxt UI theme config (colors, components) +│ ├── components/ # shared Vue components (AppHeader, GiscusComments, etc.) +│ ├── pages/ # file-based routes (index.vue, blog/[slug].vue, etc.) +│ ├── layouts/ # Nuxt layouts (default.vue) +│ ├── assets/css/main.css # global TailwindCSS entry point +│ ├── plugins/ # Nuxt plugins (posthog.client.ts) +│ ├── types/ # shared TypeScript types +│ └── utils/ # utility functions +├── content/ # @nuxt/content source files +│ ├── 0.index.yml # home page structured data +│ ├── 1.posts/ # blog posts — {number}.{slug}.md +│ ├── 2.speaking.yml # speaking events array +│ └── 3.goodies/ # goodies/tools — {slug}.md +├── server/ +│ ├── api/ # JSON API endpoints (*..ts) +│ └── routes/ # custom routes (RSS/Atom: *.rss, *.atom) +├── public/ # static assets served as-is +├── content.config.ts # @nuxt/content collection schemas (zod) +├── nuxt.config.ts # Nuxt configuration +├── eslint.config.mjs # ESLint flat config +├── tsconfig.json # TypeScript config +├── pnpm-workspace.yaml # pnpm workspace +└── .npmrc # pnpm config +``` + +### Key architecture notes + +- **Static generation**: all routes prerendered via `routeRules: { '/**': { prerender: true } }` and Nitro crawl +- **Content collections**: defined in `content.config.ts` using `defineCollection` + zod schemas; collection names are `index`, `posts`, `speaking`, `goodies`, `goodiesPage`, `content` +- **Server handlers**: must import from `@nuxt/content/server` and pass `event` as first arg: `queryCollection(event, 'posts')` +- **Commit messages**: follow Conventional Commits (see `.github/git-commit-instructions.md`) + ## MCP Tool Usage When answering questions about this project, use the appropriate MCP (Model Context Protocol) tools: @@ -45,16 +143,6 @@ Activate additional tool groups as needed: - How do I deploy to Netlify/Vercel? - How do I create API routes in Nuxt? -## Project Context - -This is a personal blog built with: -- **Nuxt 4** - Vue.js meta-framework -- **Nuxt UI v3** - UI component library -- **Nuxt Content v3** - Markdown/content management -- **TailwindCSS v4** - Styling - -Content is stored in the `content/` directory with blog posts in `content/1.posts/`. - ## Nuxt UI v3 Styling Guidelines When customizing Nuxt UI v3 components: From c74ecadbf4c59bb604cd0d5a95c554c9a708d3ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:08:22 +0000 Subject: [PATCH 3/3] fix(tooling): revert corepack, pnpm is pre-installed in devcontainer image The mcr.microsoft.com/devcontainers/typescript-node image ships pnpm via the Node.js devcontainer feature. No corepack setup is needed. Restore the original onCreateCommand to pnpm self-update and remove the corepack step from copilot-instructions.md bootstrap section. Co-authored-by: TechWatching <15186176+TechWatching@users.noreply.github.com> --- .devcontainer/devcontainer.json | 2 +- .github/copilot-instructions.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 059a921..3484cec 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,7 +18,7 @@ "onAutoForward": "openPreview" } }, - "onCreateCommand": "corepack enable && corepack install", + "onCreateCommand": "pnpm self-update", "updateContentCommand": "pnpm install --config.confirmModulesPurge=false", "postAttachCommand": "pnpm dev", diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 89e808f..06b6f04 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -22,7 +22,6 @@ The `.npmrc` sets `shamefully-hoist=true`. ### Bootstrap ```bash -corepack enable # ensure pnpm is managed by corepack pnpm install # install all dependencies ```