Skip to content

Commit a17bb09

Browse files
Copilotstnguyen90
andcommitted
docs: Add mandatory pre-completion checklist to AGENTS.md
Added a "Required Pre-Completion Checklist" section that instructs agents to: - Always run format, check, lint, test, and build before finishing - Fix any failures before marking work complete - Never skip these mandatory quality gates This addresses the requirement to ensure all code changes are properly validated. Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
1 parent c772abc commit a17bb09

2 files changed

Lines changed: 61 additions & 42 deletions

File tree

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
name: Dockerize Profiles
22

33
on:
4-
push:
5-
branches: [feat-profiles]
6-
pull_request:
7-
types: [opened, synchronize, reopened]
8-
branches: [feat-profiles]
9-
workflow_dispatch:
4+
push:
5+
branches: [feat-profiles]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
branches: [feat-profiles]
9+
workflow_dispatch:
1010

1111
jobs:
12-
dockerize-profiles:
13-
runs-on: ubuntu-latest
14-
15-
steps:
16-
- name: Checkout the repo
17-
uses: actions/checkout@v2
18-
- name: Set up QEMU
19-
uses: docker/setup-qemu-action@v2
20-
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v2
22-
- name: Log in to Docker Hub
23-
uses: docker/login-action@v3
24-
with:
25-
username: ${{ vars.DOCKERHUB_USERNAME }}
26-
password: ${{ secrets.DOCKERHUB_TOKEN }}
12+
dockerize-profiles:
13+
runs-on: ubuntu-latest
2714

28-
- name: Extract metadata (tags, labels) for Docker
29-
id: meta
30-
uses: docker/metadata-action@v5
31-
with:
32-
images: appwrite/console-profiles
33-
tags: |
34-
type=ref,event=branch,prefix=branch-
35-
type=ref,event=pr
36-
type=sha,prefix=sha-
37-
type=raw,value=gh-${{ github.run_id}}
38-
flavor: |
39-
latest=false
15+
steps:
16+
- name: Checkout the repo
17+
uses: actions/checkout@v2
18+
- name: Set up QEMU
19+
uses: docker/setup-qemu-action@v2
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v2
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ vars.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
4027

41-
- name: Build and push Docker image
42-
id: push
43-
uses: docker/build-push-action@v6
44-
with:
45-
context: .
46-
push: true
47-
platforms: linux/amd64,linux/arm64
48-
tags: ${{ steps.meta.outputs.tags }}
49-
labels: ${{ steps.meta.outputs.labels }}
28+
- name: Extract metadata (tags, labels) for Docker
29+
id: meta
30+
uses: docker/metadata-action@v5
31+
with:
32+
images: appwrite/console-profiles
33+
tags: |
34+
type=ref,event=branch,prefix=branch-
35+
type=ref,event=pr
36+
type=sha,prefix=sha-
37+
type=raw,value=gh-${{ github.run_id}}
38+
flavor: |
39+
latest=false
40+
41+
- name: Build and push Docker image
42+
id: push
43+
uses: docker/build-push-action@v6
44+
with:
45+
context: .
46+
push: true
47+
platforms: linux/amd64,linux/arm64
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}

AGENTS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,23 @@ src/
101101
5. Before commit: `pnpm run check && pnpm run format && pnpm run lint && pnpm run test && pnpm run build`
102102
6. **Take screenshots**: For any UI changes, capture screenshots and include them in the PR description or comments before finalizing
103103

104+
## Required Pre-Completion Checklist
105+
106+
**CRITICAL**: Before finishing any work or marking a task complete, agents MUST run the following commands in order and ensure all pass:
107+
108+
1. **`pnpm run format`** - Auto-fix all formatting issues
109+
2. **`pnpm run check`** - Verify TypeScript/Svelte types (must show 0 errors, 0 warnings)
110+
3. **`pnpm run lint`** - Check code style (ignore pre-existing issues in files you didn't modify)
111+
4. **`pnpm run test`** - Run all unit tests (all tests must pass)
112+
5. **`pnpm run build`** - Ensure production build succeeds
113+
114+
If any command fails:
115+
116+
- **Format/Lint**: Run `pnpm run format` to auto-fix, then re-check
117+
- **Type errors**: Fix all TypeScript errors in files you modified
118+
- **Test failures**: Fix failing tests or ensure failures are unrelated to your changes
119+
- **Build failures**: Debug and resolve build issues before proceeding
120+
121+
**Never skip these checks** - they are mandatory quality gates before any work is considered complete.
122+
104123
**Trust these instructions** - only search if incomplete/incorrect. See CONTRIBUTING.md for PR conventions. Use `--frozen-lockfile` always. Docker builds: multi-stage, final image is nginx serving static files from `/console` path.

0 commit comments

Comments
 (0)