Conversation
Adds go-postconditions as a git submodule and integrates it into the Makefile with new targets: - make sanity: Run complexity, duplication, unused param checks - make sanity-report: Generate detailed quality report - make sanity-file: Check specific files - make quick/refactor/behavior/prepr: Stage-based validation These checks enforce code quality standards and will be required before PR submission. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add foundational documentation for harness engineering workflow: - PRINCIPLES.md: 10 core engineering principles (simplicity first, parse at boundaries, flat over nested, etc.) - CODE_STYLE.md: Anti-over-engineering rules with Go examples, complexity budgets - REVIEW.md: PR review checklist for humans and agents - ARCHITECTURE.md: Layer dependencies, module structure, allowed and forbidden import patterns These docs establish coding standards and will be referenced by AI agents during code generation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ADR (Architecture Decision Records) directory with: - index.md: ADR catalog - ADR-template.md: Template for new decisions - ADR-001-cgo-disabled.md: Documents CGO_ENABLED=0 decision for portability and its DNS resolution consequences ADRs capture important architectural decisions with context, rationale, and consequences. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add quality tracking for harness engineering workflow: - baseline-report.md: Initial sanity report showing 90 issues across 5 linters, 2 high-complexity functions - tech-debt-tracker.md: Tracks grandfathered complexity violations and ratchet schedule for reducing budgets over time Key findings: - validateImageCmd: complexity 52 (target 12) - Evaluate: complexity 40 (target 12) - Initial GOCYCLO_MAX set to 55, will ratchet down Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move architecture documentation to standard docs/ location: - design-docs/index.md: Design document catalog - design-docs/package-filtering.md: PolicyResolver architecture, scoring system, term-based filtering - design-docs/rule-filtering.md: Pre/post evaluation filtering, UnifiedPostEvaluationFilter, severity logic - design-docs/vsa-architecture.md: 9-layer VSA architecture, storage backends, retrieval mechanisms These docs are now accessible to all agents and tools, not just Cursor-specific rules. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update rule_filtering_process.mdc to reflect current code: The documented "INCORRECT LOGIC" bug in baseDeterminePackageInclusion was already fixed in the codebase. Updated documentation to show the correct current implementation which only includes packages that contain at least one included rule. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Refactor agent documentation for harness engineering workflow: AGENTS.md (244 → 95 lines): - Add documentation map pointing to docs/ - Add code quality commands (make sanity) - Remove detailed architecture (now in docs/ARCHITECTURE.md) - Remove detailed filtering (now in docs/design-docs/) - Keep essential commands and troubleshooting CLAUDE.md: - Add mandatory workflow section - Require make sanity before PR submission - Add key constraints (no over-engineering) - Add documentation map - Add troubleshooting for sanity failures Claude Code will now automatically read CLAUDE.md and follow the harness engineering workflow. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add script to check for stale documentation by comparing git timestamps of code files vs their corresponding documentation. Also add code-to-doc mapping table in CLAUDE.md so agents know which docs to update when modifying specific code areas. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Properly separate entries and add .claude/ directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding |
Review Summary by QodoImplement harness engineering with code quality enforcement and documentation
WalkthroughsDescription• Implement harness engineering framework with code quality enforcement • Add comprehensive engineering documentation (principles, style, architecture) • Integrate go-postconditions for automated sanity checks • Create Architecture Decision Records (ADRs) and design documentation • Simplify AGENTS.md and CLAUDE.md with focused guidance Diagramflowchart LR
A["Engineering Framework"] --> B["Code Quality Checks"]
A --> C["Documentation"]
B --> D["make sanity targets"]
B --> E["Complexity budgets"]
C --> F["PRINCIPLES.md"]
C --> G["ARCHITECTURE.md"]
C --> H["Design Docs"]
C --> I["ADRs"]
D --> J["Pre-PR validation"]
File Changes1. hack/check-docs-freshness.sh
|
Code Review by Qodo
1. Sanity target breaks checkout
|
| POSTCONDITIONS_MK := make/postconditions/Makefile | ||
|
|
||
| .PHONY: sanity | ||
| sanity: ## Run sanity checks (complexity, duplication, unused params) | ||
| @$(MAKE) -f $(POSTCONDITIONS_MK) check-sanity | ||
|
|
||
| .PHONY: sanity-report | ||
| sanity-report: ## Generate sanity report with summary | ||
| @$(MAKE) -f $(POSTCONDITIONS_MK) report-sanity | ||
|
|
||
| .PHONY: sanity-file | ||
| sanity-file: ## Run sanity checks on specific files (FILES=./path/to/file.go) | ||
| @$(MAKE) -f $(POSTCONDITIONS_MK) check-sanity FILES="$(FILES)" | ||
|
|
||
| .PHONY: quick | ||
| quick: ## Fast validation for small changes | ||
| @$(MAKE) -f $(POSTCONDITIONS_MK) quick | ||
|
|
||
| .PHONY: refactor | ||
| refactor: ## Validation for structural changes (includes unused function scan) | ||
| @$(MAKE) -f $(POSTCONDITIONS_MK) refactor | ||
|
|
||
| .PHONY: behavior | ||
| behavior: ## Validation for behavior changes (full quality + tests + coverage) | ||
| @$(MAKE) -f $(POSTCONDITIONS_MK) behavior | ||
|
|
||
| .PHONY: prepr | ||
| prepr: ## Pre-PR stabilization checks | ||
| @$(MAKE) -f $(POSTCONDITIONS_MK) prepr |
There was a problem hiding this comment.
1. Sanity target breaks checkout 🐞 Bug ⛯ Reliability
make sanity (and related targets) executes make -f make/postconditions/Makefile, but the repository checkout workflows don’t fetch submodules, so that Makefile won’t exist and the target will fail. This makes the newly “required” sanity workflow non-functional in typical clones/CI.
Agent Prompt
## Issue description
`make sanity` invokes `make/postconditions/Makefile`, but common checkouts (including GitHub Actions) do not fetch submodules by default. This causes `make sanity` to fail with a missing Makefile.
## Issue Context
The repo now treats `make sanity` as a required quality gate (per AGENTS/CLAUDE/docs), so it must work in a fresh clone and in CI.
## Fix Focus Areas
- Add submodule initialization to CI checkout (e.g., `submodules: recursive` in `actions/checkout`) for workflows that will run sanity
- .github/workflows/lint.yaml[49-53]
- .github/workflows/checks-codecov.yaml[45-50]
- .github/workflows/release.yaml[81-85]
- Add a Makefile guard that errors with a clear instruction when `make/postconditions/Makefile` is missing (or add a `make submodules` prerequisite)
- Makefile[236-266]
- (Optional) Document the required `git submodule update --init --recursive` step near the `make sanity` instructions
- AGENTS.md[16-27]
- CLAUDE.md[12-31]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This is an implementation of OpenAI's harness engineering paper - https://openai.com/index/harness-engineering/