Skip to content

Add maintainability sensors to Uncle Bob coding harness - #470

Open
tninja wants to merge 2 commits into
mainfrom
agent/add-maintainability-sensors
Open

Add maintainability sensors to Uncle Bob coding harness#470
tninja wants to merge 2 commits into
mainfrom
agent/add-maintainability-sensors

Conversation

@tninja

@tninja tninja commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

Follow up on #469 by strengthening the bundled Uncle Bob coding-agent harness with maintainability sensors that cover cross-file and architectural risks, not just file/function-level checks.

This updates both the normal and diagnostics-aware harness prompts.

What changed

  • Add repository-native dependency-boundary checks to the gauntlet.
  • Add a semantic modularity review for non-trivial cross-file changes, focused on:
    • semantic duplication,
    • misplaced responsibilities,
    • inconsistent patterns,
    • dependency direction,
    • excessive change radius.
  • Treat coupling/complexity metrics as risk-triage signals rather than automatic proof of bad design.
  • Add explicit guidance for sensor conflicts so the agent does not mechanically optimize one metric while making another design dimension worse.
  • Add a final sensor gate immediately before EVIDENCE so completion is based on the final source state, with baseline/trend information when available.
  • Extend the evidence report with sensor status and maintainability-review findings.
  • Require a second independent modularity pass for high-risk Tier 3 architecture changes, since inferential reviews can surface different issues on separate runs.

Why

The original harness from #469 already covered strong computational feedback such as tests, types, lint, coverage, mutation testing, property testing, real execution, and security/supply-chain checks. The main gap was maintainability across file and module boundaries.

Birgitta Böckeler's article notes that computational sensors work especially well at the file/function level, while modularity and coupling require semantic interpretation. It also highlights that guide-only instructions to check sensors are unreliable, and that final sensor status, baselines/trends, and sensor conflicts are useful parts of a coding harness.

This PR incorporates those ideas without adding backend-specific runtime behavior or a new sidecar subsystem; it keeps the change scoped to the existing harness prompts.

Verification

  • Prompt-only change; no runtime Elisp behavior changed.
  • Normal and diagnostics-aware prompts were updated in parallel.
  • Branch diff contains only the two bundled Uncle Bob harness prompt files.

Source

Inspired by Birgitta Böckeler, “Maintainability sensors for coding agents” (Martin Fowler, May 27, 2026):
https://martinfowler.com/articles/sensors-for-coding-agents.html#ConclusionsAndOpenQuestions

Relevant sections include AI modularity review, Conclusions and open questions, and Integration with the coding harness.

@tninja
tninja marked this pull request as ready for review August 7, 2026 02:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c787230512

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +120 to +122
Record whether each sensor is clean, worse than baseline, unchanged, skipped, or
unavailable. Any applicable failing sensor blocks completion unless the human
explicitly accepts the risk.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Allow unchanged baseline sensor failures

When a repository already has a failing test, lint, type, or architecture sensor, this unconditional blocker prevents completion even if the result is unchanged from baseline, conflicting with the gauntlet's explicit allowance for pre-existing baseline failures. This makes routine work on repositories with known debt require human risk acceptance despite introducing no regression; block only sensors that are newly failing or worse than baseline. The diagnostics-aware copy contains the same issue.

Useful? React with 👍 / 👎.

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.

1 participant