Skip to content

develop and fix-ci prompts: never modify linter (ruff, pyright, etc.) configuration without explicit request #89

Description

@monkut

Problem

The develop and fix-ci action prompts do not explicitly forbid modifying linter or type-checker configuration. When the agent encounters linter errors, type-checker complaints, or rule violations, it can be tempted to "fix" them by relaxing or disabling rules in pyproject.toml, .ruff.toml, pyrightconfig.json, .pre-commit-config.yaml, etc., rather than fixing the code.

This silently weakens the project's quality gates and is hard to spot in review.

Expected behaviour

Both DEVELOP_AGENT_PROMPT and FIXCI_AGENT_PROMPT must contain an explicit constraint:

Do not modify linter, formatter, or type-checker configuration (e.g. pyproject.toml [tool.ruff] / [tool.pyright] sections, .ruff.toml, pyrightconfig.json, .pre-commit-config.yaml, ESLint/Prettier configs) to silence errors. Always fix the code, not the config. The only exception is when the originating issue explicitly requests a configuration change.

The constraint should also forbid # noqa, # type: ignore, # pyright: ignore, and similar inline suppression comments unless the issue explicitly asks for them or there is a documented external blocker (e.g. a known third-party-stub bug).

Actual behaviour

Currently DEVELOP_AGENT_PROMPT (askcc/definitions.py:186-285) and FIXCI_AGENT_PROMPT (askcc/definitions.py:542-596) say:

  • develop: "Conform to the project's existing style, structure, and conventions" and "Make focused, minimal changes — do not refactor unrelated code"
  • fix-ci: "Apply minimal, targeted fixes — do not refactor unrelated code" and "For lint errors: run `uv run ruff format .` and `uv run ruff check --fix .`"

Neither prompt explicitly rules out relaxing config or sprinkling suppression comments, leaving the door open for the agent to take that shortcut.

Suggested fix

Add a new constraint section to both prompts. Example wording:

Configuration boundaries (do not cross unless the issue explicitly requests it):
- Do NOT modify linter, formatter, or type-checker config files
  (pyproject.toml [tool.ruff]/[tool.pyright]/[tool.mypy] sections, .ruff.toml,
  pyrightconfig.json, mypy.ini, .pre-commit-config.yaml, ESLint/Prettier configs)
  to silence errors. Fix the code, not the config.
- Do NOT add `# noqa`, `# type: ignore`, `# pyright: ignore`, `eslint-disable`,
  or similar inline suppression comments. Fix the underlying issue.
- The only exceptions are when the originating issue explicitly requests a
  configuration or rule change, or when a known third-party bug requires
  documented suppression — in which case add a comment explaining why.

For develop, place it next to the existing "Anti-rationalization" / "Security checklist" sections.
For fix-ci, place it just before "Fixing Failures" so it gates the entire fix loop.

Acceptance Criteria

  • DEVELOP_AGENT_PROMPT (in askcc/definitions.py) contains a Configuration boundaries section that explicitly forbids modifying linter/formatter/type-checker config files to silence errors
  • FIXCI_AGENT_PROMPT (in askcc/definitions.py) contains the same Configuration boundaries section, placed before the ## Fixing Failures heading
  • Both prompts list the specific config files/sections covered: pyproject.toml [tool.ruff]/[tool.pyright]/[tool.mypy], .ruff.toml, pyrightconfig.json, mypy.ini, .pre-commit-config.yaml, ESLint/Prettier configs
  • Both prompts forbid inline suppression comments: # noqa, # type: ignore, # pyright: ignore, eslint-disable
  • Both prompts document the narrow exceptions: (a) issue explicitly requests a config/rule change, or (b) documented third-party bug requires suppression with explanatory comment
  • tests/test_askcc.py contains a new TestConfigBoundaryConstraints test class (or equivalent) with assertions that the constraint strings exist in both prompts
  • FIXCI_AGENT_PROMPT is added to the imports in tests/test_askcc.py
  • uv run pytest passes (all existing + new tests green)
  • uv run ruff check passes with no issues
  • uv run pyright passes with 0 errors

Dependencies

None identified. The change is contained to askcc/definitions.py (prompt strings) and tests/test_askcc.py (new assertions). No external API, schema, or runtime behaviour changes.

Implementation Plan

  1. Add Configuration boundaries block to DEVELOP_AGENT_PROMPT (askcc/definitions.py:186-285)

    • Insert the new block between the existing Security checklist section (ends ~line 260) and the PR description section (starts ~line 262).
    • Use the wording from the "Suggested fix" code block above. Keep the heading exactly Configuration boundaries (do not cross unless the issue explicitly requests it): so tests can assert on it.
  2. Add the same Configuration boundaries block to FIXCI_AGENT_PROMPT (askcc/definitions.py:542-596)

    • Insert the new block between the ## Identifying CI Failures section (ends after Categorize the failures at ~line 575) and the ## Fixing Failures heading (~line 576), as a top-level ## Configuration boundaries Markdown section so it gates the entire fix loop.
    • Use identical wording to the develop prompt for consistency, adjusting only the heading style to match the ## Section Markdown format used elsewhere in FIXCI_AGENT_PROMPT.
  3. Add unit tests in tests/test_askcc.py

    • Add FIXCI_AGENT_PROMPT to the from askcc.definitions import (...) block at tests/test_askcc.py:13-20.
    • Add a new test class TestConfigBoundaryConstraints (placed after TestReviewprPromptMergeGuard near line 282) with at minimum the following test methods:
      • test_develop_prompt_includes_config_boundaries_heading — asserts Configuration boundaries substring is present in DEVELOP_AGENT_PROMPT.
      • test_develop_prompt_forbids_modifying_linter_config — asserts pyproject.toml, [tool.ruff], [tool.pyright], .pre-commit-config.yaml mentions and the phrase Fix the code, not the config. appear in DEVELOP_AGENT_PROMPT.
      • test_develop_prompt_forbids_inline_suppression_comments — asserts # noqa, # type: ignore, # pyright: ignore, eslint-disable all appear in DEVELOP_AGENT_PROMPT.
      • test_develop_prompt_documents_exceptions — asserts the wording about "issue explicitly requests" and "third-party bug" exception appears in DEVELOP_AGENT_PROMPT.
      • Mirror the four assertions above for FIXCI_AGENT_PROMPT.
  4. Verification gate (run from worktree root):

    • uv run pytest — expect all tests to pass, including the new TestConfigBoundaryConstraints class.
    • uv run ruff check — expect no issues.
    • uv run pyright — expect 0 errors.
    • Record results in the PR description under a ## Verification section per the develop prompt's existing requirement.
  5. Open PR

    • Branch name: feature/89-config-boundary-prompts (or similar).
    • PR title: :bug: Forbid linter/type-checker config relaxation in develop and fix-ci prompts (closes #89)
    • Body: standard Summary / Verification / Key Flows sections. The change is prompt-string-only, so a Key Flows mermaid diagram can be skipped per the develop prompt guidance for trivial changes.

Risks or open questions

  • Wording fidelity: The exact constraint text needs to match between both prompts and the tests. Recommend extracting the block into a module-level constant (e.g. CONFIG_BOUNDARIES_CONSTRAINT) and concatenating it into both prompts so the two stay in sync. This is a small refactor but reduces drift risk.
  • Heading style mismatch: DEVELOP_AGENT_PROMPT uses prose-style section headers (Anti-rationalization — do not take these shortcuts:), while FIXCI_AGENT_PROMPT uses Markdown ## Section headings. The plan above accounts for this, but the shared-constant approach (above) needs a small heading-prefix adjustment per prompt.
  • No behavioural change at runtime: Only prompt strings sent to downstream Claude agents change. There is no migration, no API change, no settings change.

Activity

self-assigned this
on Apr 27, 2026

monkut commented on Apr 27, 2026

@monkut
OwnerAuthor

Plan summary

Updated the issue description with finalized Acceptance Criteria, Dependencies, and Implementation Plan sections, and assigned the issue.

What changed in the description

  • Acceptance Criteria — promoted from the original draft (## Acceptance criteria) into a finalized ## Acceptance Criteria checklist. Expanded from 6 → 10 verifiable items, naming the test class, the new import in tests/test_askcc.py, and the three verification commands (uv run pytest, uv run ruff check, uv run pyright).
  • Dependencies — new ## Dependencies section. None identified; the change is contained to askcc/definitions.py prompt strings and tests/test_askcc.py assertions, with no runtime/API/schema impact.
  • Implementation Plan — new ## Implementation Plan section with five steps: insert the Configuration boundaries block into DEVELOP_AGENT_PROMPT (between the existing Security checklist and PR description sections in askcc/definitions.py:186-285), insert the same block into FIXCI_AGENT_PROMPT (before ## Fixing Failures in askcc/definitions.py:542-596) with ## Section Markdown style to match its surrounding format, add a TestConfigBoundaryConstraints test class plus a FIXCI_AGENT_PROMPT import in tests/test_askcc.py, run the three verification commands, and open the PR.

Risks / open questions

  • Drift risk between the two prompts. The constraint text must stay identical in both prompts and in the test assertions. Recommend extracting the block into a module-level constant (e.g. CONFIG_BOUNDARIES_CONSTRAINT) and concatenating it into both prompts. Flagged in the issue's "Risks or open questions" section — happy to take guidance either way; default is to use the shared constant.
  • Heading style mismatch. DEVELOP_AGENT_PROMPT uses prose section headers (Anti-rationalization — do not take these shortcuts:) while FIXCI_AGENT_PROMPT uses Markdown ## Section headings. The plan accommodates both; the shared-constant approach above needs a small per-prompt heading prefix.
  • No behavioural runtime change. Only the prompt strings sent to downstream Claude agents are modified — no migration, settings change, or public API change.

Ready for /develop once the drift-mitigation question is decided (or proceed with the shared-constant default).

:tokens-used: model: N/A, input: 25, output: 9145

added
action:developIssue is ready for development
and removed
action:planIssue is ready for planning
on Apr 27, 2026

monkut commented on Apr 27, 2026

@monkut
OwnerAuthor

Implementation summary

PR #91 implements the Configuration boundaries constraint described in this issue.

Changes

  • askcc/definitions.py:

    • Added a shared CONFIG_BOUNDARIES_BODY constant containing the bullet-list constraint text (forbids modifying pyproject.toml [tool.ruff]/[tool.pyright]/[tool.mypy], .ruff.toml, pyrightconfig.json, mypy.ini, .pre-commit-config.yaml, ESLint/Prettier configs, and adding # noqa / # type: ignore / # pyright: ignore / eslint-disable comments — plus the documented narrow exceptions).
    • Composed the body into DEVELOP_CONFIG_BOUNDARIES (prose-style heading matching the rest of DEVELOP_AGENT_PROMPT) and FIXCI_CONFIG_BOUNDARIES (Markdown ## heading matching FIXCI_AGENT_PROMPT's style).
    • Inserted DEVELOP_CONFIG_BOUNDARIES between the existing Security checklist and PR description sections in DEVELOP_AGENT_PROMPT.
    • Inserted FIXCI_CONFIG_BOUNDARIES between ## Identifying CI Failures and ## Fixing Failures in FIXCI_AGENT_PROMPT so it gates the entire fix loop.
  • tests/test_askcc.py:

    • Imported FIXCI_AGENT_PROMPT.
    • Added TestConfigBoundaryConstraints class with 9 assertions covering: the Configuration boundaries heading, the specific config files listed, the forbidden inline suppression comments, the documented exceptions, and the placement of the boundaries block before ## Fixing Failures in the fix-ci prompt.

Drift mitigation

Followed the "shared constant" recommendation from the plan — both prompts derive from the same CONFIG_BOUNDARIES_BODY string, so the wording cannot drift.

Verification

  • uv run pytest — 195 passed (9 new tests in TestConfigBoundaryConstraints)
  • uv run ruff check — All checks passed
  • uv run pyright — 0 errors, 0 warnings

:tokens-used: model: N/A, input: 52, output: 20454

added and removed
action:developIssue is ready for development
on Apr 27, 2026
added a commit that references this issue on Apr 27, 2026
a8a9c3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions