Skip to content

Feature Request: Project-Specific Consistency Contract #330

Description

@fssrepository

Problem

During software development, teams establish recurring patterns, conventions, architectural decisions, and performance expectations. AI agents often recognize these patterns, but apply them only partially or inconsistently. They may repeatedly reinvent existing solutions instead of following the project’s established approach.

Typical examples include:

performing database queries inside loops;
choosing an O(n²) implementation when a more efficient pattern already exists;
introducing a new structure instead of reusing the project’s established pattern;
applying previously corrected behavior inconsistently across similar tasks.

This creates repetitive review work and reduces trust in agent-generated changes, especially in large or specialized codebases.

Proposal

The Harness specification should support a project-specific consistency contract between the user and the AI agent.

The contract would contain persistent project habits, rules, patterns, and review questions that the agent must consider before completing a task.

For example:

Is there already an established implementation pattern for this task?
Does the proposed change match the surrounding code?
Am I introducing queries inside a loop?
Is there a more efficient implementation?
Have similar corrections been made previously?
Does this change comply with the project’s architectural conventions?

The checklist could be executed as a single internal review step, rather than as a visible question-by-question interaction.

Learning and Persistence

When the user repeatedly corrects the same type of issue, the agent should be able to consolidate that feedback into reusable project knowledge.

This knowledge could be:

stored in an AGENTS.md-style file;
linked to the Harness configuration;
generated from previous agent conversations;
shipped with the Harness package;
customized similarly to a linter configuration.

The objective is not general model training, but persistent project-level learning that prevents the same corrections from becoming repetitive tasks.

Motivation

Character consistency is becoming an important concept in AI-generated video: each new scene must preserve previously established characteristics.

Software agents need a similar form of consistency. Each new implementation should preserve the project’s established architectural and coding characteristics.

In a multilingual Angular project with more than 600,000 lines of code, inconsistent reuse of existing frontend patterns can waste weeks. Current models are often capable of finding the correct patterns, but they do not reliably apply them throughout the project.

A formal consistency contract would make agent behavior more coherent, predictable, and trustworthy.

Suggested Capability

The Harness specification should define a standard mechanism for:

declaring project-specific rules and habits;
requiring agents to review them before acting;
extracting recurring corrections from conversation history;
updating the project knowledge base;
connecting this knowledge to files such as AGENTS.md;
optionally enforcing rules through automated validation.

The main goal is to build trust through consistency: once a user and an agent establish how something should be done, the same decision should not need to be taught again.

This structure has been generated by AI from a 14GB codex session db of mine. (was one month)
Maybe it's a layered skillset, but not the same.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions