Skip to content

Commit 4ea1cc3

Browse files
authored
Improve all prompt docs (#578)
Improve all agentic prompt docs to work better with VSCode's GitHub Copilot by making them shorter and more focused. In addition, ran those prompts and their code changes are included in this PR.
1 parent 610a5b8 commit 4ea1cc3

37 files changed

+2330
-2592
lines changed

.github/prompts/audit-docs.prompt.md

Lines changed: 163 additions & 409 deletions
Large diffs are not rendered by default.

.github/prompts/audit-pr.prompt.md

Lines changed: 61 additions & 185 deletions
Large diffs are not rendered by default.

.github/prompts/audit-quality.prompt.md

Lines changed: 55 additions & 330 deletions
Large diffs are not rendered by default.

.github/prompts/readme.md

Lines changed: 11 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -58,79 +58,42 @@ targets:
5858
5959
### [`audit-pr.prompt.md`](./audit-pr.prompt.md)
6060

61-
**Purpose:** Perform a thorough, opinionated code review of a pull request across 13 comprehensive categories. Acts as a Principal Code Reviewer to identify issues, suggest fixes, and provide actionable feedback ready for human review and posting.
61+
**Purpose:** Perform a thorough, opinionated code review of a pull request across 13 categories. Produces ready-to-post comments with severity triage and an overall summary for human review.
6262

6363
**Key Features:**
6464

6565
- **3-Step Review Process:**
66-
- Step 1: PR Alignment Check (verify PR title, description, linked ticket, diff scope, breaking changes, and PR size)
67-
- Step 2: Categorized Code Review (13 review categories covering correctness, security, privacy, performance, testing, and more)
68-
- Step 3: Overall Summary (structured verdict with stats, top concerns, and positive callouts)
69-
- **13 Review Categories:**
70-
1. Correctness & Logic
71-
2. Security & Vulnerability
72-
3. Privacy & Data Protection
73-
4. Error Handling & Resilience
74-
5. Code Quality & Cleanliness
75-
6. Architecture & Design
76-
7. Testing
77-
8. Performance & Efficiency
78-
9. Documentation & Comments
79-
10. Standards & Style Consistency
80-
11. Accessibility (UI changes only)
81-
12. Concurrency & Thread Safety
82-
13. Regulatory & Compliance
83-
- **Severity Triage:** Marks findings as 🔴 Blocking, 🟡 Non-blocking, 🔵 Suggestions, or ✅ Positive callouts
84-
- **Specific, Actionable Feedback:** Every finding includes file path, line range, issue description, and suggested fix (where applicable)
66+
- Step 1: PR Alignment Check (title, description, linked ticket, diff scope, breaking changes, PR size)
67+
- Step 2: Categorized Code Review (13 categories — correctness, security, privacy, performance, testing, etc.)
68+
- Step 3: Overall Summary (verdict, stats, top concerns, positive callouts)
69+
- **Severity Triage:** 🔴 Blocking, 🟡 Non-blocking, 🔵 Suggestions, ✅ Positive callouts
70+
- **Actionable Findings:** Every finding includes file path, line range, issue description, and suggested fix
8571

8672
**When to Use:**
8773

8874
- During pull request reviews (before merge)
8975
- As a second opinion on code changes
90-
- To ensure comprehensive coverage of security, privacy, and performance concerns
9176
- When you need detailed, ready-to-post review comments
9277

93-
**Assumptions:**
94-
95-
- Active GitHub pull request with `#activePullRequest` and `#changes` accessible
96-
- No external tools required (GitHub/Jira tools are optional and noted as conditional)
97-
9878
---
9979

10080
### [`audit-quality.prompt.md`](./audit-quality.prompt.md)
10181

102-
**Purpose:** Perform a deep-dive audit of your codebase to identify architectural flaws, technical debt, and maintainability issuesthen automatically implement improvements.
82+
**Purpose:** Perform a deep-dive audit of your codebase to identify architectural flaws, technical debt, and maintainability issuesthen automatically implement improvements.
10383

10484
**Key Features:**
10585

106-
- **Breadth-First Audit:** Analyzes code architecture, design patterns, code health, security, and standards
107-
- **Test-Driven Implementation:** Applies refactors using a TDD (Test-Driven Development) approach
108-
- **Automatic Validation:** Runs your project's validation command to ensure changes work
109-
- **Documentation Sync:** Updates documentation to reflect code changes (Step n-1 before final validation)
110-
111-
**What It Analyzes:**
112-
113-
- Architecture & design patterns (coupling, modularity, over-engineering)
114-
- Code health (correctness, clarity, cyclomatic complexity, dead code, DRY violations)
115-
- Robustness & error handling (resilience, idempotency, swallowed errors)
116-
- Security & privacy concerns
117-
- Standards & style adherence
118-
- Accessibility (for UI code)
119-
- Test quality and coverage
86+
- **Breadth-First Audit:** Analyzes architecture, code health, security, privacy, performance, and 16 total categories
87+
- **Proactive Implementation:** Identifies issues and immediately implements fixes
88+
- **Incremental Validation:** Runs your project's validation command after each change
89+
- **Documentation Sync:** Updates documentation to reflect code changes
12090

12191
**When to Use:**
12292

123-
- During code review cycles (before PR merge)
12493
- As part of regular maintenance sprints
12594
- When tackling technical debt
12695
- Before major releases (ensure code quality baseline)
12796

128-
**Assumptions:**
129-
130-
- Your project has a test suite (Jest, Cypress, etc.)
131-
- You have a validation script defined (e.g., `npm run validate`)
132-
- You follow a specific style guide (defaults to Google Style Guide)
133-
13497
---
13598

13699
## Prerequisites

docs/architecture/app-directory.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ The portfolio uses Next.js App Router, where file names in [src/app/](../../src/
2121

2222
```mermaid
2323
flowchart TD
24+
accTitle: App Router Component Hierarchy
25+
accDescr: Layout wraps all routes and provides metadata, includes GeneralLayout which contains Navbar, Footer, StarsBackground and CookieSnackbar. Page renders Banner, ProjectsGrid, and Publications
2426
Layout[layout.tsx] -->|Wraps| Page[page.tsx]
2527
Layout -->|Provides| Metadata[SEO & Metadata]
2628
Layout -->|Includes| GL[GeneralLayout]

docs/architecture/components/avatar.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Implementation: [src/components/banner/Avatar.tsx](../../src/components/banner/A
6969

7070
```mermaid
7171
sequenceDiagram
72+
accTitle: Avatar Sneeze and Easter Egg Interaction Sequence
73+
accDescr: User hovers avatar on 5th time triggering sneeze animation and logging event. On 30th time (6th sneeze), aaaahhhh helper is called to transform page and log event
7274
participant User
7375
participant Avatar
7476
participant Helper

docs/architecture/components/cookie-snackbar.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The CookieSnackbar component displays a cookie consent notification to users whe
1212

1313
```mermaid
1414
flowchart TD
15+
accTitle: Cookie Snackbar State Management
16+
accDescr: CookieSnackbar checks if browser cookie is set. If not set, shows notification and expires in 1 year. If set, hides notification
1517
CookieSnackbar[CookieSnackbar] -->|Checks| Cookie[Browser Cookie]
1618
Cookie -->|Not Set| Show[Show Notification]
1719
Cookie -->|Set| Hide[Hide Notification]
@@ -69,6 +71,8 @@ const handleClose = () => {
6971

7072
```mermaid
7173
sequenceDiagram
74+
accTitle: Cookie Consent Component Sequence
75+
accDescr: When user visits site, component mounts on client and checks document cookie. If cookie exists, notification is hidden. If not, it shows notification and sets cookie after 1 second, or user can click close
7276
participant User
7377
participant Component
7478
participant Browser

docs/architecture/components/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ This document describes the internal architecture, relationships, and usage of m
1919

2020
```mermaid
2121
flowchart TD
22+
accTitle: Page Component Composition Tree
23+
accDescr: Root Layout wraps Navbar, Main Content, Footer, and ServiceWorkerRegister. Main Content contains Banner, ProjectsGrid, Publications, StarsBackground, CookieSnackbar. Banner contains Avatar. ProjectsGrid and Publications generate cards. Footer contains social links
2224
RootLayout[Root Layout] --> Navbar
2325
RootLayout --> Main[Main Content]
2426
RootLayout --> Footer
@@ -186,6 +188,8 @@ Data flow:
186188

187189
```mermaid
188190
sequenceDiagram
191+
accTitle: Page Data Integration and Analytics Flow
192+
accDescr: Page imports projects, publications, socials from data. Data is passed as props to components. Components render UI and log analytics events to Firebase
189193
participant Page
190194
participant Data
191195
participant Component
@@ -231,6 +235,8 @@ sequenceDiagram
231235

232236
```mermaid
233237
flowchart LR
238+
accTitle: Component Data and Event Flow
239+
accDescr: Data is imported from src/data into page.tsx. Page passes data as props to ProjectsGrid, Publications, Footer, Navbar and Avatar. All components log events to Firebase
234240
Data[src/data/] -->|Import| Page[page.tsx]
235241
Page -->|Props| ProjectsGrid
236242
Page -->|Props| Publications

docs/architecture/components/navbar.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ The Navbar component is a fixed-position navigation bar located in [`src/compone
1010

1111
```mermaid
1212
flowchart LR
13+
accTitle: Navbar Navigation Structure
14+
accDescr: Navbar contains Home button and links for Projects, Publications, Socials, and Resume. Each item scrolls to or opens its target section or PDF
1315
Navbar[Navbar] -->|Contains| Home[Home Button]
1416
Navbar -->|Contains| Projects[Projects Link]
1517
Navbar -->|Contains| Pubs[Publications Link]
18+
Navbar -->|Contains| Socials[Socials Link]
1619
Navbar -->|Contains| Resume[Resume Link]
1720
1821
Home -->|Scroll to| Top[Page Top]
1922
Projects -->|Scroll to| ProjectsGrid[Projects Grid]
2023
Pubs -->|Scroll to| PublicationsList[Publications]
24+
Socials -->|Scroll to| Footer[Footer / Socials]
2125
Resume -->|Opens| PDF[Resume PDF]
2226
```
2327

@@ -57,6 +61,7 @@ logAnalyticsEvent('navbar_home', {
5761
- `navbar_home` - Home button click
5862
- `navbar_projects` - Projects link click
5963
- `navbar_publications` - Publications link click
64+
- `navbar_socials` - Socials link click
6065
- `navbar_resume` - Resume link click
6166

6267
### 3. Responsive Design
@@ -121,6 +126,18 @@ if (pathname === '/') {
121126
**Target:** `#publications` section
122127
**Text:** "Publications"
123128

129+
### Socials Link
130+
131+
**Icon:** Profile picture (drawn avatar)
132+
**Target:** `#socials` section (Footer)
133+
**Behavior:** Displays a small profile image that links to the social media links in the footer
134+
135+
```tsx
136+
<Link aria-label='See socials' href='/#socials'>
137+
<Image alt='Logo' height={24} src='/images/drawn/profile_pic_drawn.webp' width={24} />
138+
</Link>
139+
```
140+
124141
### Resume Link
125142

126143
**Target:** External PDF (`/resume/resume.pdf`)
@@ -147,6 +164,8 @@ if (pathname === '/') {
147164

148165
```mermaid
149166
sequenceDiagram
167+
accTitle: Navbar Navigation Interaction Sequence
168+
accDescr: User clicks navbar items. Navbar logs events, checks pathname, then either smooth scrolls on home page or navigates to hash on other pages. Shows both Projects and Socials click flows
150169
participant User
151170
participant Navbar
152171
participant Router
@@ -164,6 +183,18 @@ sequenceDiagram
164183
Navbar->>Router: Navigate to /#projects-grid
165184
Router->>DOM: Scroll to section
166185
end
186+
187+
User->>Navbar: Click Socials
188+
Navbar->>Analytics: Log event
189+
Navbar->>Router: Check pathname
190+
191+
alt On Home Page
192+
Navbar->>DOM: getElementById('socials')
193+
DOM->>DOM: scrollIntoView({behavior: 'smooth'})
194+
else On Other Page
195+
Navbar->>Router: Navigate to /#socials
196+
Router->>DOM: Scroll to section
197+
end
167198
```
168199

169200
## Accessibility Features

docs/architecture/components/projects.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ The projects grid is displayed using the `ProjectsGrid` component located in [Pr
2222

2323
```mermaid
2424
flowchart LR
25+
accTitle: Projects Grid Data Flow
26+
accDescr: ProjectsGrid component fetches projects data, maps to grid items, displays project cards with thumbnail image, name, title/employer, and action links. Includes network-aware video autoplay
2527
A[ProjectsGrid Component] -->|Fetches| B[Projects Data]
2628
B --> C[Maps Projects to Grid Items]
2729
C --> D[Displays Project Cards]

0 commit comments

Comments
 (0)