Skip to content

chore(agents): add comment/reference rule, drop no-push guardrail#1168

Merged
dgarros merged 2 commits into
stablefrom
dga/chore-context-a5y7m
Jul 12, 2026
Merged

chore(agents): add comment/reference rule, drop no-push guardrail#1168
dgarros merged 2 commits into
stablefrom
dga/chore-context-a5y7m

Conversation

@dgarros

@dgarros dgarros commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Tightens the guidance coding agents follow, based on behaviors observed across recent PRs, and retires one stale guardrail now that agents operate more autonomously.

Key Changes

  • Agents comment sparingly — only where code can't convey intent, kept short — instead of adding verbose low-value comments.
  • Agents never reference ephemeral artifacts (specs, tasks, tickets, issue numbers, user stories, or the current spec-kit command name) in any file, including AGENTS.md and CLAUDE.md, so archived planning docs don't leak into the codebase.
  • Type-ignore comments use the standard # type: ignore[<code>] form that mypy/pyright/pytype honor, never the dead # ty: ignore.
  • Removed the "never push to GitHub automatically" boundary from AGENTS.md.

Test Plan

  • uv run invoke lint-docs passes (rumdl reports no issues).
  • New rule surfaces through the adapter symlink: ls -L .claude/rules/ lists code-comments.md.

Summary by cubic

Adds a global rule for agent comments and references with standardized # type: ignore[...] usage. Replaces the stale "no auto-push" boundary with a "never edit CLAUDE.md" rule to route edits to AGENTS.md.

  • Refactors
    • Added .agents/rules/code-comments.md (applies to all files): comment sparingly; never reference ephemeral artifacts; use # type: ignore[<code>] only.
    • Updated AGENTS.md: removed "never push to GitHub automatically"; added "never update CLAUDE.md (edit AGENTS.md instead)".

Written for commit 89ebe4b. Summary will update on new commits.

Review in cubic

Add .agents/rules/code-comments.md (applies to all files): comment
sparingly, never reference ephemeral artifacts (specs/tasks/tickets/
spec-kit command names) in any file, and use standard # type: ignore.
Remove the stale "never push to GitHub" boundary from AGENTS.md now
that agents run more autonomously.
@dgarros dgarros added type/housekeeping Maintenance task ci/skip-changelog Don't include this PR in the changelog labels Jul 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

CLAUDE.md is a thin @AGENTS.md router; add a Never-boundary so agents
edit AGENTS.md instead.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 89ebe4b
Status: ✅  Deploy successful!
Preview URL: https://47be20fc.infrahub-sdk-python.pages.dev
Branch Preview URL: https://dga-chore-context-a5y7m.infrahub-sdk-python.pages.dev

View logs

@dgarros dgarros marked this pull request as ready for review July 12, 2026 09:58
@dgarros dgarros requested review from a team and saltas888 July 12, 2026 09:59
@dgarros dgarros merged commit 43e7297 into stable Jul 12, 2026
15 checks passed
@dgarros dgarros deleted the dga/chore-context-a5y7m branch July 12, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/skip-changelog Don't include this PR in the changelog type/housekeeping Maintenance task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants