-
Notifications
You must be signed in to change notification settings - Fork 13
docs: Update AGENTS.md #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add comprehensive agent guide covering repository structure and tooling workflows - Document coding/testing patterns, CI/CD expectations, and documentation templates
Completed Working on "Auto PR Description"✅ Workflow completed successfully. |
Completed Working on "Auto PR Description"✅ Workflow completed successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Findings: 0 BLOCKER / 0 CRITICAL / 0 MAJOR / 2 MINOR / 0 SUGGESTION / 0 PRAISE.
Key themes:
- Documentation references don�t match the current repository assets (README only embeds
docs/log.png). - The AGENTS guide overstates how instrumentation leverages
ModuleRef, which could mislead future contributors about the actual instantiation path.
Next steps:
- Update the AGENTS asset section so it reflects exactly which images are referenced today.
- Clarify the instrumentation description to distinguish the
forRootfactory path from theforRootAsyncModuleRef-based flow.
AGENTS.md
Outdated
| │ └── trace.service.ts # Service exposed through module exports | ||
| ├── docs/ | ||
| │ ├── migration-5-to-6.md # Example of structured guide w/ before/after blocks | ||
| │ ├── log.png & trace-flow.jpeg # Assets referenced by README |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor]: README only references log.png
@@ Repository Structure & Key Directories (lines ~20-24) states that both log.png and trace-flow.jpeg are referenced by README, but a repo search shows README embeds only ./docs/log.png. Please align the guide with the actual docs to avoid sending agents on a goose chase for an unused asset.
Suggested fix: Adjust the bullet to mention only log.png (or add the missing README reference to trace-flow.jpeg before documenting it here).
AGENTS.md
Outdated
|
|
||
| ## Coding & Testing Patterns | ||
| - **Instrumentation abstraction:** `src/trace/instrumentation/Instrumentation.ts` defines the interface, while `base-trace.instrumentation.ts` centralizes metadata lookup. Concrete instrumentations live under the same directory with paired specs (e.g., `controller.instrumentation.ts` + `.spec.ts`). | ||
| - **Default coverage for Nest pieces:** `OpenTelemetryModule` exports `defaultInstrumentation` (controllers, GraphQL resolvers, guards, interceptors, event emitters, schedulers, pipes, console logger) and ensures each class’ `setupInstrumentation()` runs through `ModuleRef` (see `src/open-telemetry.module.ts`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[minor]: ModuleRef reference is inaccurate
@@ Coding & Testing Patterns (lines ~52-56) claims defaultInstrumentation ensures every instrumentation’s setupInstrumentation() runs through ModuleRef, yet src/open-telemetry.module.ts shows that the regular forRoot path uses the buildInstrumentation factory and never touches ModuleRef (only forRootAsync does). Please update the description so agents understand how instrumentation is actually instantiated.
Suggested fix: Clarify that forRoot wires instrumentation via the buildInstrumentation factory (without ModuleRef) and reserve the ModuleRef note for the async factory, or adjust the code to match the documented behavior.
Summary
🔄 Overcut automatically updated AGENTS.md with latest repository analysis.
Summary
This PR introduces a comprehensive AGENTS.md guide to help autonomous contributors quickly understand how to work within the repository. It documents the project’s purpose, structure, tooling, coding/testing conventions, CI/CD workflows, documentation patterns, and operational rules tailored for future agents.
Changes
Commits
Testing
npm ci && npm run lint && npm run test:cov && npm run buildto validate the command sequence documented in the guide