Skip to content

Comments

docs(guardrails): enforce JSDoc with @returns on every new or modified function#3145

Closed
Copilot wants to merge 1 commit intodocs/enforce-jsdoc-on-functionsfrom
copilot/sub-pr-3143-again
Closed

docs(guardrails): enforce JSDoc with @returns on every new or modified function#3145
Copilot wants to merge 1 commit intodocs/enforce-jsdoc-on-functionsfrom
copilot/sub-pr-3143-again

Conversation

Copy link

Copilot AI commented Feb 22, 2026

Summary

  • What changed: Added JSDoc requirement to guardrails using @returns tag; added ERRORS.md entry for missing JSDoc on new functions
  • Why: Recent PRs introduced functions without JSDoc headers; codifies this as an always-on constraint
  • Supersedes / Related: N/A

Scope

  • Module(s) impacted: Documentation only (.github/copilot-instructions.md, ERRORS.md)
  • Cross-module impact: none
  • Risk level: low

Validation

  • npm run lint (not applicable - docs only)
  • npm test (not applicable - docs only)
  • Manual checks done: Verified @returns usage matches existing codebase convention (e.g., modules/tasks/repositories/tasks.repository.js)

Guardrails check

  • No secrets or credentials introduced (.env*, secrets/**, keys, tokens)
  • No risky rename/move of core stack paths
  • Changes remain merge-friendly for downstream projects
  • Tests added or updated when behavior changed (N/A - docs only)

Optional: Infra/Stack alignment details

Before vs After (key changes only)

Area Before After Notes
JSDoc requirement Implicit/unenforced Explicit guardrail Uses @returns to match codebase
Error tracking No entry ERRORS.md entry added Captures recurring mistake pattern
  • Upstream parity target / source: N/A
  • Automation or policy impact (CI, Dependabot, auto-merge, majors, permissions): None
  • Rollback plan: Git revert if needed

Notes for reviewers

  • Security considerations: None
  • Mergeability considerations: Standardized on @returns (not @return) to match existing Node codebase convention in repositories and services
  • Follow-up tasks (optional): None

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update guardrails to enforce JSDoc for functions docs(guardrails): enforce JSDoc with @returns on every new or modified function Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants