From ef55193dfe9e8e44c308d6de28e84d5ff96f789f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 10:57:30 +0000 Subject: [PATCH 1/4] Initial plan From 504fb79c9bef6ea415737cdc0f51e282e8b97f42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:01:54 +0000 Subject: [PATCH 2/4] refactor: split AGENTS.md into reusable SOP + repo-specific CONTEXT.md - Add read-only notice and CONTEXT.md maintenance instruction to AGENTS.md - Remove repo-specific references (Vite, pnpm --filter web dev) from AGENTS.md - Create CONTEXT.md with architecture, tech stack, and discovery log - Create .github/copilot-instructions.md linking Copilot to CONTEXT.md Co-authored-by: IntranetFactory <7462342+IntranetFactory@users.noreply.github.com> --- .github/copilot-instructions.md | 6 ++++++ AGENTS.md | 14 +++++++++--- CONTEXT.md | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 .github/copilot-instructions.md create mode 100644 CONTEXT.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..3900597 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,6 @@ + + + +Read and follow the instructions in `AGENTS.md` at the repository root. + +For project-specific architecture, tech stack, and discovery notes, read `CONTEXT.md` at the repository root. Update `CONTEXT.md` after every major task with new findings. diff --git a/AGENTS.md b/AGENTS.md index 0f56ff2..8a6f885 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,13 @@ # Agent Instructions +> **🔒 CRITICAL: Do not modify this file. It is a shared SOP. Only the human user can update these rules.** + +## Project Context + +Read `CONTEXT.md` for project-specific architecture, tech stack, and prior discoveries. + +Maintain a log of project-specific discoveries and progress in `CONTEXT.md`. Update this file after every major task — record new architectural insights, resolved gotchas, and any decisions that future sessions should know about. + ## Environment The workspace is provisioned automatically via `workplace/setup.sh` on session start. The following are installed globally and available on PATH: @@ -13,7 +21,7 @@ Do not re-run `setup.sh` manually unless the environment appears broken. ## Commands ```bash -pnpm dev # start all apps in dev mode (Vite HMR at http://localhost:5173) +pnpm dev # start all apps in dev mode pnpm build # build all apps pnpm lint # lint all apps ``` @@ -21,7 +29,7 @@ pnpm lint # lint all apps ## Development vs. Completion ### During development — fast iteration -Use `pnpm dev` (or `pnpm --filter web dev`) for instant Vite HMR feedback while writing code. Use this freely during a task for rapid iteration. Localhost is a development tool only — **it is not a completion gate**. +Use `pnpm dev` for fast HMR feedback while writing code. Use this freely during a task for rapid iteration. Localhost is a development tool only — **it is not a completion gate**. ### Task completion — mandatory A task is **not complete** until it has been deployed to a Cloudflare branch preview and verified there. Do not mark a task done based on localhost behaviour alone. @@ -92,7 +100,7 @@ Confidence: 92% — all acceptance criteria visible; minor responsive layout not When asked to implement and verify a change: 1. Make the change -2. Use `pnpm dev` during development for fast Vite feedback (localhost is for iteration only) +2. Use `pnpm dev` during development for fast feedback (localhost is for iteration only) 3. `pnpm build` — confirm no build errors 4. `pnpm preview:wrangler` — deploy to Cloudflare via turbo (**run from repo root**) 5. Read `.preview-url.md` — this is the only valid URL for verification screenshots diff --git a/CONTEXT.md b/CONTEXT.md new file mode 100644 index 0000000..3dcc056 --- /dev/null +++ b/CONTEXT.md @@ -0,0 +1,38 @@ +# Project Context + +> **Agent-maintained file.** Update this file after every major task with project-specific discoveries, architecture notes, and progress. This is your working memory for this codebase. + +## Architecture + +- **Monorepo** managed by pnpm workspaces + Turborepo (`turbo.json`) +- Primary app: `apps/web` — a React SPA + +## Tech Stack (`apps/web`) + +| Layer | Technology | +| ------------ | --------------------------------- | +| Framework | React 19 | +| Language | TypeScript 5.9 | +| Build / Dev | Vite 7 (HMR on `localhost:5173`) | +| Styling | Tailwind CSS 4 | +| Components | shadcn/ui (Radix primitives + CVA + `cn()` utility) | +| Linting | ESLint 9 | +| Deployment | Cloudflare Workers (via Wrangler) | + +### Useful dev shortcuts + +```bash +pnpm --filter web dev # start only the web app in dev mode +pnpm --filter web build # build only the web app +pnpm --filter web lint # lint only the web app +``` + +### Path alias + +`@` is mapped to `apps/web/src` via Vite config and `tsconfig.app.json`. + +## Discovery Log + + + +_No entries yet._ From a40ab908ac9e4c7056a84ce8ce3c6eeef4d40585 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:12:39 +0000 Subject: [PATCH 3/4] fix: scope CONTEXT.md to package-specific info, symlink copilot-instructions.md - Remove orchestration info (monorepo, turborepo, cloudflare) from CONTEXT.md - Keep only apps/web package tech stack (React, Vite, Tailwind, shadcn/ui) - Replace .github/copilot-instructions.md with symlink to ../CONTEXT.md Co-authored-by: IntranetFactory <7462342+IntranetFactory@users.noreply.github.com> --- .github/copilot-instructions.md | 7 +------ CONTEXT.md | 36 ++++++++++----------------------- 2 files changed, 12 insertions(+), 31 deletions(-) mode change 100644 => 120000 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 3900597..0000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,6 +0,0 @@ - - - -Read and follow the instructions in `AGENTS.md` at the repository root. - -For project-specific architecture, tech stack, and discovery notes, read `CONTEXT.md` at the repository root. Update `CONTEXT.md` after every major task with new findings. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 120000 index 0000000..b6f02d4 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +../CONTEXT.md \ No newline at end of file diff --git a/CONTEXT.md b/CONTEXT.md index 3dcc056..15021e0 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -2,34 +2,20 @@ > **Agent-maintained file.** Update this file after every major task with project-specific discoveries, architecture notes, and progress. This is your working memory for this codebase. -## Architecture +## Packages -- **Monorepo** managed by pnpm workspaces + Turborepo (`turbo.json`) -- Primary app: `apps/web` — a React SPA +### `apps/web` -## Tech Stack (`apps/web`) +| Layer | Technology | +| ----------- | ---------------------------------------------------- | +| Framework | React 19 | +| Language | TypeScript 5.9 | +| Build / Dev | Vite 7 (HMR on `localhost:5173`) | +| Styling | Tailwind CSS 4 | +| Components | shadcn/ui (Radix primitives + CVA + `cn()` utility) | +| Linting | ESLint 9 | -| Layer | Technology | -| ------------ | --------------------------------- | -| Framework | React 19 | -| Language | TypeScript 5.9 | -| Build / Dev | Vite 7 (HMR on `localhost:5173`) | -| Styling | Tailwind CSS 4 | -| Components | shadcn/ui (Radix primitives + CVA + `cn()` utility) | -| Linting | ESLint 9 | -| Deployment | Cloudflare Workers (via Wrangler) | - -### Useful dev shortcuts - -```bash -pnpm --filter web dev # start only the web app in dev mode -pnpm --filter web build # build only the web app -pnpm --filter web lint # lint only the web app -``` - -### Path alias - -`@` is mapped to `apps/web/src` via Vite config and `tsconfig.app.json`. +Path alias: `@` → `apps/web/src` (configured in `vite.config.ts` and `tsconfig.app.json`). ## Discovery Log From bbcdcb2848db759d0f99cbd5fdd719d5c333108c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:22:39 +0000 Subject: [PATCH 4/4] fix: add orchestration info (pnpm/turborepo) and CONTEXT.md update requirement to AGENTS.md Co-authored-by: IntranetFactory <7462342+IntranetFactory@users.noreply.github.com> --- AGENTS.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 8a6f885..4020125 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,6 +8,13 @@ Read `CONTEXT.md` for project-specific architecture, tech stack, and prior disco Maintain a log of project-specific discoveries and progress in `CONTEXT.md`. Update this file after every major task — record new architectural insights, resolved gotchas, and any decisions that future sessions should know about. +## Workspace + +This is a **pnpm workspace monorepo** orchestrated by **Turborepo** (`turbo.json`). All packages live under the `apps/` and `packages/` directories. + +- `pnpm` — package manager & workspace orchestration +- `turbo` — task runner (build, dev, lint pipelines defined in `turbo.json`) + ## Environment The workspace is provisioned automatically via `workplace/setup.sh` on session start. The following are installed globally and available on PATH: @@ -150,6 +157,22 @@ https://raw.githubusercontent.com/IntranetFactory/agbr-test//screen > ⚠️ Screenshots mentioned only in comments do NOT satisfy this requirement. They must be **visible inline** in the PR description itself so reviewers can see them without clicking. +### 3. CONTEXT.md update status + +Every PR description **must** state whether `CONTEXT.md` was updated and why (or why not). This ensures reviewers know if new architectural insights, tech-stack changes, or discovery-log entries were captured. + +```markdown +## CONTEXT.md +Updated — added discovery log entry for new auth flow. +``` + +or + +```markdown +## CONTEXT.md +No update needed — change was a cosmetic CSS fix with no architectural impact. +``` + ### Example `prDescription` for report_progress ```markdown @@ -160,4 +183,7 @@ https://copilot-my-branch-agbr-test.ma532.workers.dev ## Screenshots ![Home page heading showing window.location.href](https://raw.githubusercontent.com/IntranetFactory/agbr-test/copilot/my-branch/screenshots/20240315143022-checkout-flow.png) + +## CONTEXT.md +No update needed — cosmetic heading change only. ```