feat: add anti-rationalization system with behavior checks and spec compliance#15
Open
feat: add anti-rationalization system with behavior checks and spec compliance#15
Conversation
Implement anti-rationalization system for detecting workflow violations: - Add anti-pattern registry with 8 built-in patterns for detecting workflow bypass, file reading violations, and manual edits - Add behavior verification strategy for UVS integration - Integrate automatic behavior check into `agent-foreman check` command - Add new rule template 08-anti-rationalization.md with guidance - Add --skip-behavior flag to bypass behavior check when needed The behavior check analyzes ai/progress.log and detects violations like: - Skipping CLI commands (next, check, done) - Reading index.json or task files for workflow decisions - Manual status editing instead of using CLI Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add comprehensive tests for: - behavior-check.ts (11.76% → 100%) - log-collector.ts (53.84% → 100%) - output.ts (69.56% → 100%) 57 new tests added across 3 test files. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add three key features inspired by superpowers project: 1. Evidence vs Claims (Iron Law) - Add explicit evidence requirements table to 08-anti-rationalization.md with gate function and forbidden claim patterns. Enforces "NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE". 2. Self-Review Workflow Step - Add mandatory self-review step between implementation and check in 01-workflow.md. Updated workflow from "next → implement → check → done" to include self-review. 3. Spec Compliance Check (Layer 2.5) - Add new verification layer that checks if implementation matches acceptance criteria EXACTLY before running code quality checks. Detects over-engineering and missing criteria. Runs automatically with --ai flag. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Remove Chinese translations from markdown files in src/rules/templates to maintain English-only documentation. Co-Authored-By: Claude Opus 4.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Key Features
1. Anti-Pattern Detection (
src/anti-patterns/)2. Behavior Strategy (
src/strategies/behavior-strategy/)3. Spec Compliance Check (
src/verifier/spec-compliance.ts)4. Workflow Improvements (
src/rules/templates/)next → implement → self-review → check → doneCoverage Improvements
Test plan
🤖 Generated with Claude Code