refactor: positive framing rewrite across toolkit (ADR-127, ADR-128)#199
Merged
refactor: positive framing rewrite across toolkit (ADR-127, ADR-128)#199
Conversation
…ents, skills, and pipelines (ADR-127) Systematic transformation of 113 files replacing prohibition-based instructions with action-based positive framing. Negative patterns (NEVER, do NOT, FORBIDDEN, Don't, Avoid, anti-pattern tables) rewritten to state the desired action while preserving all safety intent. Key transformations: - "NEVER edit code directly" → "Route all code modifications to domain agents" - "Anti-Patterns" sections → "Preferred Patterns" - "FORBIDDEN Patterns (HARD GATE)" → "Hard Gate Patterns" - "do NOT proceed autonomously" → "get explicit confirmation" - Fear-based warnings → outcome-based instructions 5 legitimate residuals preserved (code examples, writing samples, technical terms).
…nce rubrics (ADR-128) Refactor joy-check from a single writing-focused skill into a mode-dispatched skill with rubrics in reference files: - references/writing-rubric.md: joy-grievance spectrum (extracted from SKILL.md) - references/instruction-rubric.md: positive framing validation per ADR-127 - SKILL.md: core engine with auto-detection (agents/skills/pipelines → instruction mode, everything else → writing mode) Also create hooks/post-tool-lint-hint.py (was registered in settings.json but the file was missing). Suggests linters after Write/Edit, once per extension per session. All 6 tests pass.
ADR-118 renamed post-tool-lint-hint.py → posttool-lint-hint.py but settings.json wasn't updated, causing every Write/Edit to error with 'No such file'. Fix the reference and remove the duplicate file accidentally created during ADR-128 implementation.
…fix BRE regex in rubric PR review found two issues: 1. Phase 1 grep missed "- Avoid ..." bullet-point instructions (only caught heading-level "## Avoid"). Added ^-?\s*Avoid to the pattern. 2. Instruction rubric used \| (BRE alternation) but SKILL.md uses grep -E (ERE). Fixed to | for consistency.
…118) test_reddit_mod.py and test_video_transcript.py used direct imports (import reddit_mod) but scripts were renamed to kebab-case (reddit-mod.py) in ADR-118. Migrate to importlib.util with sys.modules registration. Also fix test_post_tool_lint.py to reference posttool-lint-hint.py (fused prefix name from ADR-118).
- score-component.py: accept 'Preferred Patterns' heading (ADR-127 rename) in addition to legacy 'Anti-Patterns' - test_voice_validator.py: fix SCRIPT_PATH to voice-validator.py (kebab-case) - test_voice_analyzer.py: fix SCRIPT_PATH to voice-analyzer.py (kebab-case) - test_reddit_mod.py: ruff format fix Reduces test failures from 86 to 3 (all 3 pre-existing on main).
…exists
The creation gate check in pretool-unified-gate.py used Path(file_path).exists()
which is unaffected by unittest.mock.patch("os.path.exists"). Changed to
os.path.exists(file_path) so the existing-file check works correctly both
in tests and in production. Fixes 2 pre-existing test failures.
…heck domain-research/SKILL.md: rewrite 6 remaining negative patterns to positive php-general-engineer.md: rewrite "forbidden" to positive instruction
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
writingmode (joy-grievance spectrum for human content) andinstructionmode (positive framing validation for agent/skill markdown per ADR-127 rules).posttool-lint-hint.py(file was renamed in ADR-118 but settings wasn't updated).Changes
Key transformations:
5 legitimate negative residuals preserved (code examples, writing samples, technical terms).
Test plan