Skip to content

Commit aa26f16

Browse files
authored
Merge pull request #2 from BjornMelin/docs/update-agents-md
chore(agents): add to AGENTS.md and update configuration ignores
2 parents 6f0249e + 00fb916 commit aa26f16

64 files changed

Lines changed: 5633 additions & 37 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/ci-setup/action.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,24 @@ inputs:
1010
runs:
1111
using: composite
1212
steps:
13+
- name: Cache apt packages
14+
id: apt-cache
15+
uses: actions/cache@v5.0.3
16+
with:
17+
path: |
18+
/var/cache/apt/archives
19+
/var/lib/apt/lists
20+
key: apt-${{ runner.os }}-build-essential-python3
21+
22+
- name: Install build tools (argon2)
23+
if: steps.apt-cache.outputs.cache-hit != 'true'
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y build-essential python3
27+
shell: bash
28+
1329
- name: Setup Bun
14-
uses: oven-sh/setup-bun@v2
30+
uses: oven-sh/setup-bun@v2.1.2
1531
with:
1632
bun-version: ${{ inputs.bun-version }}
1733

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6.0.2
2323
with:
2424
fetch-depth: 0
2525

@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@v6.0.2
3838
with:
3939
fetch-depth: 0
4040

@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: Checkout
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@v6.0.2
5353
with:
5454
fetch-depth: 0
5555

@@ -65,7 +65,7 @@ jobs:
6565
needs: ["lint", "typecheck", "test"]
6666
steps:
6767
- name: Checkout
68-
uses: actions/checkout@v4
68+
uses: actions/checkout@v6.0.2
6969
with:
7070
fetch-depth: 0
7171

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ jobs:
2424

2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v6.0.2
2828

2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v3
30+
uses: github/codeql-action/init@v4.32.0
3131
with:
3232
languages: ${{ matrix.language }}
3333
queries: security-extended
3434
config-file: ./.github/codeql/codeql-config.yml
3535

3636
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v3
37+
uses: github/codeql-action/autobuild@v4.32.0
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v3
40+
uses: github/codeql-action/analyze@v4.32.0
4141
with:
4242
category: "/language:${{ matrix.language }}"

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6.0.2
1515

1616
- name: Dependency Review
17-
uses: actions/dependency-review-action@v4
17+
uses: actions/dependency-review-action@v4.8.2

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Run release-please
16-
uses: googleapis/release-please-action@v4
16+
uses: googleapis/release-please-action@v4.4.0
1717
with:
1818
config-file: release-please-config.json
1919
manifest-file: .release-please-manifest.json

.github/workflows/scorecard.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,25 @@ jobs:
2121

2222
steps:
2323
- name: Checkout code
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6.0.2
2525
with:
2626
persist-credentials: false
2727

2828
- name: Run analysis
29-
uses: ossf/scorecard-action@v2.4.0
29+
uses: ossf/scorecard-action@v2.4.3
3030
with:
3131
results_file: results.sarif
3232
results_format: sarif
3333
publish_results: true
3434

3535
- name: Upload artifact
36-
uses: actions/upload-artifact@v4
36+
uses: actions/upload-artifact@v6.0.0
3737
with:
3838
name: SARIF file
3939
path: results.sarif
4040
retention-days: 5
4141

4242
- name: Upload to code-scanning
43-
uses: github/codeql-action/upload-sarif@v3
43+
uses: github/codeql-action/upload-sarif@v4.32.0
4444
with:
4545
sarif_file: results.sarif
46-

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,14 @@ vitest.config.js.timestamp-*
9898
*.pid.lock
9999
.vercel
100100

101+
# Generated
102+
repomix-output.md
101103

102104
# Agents
103105
.agents/
104106
.codex/
105107
.gemini/
106108
.claude/
107109
opensrc/
110+
# next-agents-md
111+
.next-docs/

AGENTS.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ bun run format # Format code with Biome
2020
bun run lint # Run Biome and ESLint
2121
bun run typecheck # Run TypeScript compiler checks
2222
bun run test # Run tests with Vitest
23-
bun run ci # Run format/lint/typecheck/test/build
23+
bun run ci # Run lint/typecheck/test/build
2424
bun run typegen # Generate Next.js route/types without build
2525
bun run db:generate # Generate database migrations
2626
bun run db:migrate # Apply database migrations
@@ -51,6 +51,19 @@ bun run fetch:models # Update AI model catalog (requires AI_GATEWAY_AP
5151
- OpenAI-compatible base URL is `https://ai-gateway.vercel.sh/v1`.
5252
- `bun run fetch:models` writes a model catalog JSON (default: `docs/ai-gateway-models.json`).
5353

54+
## Documentation standards
55+
56+
- Product requirements: `PRD.md` is the canonical PRD; keep it aligned with `docs/specs/requirements.md`.
57+
- Specs: add/extend `docs/architecture/spec/SPEC-*.md` for implementable designs; update `docs/architecture/spec/index.md`.
58+
- ADRs: add `docs/architecture/adr/ADR-*.md` for durable decisions; update `docs/architecture/adr/index.md`.
59+
- Requirement IDs: reference `FR-*`, `NFR-*`, `PR-*`, `IR-*` from `docs/specs/requirements.md` in specs/ADRs.
60+
- Web claims: any externally sourced factual claim in generated artifacts must include citations (see `docs/architecture/spec/SPEC-0007-*`).
61+
62+
## Commit conventions
63+
64+
- Use Conventional Commits (Release Please relies on this).
65+
- Prefer narrow scopes: `docs(adr): ...`, `docs(spec): ...`, `docs(prd): ...`, `docs(agents): ...`.
66+
5467
## Definition of done (for any PR)
5568

5669
- `bun run format` clean
@@ -61,3 +74,39 @@ bun run fetch:models # Update AI model catalog (requires AI_GATEWAY_AP
6174
- No console spam in production paths
6275
- Public/exported APIs have valid TSDoc
6376
- Any env vars added are reflected in `.env.example`
77+
78+
<!-- NEXT-AGENTS-MD-START -->[Next.js Docs Index]|root: ./.next-docs|STOP. What you remember about Next.js is WRONG for this project. Always search docs and read before any task.|If docs missing, run this command first: bunx @next/codemod agents-md --output AGENTS.md|01-app:{04-glossary.mdx}|01-app/01-getting-started:{01-installation.mdx,02-project-structure.mdx,03-layouts-and-pages.mdx,04-linking-and-navigating.mdx,05-server-and-client-components.mdx,06-cache-components.mdx,07-fetching-data.mdx,08-updating-data.mdx,09-caching-and-revalidating.mdx,10-error-handling.mdx,11-css.mdx,12-images.mdx,13-fonts.mdx,14-metadata-and-og-images.mdx,15-route-handlers.mdx,16-proxy.mdx,17-deploying.mdx,18-upgrading.mdx}|01-app/02-guides:{analytics.mdx,authentication.mdx,backend-for-frontend.mdx,caching.mdx,ci-build-caching.mdx,content-security-policy.mdx,css-in-js.mdx,custom-server.mdx,data-security.mdx,debugging.mdx,draft-mode.mdx,environment-variables.mdx,forms.mdx,incremental-static-regeneration.mdx,instrumentation.mdx,internationalization.mdx,json-ld.mdx,lazy-loading.mdx,local-development.mdx,mcp.mdx,mdx.mdx,memory-usage.mdx,multi-tenant.mdx,multi-zones.mdx,open-telemetry.mdx,package-bundling.mdx,prefetching.mdx,production-checklist.mdx,progressive-web-apps.mdx,public-static-pages.mdx,redirecting.mdx,sass.mdx,scripts.mdx,self-hosting.mdx,single-page-applications.mdx,static-exports.mdx,tailwind-v3-css.mdx,third-party-libraries.mdx,videos.mdx}|01-app/02-guides/migrating:{app-router-migration.mdx,from-create-react-app.mdx,from-vite.mdx}|01-app/02-guides/testing:{cypress.mdx,jest.mdx,playwright.mdx,vitest.mdx}|01-app/02-guides/upgrading:{codemods.mdx,version-14.mdx,version-15.mdx,version-16.mdx}|01-app/03-api-reference:{07-edge.mdx,08-turbopack.mdx}|01-app/03-api-reference/01-directives:{use-cache-private.mdx,use-cache-remote.mdx,use-cache.mdx,use-client.mdx,use-server.mdx}|01-app/03-api-reference/02-components:{font.mdx,form.mdx,image.mdx,link.mdx,script.mdx}|01-app/03-api-reference/03-file-conventions/01-metadata:{app-icons.mdx,manifest.mdx,opengraph-image.mdx,robots.mdx,sitemap.mdx}|01-app/03-api-reference/03-file-conventions:{default.mdx,dynamic-routes.mdx,error.mdx,forbidden.mdx,instrumentation-client.mdx,instrumentation.mdx,intercepting-routes.mdx,layout.mdx,loading.mdx,mdx-components.mdx,not-found.mdx,page.mdx,parallel-routes.mdx,proxy.mdx,public-folder.mdx,route-groups.mdx,route-segment-config.mdx,route.mdx,src-folder.mdx,template.mdx,unauthorized.mdx}|01-app/03-api-reference/04-functions:{after.mdx,cacheLife.mdx,cacheTag.mdx,connection.mdx,cookies.mdx,draft-mode.mdx,fetch.mdx,forbidden.mdx,generate-image-metadata.mdx,generate-metadata.mdx,generate-sitemaps.mdx,generate-static-params.mdx,generate-viewport.mdx,headers.mdx,image-response.mdx,next-request.mdx,next-response.mdx,not-found.mdx,permanentRedirect.mdx,redirect.mdx,refresh.mdx,revalidatePath.mdx,revalidateTag.mdx,unauthorized.mdx,unstable_cache.mdx,unstable_noStore.mdx,unstable_rethrow.mdx,updateTag.mdx,use-link-status.mdx,use-params.mdx,use-pathname.mdx,use-report-web-vitals.mdx,use-router.mdx,use-search-params.mdx,use-selected-layout-segment.mdx,use-selected-layout-segments.mdx,userAgent.mdx}|01-app/03-api-reference/05-config/01-next-config-js:{adapterPath.mdx,allowedDevOrigins.mdx,appDir.mdx,assetPrefix.mdx,authInterrupts.mdx,basePath.mdx,browserDebugInfoInTerminal.mdx,cacheComponents.mdx,cacheHandlers.mdx,cacheLife.mdx,compress.mdx,crossOrigin.mdx,cssChunking.mdx,devIndicators.mdx,distDir.mdx,env.mdx,expireTime.mdx,exportPathMap.mdx,generateBuildId.mdx,generateEtags.mdx,headers.mdx,htmlLimitedBots.mdx,httpAgentOptions.mdx,images.mdx,incrementalCacheHandlerPath.mdx,inlineCss.mdx,isolatedDevBuild.mdx,logging.mdx,mdxRs.mdx,onDemandEntries.mdx,optimizePackageImports.mdx,output.mdx,pageExtensions.mdx,poweredByHeader.mdx,productionBrowserSourceMaps.mdx,proxyClientMaxBodySize.mdx,reactCompiler.mdx,reactMaxHeadersLength.mdx,reactStrictMode.mdx,redirects.mdx,rewrites.mdx,sassOptions.mdx,serverActions.mdx,serverComponentsHmrCache.mdx,serverExternalPackages.mdx,staleTimes.mdx,staticGeneration.mdx,taint.mdx,trailingSlash.mdx,transpilePackages.mdx,turbopack.mdx,turbopackFileSystemCache.mdx,typedRoutes.mdx,typescript.mdx,urlImports.mdx,useLightningcss.mdx,viewTransition.mdx,webVitalsAttribution.mdx,webpack.mdx}|01-app/03-api-reference/05-config:{02-typescript.mdx,03-eslint.mdx}|01-app/03-api-reference/06-cli:{create-next-app.mdx,next.mdx}|02-pages/01-getting-started:{01-installation.mdx,02-project-structure.mdx,04-images.mdx,05-fonts.mdx,06-css.mdx,11-deploying.mdx}|02-pages/02-guides:{analytics.mdx,authentication.mdx,babel.mdx,ci-build-caching.mdx,content-security-policy.mdx,css-in-js.mdx,custom-server.mdx,debugging.mdx,draft-mode.mdx,environment-variables.mdx,forms.mdx,incremental-static-regeneration.mdx,instrumentation.mdx,internationalization.mdx,lazy-loading.mdx,mdx.mdx,multi-zones.mdx,open-telemetry.mdx,package-bundling.mdx,post-css.mdx,preview-mode.mdx,production-checklist.mdx,redirecting.mdx,sass.mdx,scripts.mdx,self-hosting.mdx,static-exports.mdx,tailwind-v3-css.mdx,third-party-libraries.mdx}|02-pages/02-guides/migrating:{app-router-migration.mdx,from-create-react-app.mdx,from-vite.mdx}|02-pages/02-guides/testing:{cypress.mdx,jest.mdx,playwright.mdx,vitest.mdx}|02-pages/02-guides/upgrading:{codemods.mdx,version-10.mdx,version-11.mdx,version-12.mdx,version-13.mdx,version-14.mdx,version-9.mdx}|02-pages/03-building-your-application/01-routing:{01-pages-and-layouts.mdx,02-dynamic-routes.mdx,03-linking-and-navigating.mdx,05-custom-app.mdx,06-custom-document.mdx,07-api-routes.mdx,08-custom-error.mdx}|02-pages/03-building-your-application/02-rendering:{01-server-side-rendering.mdx,02-static-site-generation.mdx,04-automatic-static-optimization.mdx,05-client-side-rendering.mdx}|02-pages/03-building-your-application/03-data-fetching:{01-get-static-props.mdx,02-get-static-paths.mdx,03-forms-and-mutations.mdx,03-get-server-side-props.mdx,05-client-side.mdx}|02-pages/03-building-your-application/06-configuring:{12-error-handling.mdx}|02-pages/04-api-reference:{06-edge.mdx,08-turbopack.mdx}|02-pages/04-api-reference/01-components:{font.mdx,form.mdx,head.mdx,image-legacy.mdx,image.mdx,link.mdx,script.mdx}|02-pages/04-api-reference/02-file-conventions:{instrumentation.mdx,proxy.mdx,public-folder.mdx,src-folder.mdx}|02-pages/04-api-reference/03-functions:{get-initial-props.mdx,get-server-side-props.mdx,get-static-paths.mdx,get-static-props.mdx,next-request.mdx,next-response.mdx,use-params.mdx,use-report-web-vitals.mdx,use-router.mdx,use-search-params.mdx,userAgent.mdx}|02-pages/04-api-reference/04-config/01-next-config-js:{adapterPath.mdx,allowedDevOrigins.mdx,assetPrefix.mdx,basePath.mdx,bundlePagesRouterDependencies.mdx,compress.mdx,crossOrigin.mdx,devIndicators.mdx,distDir.mdx,env.mdx,exportPathMap.mdx,generateBuildId.mdx,generateEtags.mdx,headers.mdx,httpAgentOptions.mdx,images.mdx,isolatedDevBuild.mdx,onDemandEntries.mdx,optimizePackageImports.mdx,output.mdx,pageExtensions.mdx,poweredByHeader.mdx,productionBrowserSourceMaps.mdx,proxyClientMaxBodySize.mdx,reactStrictMode.mdx,redirects.mdx,rewrites.mdx,serverExternalPackages.mdx,trailingSlash.mdx,transpilePackages.mdx,turbopack.mdx,typescript.mdx,urlImports.mdx,useLightningcss.mdx,webVitalsAttribution.mdx,webpack.mdx}|02-pages/04-api-reference/04-config:{01-typescript.mdx,02-eslint.mdx}|02-pages/04-api-reference/05-cli:{create-next-app.mdx,next.mdx}|03-architecture:{accessibility.mdx,fast-refresh.mdx,nextjs-compiler.mdx,supported-browsers.mdx}|04-community:{01-contribution-guide.mdx,02-rspack.mdx}<!-- NEXT-AGENTS-MD-END -->
79+
80+
## Browser Automation
81+
82+
Use `agent-browser` for web automation. Run `agent-browser --help` for all commands.
83+
84+
Core workflow:
85+
86+
1. `agent-browser open <url>` - Navigate to page
87+
2. `agent-browser snapshot -i` - Get interactive elements with refs (@e1, @e2)
88+
3. `agent-browser click @e1` / `fill @e2 "text"` - Interact using refs
89+
4. Re-snapshot after page changes
90+
91+
<!-- opensrc:start -->
92+
93+
## Source Code Reference
94+
95+
Source code for dependencies is available in `opensrc/` for deeper understanding of implementation details.
96+
97+
See `opensrc/sources.json` for the list of available packages and their versions.
98+
99+
Use this source code when you need to understand how a package works internally, not just its types/interface.
100+
101+
### Fetching Additional Source Code
102+
103+
To fetch source code for a package or repository you need to understand, run:
104+
105+
```bash
106+
bunx opensrc <package> # npm package (e.g., bunx opensrc zod)
107+
bunx opensrc pypi:<package> # Python package (e.g., bunx opensrc pypi:requests)
108+
bunx opensrc crates:<package> # Rust crate (e.g., bunx opensrc crates:serde)
109+
bunx opensrc <owner>/<repo> # GitHub repo (e.g., bunx opensrc vercel/ai)
110+
```
111+
112+
<!-- opensrc:end -->

0 commit comments

Comments
 (0)