Skip to content

Commit 380dcfa

Browse files
authored
Update audit-docs prompt with how to write directory links (#579)
1 parent 4ea1cc3 commit 380dcfa

5 files changed

Lines changed: 582 additions & 579 deletions

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ No exceptions. Do not output any diagram missing either field.
157157
- **Every file reference must be a clickable markdown link.** `[filename](relative/path)` — no bare filenames, no exceptions.
158158
- ❌ "See server.ts for the implementation"
159159
- ✅ "See [`server.ts`](../src/server.ts) for the implementation"
160+
- **Markdown links must target files, not directories.** If the visible text refers to a directory, link to a file inside that directory such as `index.md`, `README.md`, or the most relevant existing file.
161+
- ❌ "[`/design`](../design)"
162+
- ✅ "[`/design`](../design/index.md)"
160163
- **Inline preferred:** Weave links into prose. Use footer `Implementation:` only when inline is unnatural.
161164
- **No redundant citations:** Don't link the same file twice in adjacent sentences.
162165
- **Non-existent files:** If the file doesn't exist, re-evaluate and remove or correct the statement.
@@ -227,7 +230,7 @@ For **every statement** you wrote:
227230
### Content & Style Checks
228231

229232
- Pre-existing content modified only for factual errors? Accurate content preserved?
230-
- All file references are clickable links? (fix or delete — ZERO TOLERANCE)
233+
- All file references are clickable links that resolve to files, not directories? (fix or delete — ZERO TOLERANCE)
231234
- Config docs use external-facing names only? (trace to source or delete)
232235
- No new subjective adjectives? (preserve existing ones)
233236
- No code dumps? (replace with links)

docs/architecture/app-directory.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ The root layout renders GeneralLayout which provides navigation, footer, backgro
4747

4848
**Global Styles:** Imports [globals.scss](../../src/styles/globals.scss) for application-wide CSS.
4949

50+
**Service Worker:** Registers the service worker for PWA functionality.
51+
5052
**Analytics:** Includes Vercel SpeedInsights for performance tracking.
5153

5254
Implementation: [src/app/layout.tsx](../../src/app/layout.tsx)
@@ -59,8 +61,6 @@ The home page ([src/app/page.tsx](../../src/app/page.tsx)) is a client component
5961

6062
**Console Logo:** Debounced ASCII art logged to browser console via [ascii helper](../../src/helpers/ascii.ts).
6163

62-
**Service Worker Registration:** Registers `/sw.js` for PWA offline support. Registration runs once on page load.
63-
6464
**Content Rendering:** Displays Banner, ProjectsGrid, and Publications components in vertical stack.
6565

6666
Implementation: [src/app/page.tsx](../../src/app/page.tsx)
@@ -73,11 +73,11 @@ Implementation: [src/app/page.tsx](../../src/app/page.tsx)
7373

7474
## Error Handling
7575

76-
**Error Boundary** ([src/app/error.tsx](../../src/app/error.tsx)) — Catches errors in route segments and displays fallback UI with reset button.
76+
**Error Boundary** ([src/app/error.tsx](../../src/app/error.tsx)) — Catches errors in route segments and displays fallback UI with a "Go Home" button.
7777

7878
**Global Error** ([src/app/global-error.tsx](../../src/app/global-error.tsx)) — Catches errors in root layout, including its own `<html>` and `<body>` tags since layout errors prevent normal rendering.
7979

80-
Both error boundaries are client components that accept `error` and `reset` props.
80+
Both error boundaries are client components that accept an `error` prop.
8181

8282
## Loading & 404
8383

docs/architecture/configs.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,6 @@ import * as Sentry from '@sentry/nextjs';
5151
Sentry.init({ dsn: process.env.NEXT_PUBLIC_SENTRY_DSN });
5252
```
5353

54-
### Next.js Config Example
55-
56-
```js
57-
// next.config.js
58-
module.exports = {
59-
reactStrictMode: true,
60-
env: {
61-
NEXT_PUBLIC_API_KEY: process.env.NEXT_PUBLIC_API_KEY,
62-
},
63-
};
64-
```
65-
6654
## Integration & Relationships
6755

6856
- Configs are imported by components, helpers, and backend logic for environment-specific behavior.

0 commit comments

Comments
 (0)