feat: add target repo examples and file layout guidance
This commit is contained in:
28
examples/node-project/AGENTS.md
Normal file
28
examples/node-project/AGENTS.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Project overview
|
||||
This repository is a Node.js + TypeScript service for handling billing and subscription events.
|
||||
|
||||
## Important directories
|
||||
- `src/routes/` — HTTP handlers
|
||||
- `src/services/` — business logic
|
||||
- `src/db/` — database access
|
||||
- `tests/` — unit and integration tests
|
||||
- `scripts/` — development and maintenance scripts
|
||||
|
||||
## Commands
|
||||
- install: `pnpm install`
|
||||
- test: `pnpm test`
|
||||
- lint: `pnpm lint`
|
||||
- typecheck: `pnpm tsc --noEmit`
|
||||
- build: `pnpm build`
|
||||
|
||||
## Working rules
|
||||
- Prefer minimal diffs
|
||||
- Do not change database schema unless explicitly requested
|
||||
- Do not upgrade dependencies unless explicitly requested
|
||||
- Add or update tests for behavior changes
|
||||
- Prefer targeted validation first, then broader validation if needed
|
||||
|
||||
## Additional harness files
|
||||
See `ai/project-map.md`, `ai/task-templates.md`, and `ai/risk-guardrails.md`.
|
||||
13
examples/node-project/ai/harness-health.md
Normal file
13
examples/node-project/ai/harness-health.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Harness Health
|
||||
|
||||
- project map clarity: partial
|
||||
- validation commands: strong
|
||||
- fast feedback: partial
|
||||
- task templates: partial
|
||||
- guardrails: strong
|
||||
- doc-code alignment: partial
|
||||
|
||||
## Top priorities
|
||||
1. Add a faster unit-test-only command
|
||||
2. Document generated-code boundaries more clearly
|
||||
3. Keep AGENTS.md aligned with actual routes and services
|
||||
13
examples/node-project/ai/project-map.md
Normal file
13
examples/node-project/ai/project-map.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Project Map
|
||||
|
||||
## Entry points
|
||||
- `src/index.ts` — app bootstrap
|
||||
- `src/routes/` — route registration
|
||||
|
||||
## Main layers
|
||||
- routes -> services -> db
|
||||
- shared utilities live under `src/lib/`
|
||||
|
||||
## Notes
|
||||
- Integration tests may require a local database service
|
||||
- Some generated types may exist under `src/generated/`; avoid editing them directly unless asked
|
||||
7
examples/node-project/ai/risk-guardrails.md
Normal file
7
examples/node-project/ai/risk-guardrails.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Risk Guardrails
|
||||
|
||||
- Do not edit `src/generated/` unless the task is specifically about code generation
|
||||
- Do not update lockfiles unless dependency changes are required
|
||||
- Do not disable tests to achieve a passing run
|
||||
- Treat deployment and CI files as high-risk areas
|
||||
- Prefer package- or module-scoped validation before full-suite validation
|
||||
20
examples/node-project/ai/task-templates.md
Normal file
20
examples/node-project/ai/task-templates.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Task Templates
|
||||
|
||||
## Bugfix
|
||||
Goal: fix a specific bug with minimal API change.
|
||||
|
||||
Required flow:
|
||||
1. Read relevant implementation and tests
|
||||
2. Summarize likely root cause briefly
|
||||
3. Implement the smallest safe fix
|
||||
4. Run targeted tests, then broader checks if needed
|
||||
5. Report changed files and residual risks
|
||||
|
||||
## Feature
|
||||
Goal: add a small feature without broad refactors.
|
||||
|
||||
Required flow:
|
||||
1. Inspect related modules and interfaces
|
||||
2. Preserve public API unless the task says otherwise
|
||||
3. Add tests for new behavior
|
||||
4. Run lint, typecheck, and tests
|
||||
Reference in New Issue
Block a user