Skip to content

Strengthen coding standards guardrails and verify PR #593 compliance#596

Draft
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/mcp-server-coding-standards-633c
Draft

Strengthen coding standards guardrails and verify PR #593 compliance#596
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/mcp-server-coding-standards-633c

Conversation

@cursor

@cursor cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

Automated compliance review against docs/coding-standards.md (triggered by PR #593). The codebase already passes all architecture guardrails; this PR strengthens ongoing enforcement and applies minor standards fixes to the IDP toolset changes.

Review findings for PR #593 (IDP create/update)

  • Compliant: changes are registry-driven toolset definitions only (no new MCP tool handlers)
  • Compliant: operationPolicy, bodySchema, bodyBuilder, and identifierFields are correctly declared
  • Compliant: no forbidden imports, console.log, or raw fetch() in toolsets
  • Fixed: moved scorecardStatsExtract to shared src/registry/extractors.ts (standards §3)
  • Fixed: added deepLinkTemplate to scorecard_check

Standards enforcement improvements

  • Added tests/coding-standards/constants.ts — single source of truth for the 11 allowed MCP tools
  • Added tests/coding-standards/agents-consistency.test.ts — prevents AGENTS.md drift (11 tools, Zod v4)
  • Added tests/coding-standards/security.test.ts — secret metadata contract + no api_key_secret echo in workflow execute body
  • Standards suite: 87 tests (was 80); full suite: 2504 tests

Note on pasted standards snapshot

The automation prompt referenced 10 tools and Zod v3; the canonical repo standard is 11 tools (includes harness_schema) and Zod v4. docs-consistency.test.ts and the new agents-consistency.test.ts guard against reverting to the outdated snapshot.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Checklist

  • pnpm test passes (2504 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes (87 architecture guardrails)
  • pnpm docs:check passes

Coding Standards (registry-driven MCP model)

  • No new server.registerTool() calls
  • Shared response extractors from src/registry/extractors.ts
  • identifierFields and scope declared on resources
  • No console.log() in src/
Open in Web View Automation 

harjas27 and others added 3 commits July 8, 2026 16:40
Expose write operations in the idp toolset so agents can manage catalog entities via YAML and scorecards/checks via JSON bodies round-tripped from harness_get.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
- Move scorecardStatsExtract to shared extractors.ts (standards §3)
- Add deepLinkTemplate to scorecard_check resource
- Add tests/coding-standards/constants.ts as single source for allowed MCP tools
- Add AGENTS.md and security consistency tests (87 standards tests total)
- Centralize ALLOWED_MCP_TOOLS in architecture and docs-consistency tests

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ cursoragent
❌ harjas27
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants