feat(rules): expand kind taxonomy to 9 values + backfill CLI#77
Open
csacsi wants to merge 12 commits into
Open
feat(rules): expand kind taxonomy to 9 values + backfill CLI#77csacsi wants to merge 12 commits into
csacsi wants to merge 12 commits into
Conversation
Introduces rule_kinds.py with KINDS tuple, KIND_DESCRIPTIONS dict, and is_valid_kind() — single-sourced taxonomy for the rule `kind` field, importable by all later tasks in the rule-kinds-taxonomy plan. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ion_signals Mirror the truthiness guards already applied to forbidden_imports and allowed_dirs: an empty string pattern_name and an empty violation_signals list now fall through to coding_practice instead of firing the branch. Adds 6 tests (36 total) covering both fix directions and infra field paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n failure - main() now catches json.JSONDecodeError and prints a friendly message instead of a traceback - _atomic_write_json appends \\n (POSIX trailing newline) and unlinks the .tmp file on any failure - Two new tests cover the JSONDecodeError path and the trailing-newline contract (9 passed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add required `kind` field to the scan rule schema and output template, with the full 9-value enum and a reference to Step-6 for definitions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…npm-package/assets Copies two new Python scripts (rule_kinds.py, backfill_kinds.py) and updated canonical files (migrate_blueprint_rules.py, step-6-rule-synthesis.md, archie-scan.md) to npm-package/assets/, and registers the two new scripts in the archie.mjs install-time copy list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
kindtaxonomy from 6 → 9 values:tradeoff,layering,infrastructurecarved out as their own kinds (previously lumped undersemantic_pattern/coding_practice).archie/standalone/rule_kinds.py— single source of truth (KINDS,KIND_DESCRIPTIONS,is_valid_kind,classify_kind).backfill_kinds.pyCLI — heuristic classifier populates missing/invalid `kind` on legacy `.archie/rules.json` (90% of real-world rules were missing it).Motivation
Survey of 642 rules across 7 real projects showed:
The new 9-kind taxonomy reflects what id-prefixes the AI was already choosing organically (`layer-`, `tradeoff-`, `chain-`, `pattern-`, etc.).
Validation
Known limitations (by design)
Plan
`docs/superpowers/plans/2026-05-23-rule-kinds-taxonomy.md` (8 tasks, all done via subagent-driven TDD).
Test plan
🤖 Generated with Claude Code