claude-dev-env 2.28.0 → 2.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/.agents/skills-archived/pr-loop-cloud-transport/reference/identity-and-hooks.md +1 -1
  2. package/audit-rubrics/category_rubrics/category-o-docstring-vs-impl-drift.md +16 -29
  3. package/audit-rubrics/prompts/category-o-docstring-vs-impl-drift.md +2 -2
  4. package/docs/CODE_RULES.md +3 -3
  5. package/docs/agent-spawn-protocol.md +1 -1
  6. package/docs/references/prose-style-enforcement.md +5 -9
  7. package/hooks/blocking/AGENTS.md +3 -13
  8. package/hooks/blocking/code_rules_docstrings.py +10 -2138
  9. package/hooks/blocking/code_rules_enforcer.py +0 -121
  10. package/hooks/blocking/code_rules_imports_logging.py +1 -236
  11. package/hooks/blocking/code_rules_shared.py +23 -0
  12. package/hooks/blocking/code_rules_test_layout.py +8 -8
  13. package/hooks/blocking/config/prose_style_enforcement_constants.py +4 -2
  14. package/hooks/blocking/config/test_prose_style_enforcement_constants.py +5 -1
  15. package/hooks/blocking/precommit_code_rules_gate.py +8 -43
  16. package/hooks/blocking/state_description_blocker.py +1 -7
  17. package/hooks/blocking/test_code_rules_enforcer_cap_meta.py +0 -1
  18. package/hooks/blocking/test_code_rules_enforcer_dispatch_wiring.py +0 -8
  19. package/hooks/blocking/test_code_rules_enforcer_module_docstring_roster.py +11 -112
  20. package/hooks/blocking/test_code_rules_enforcer_narrow_edit.py +0 -1
  21. package/hooks/blocking/test_code_rules_enforcer_split_entry_1.py +1 -18
  22. package/hooks/blocking/test_code_rules_shared.py +12 -0
  23. package/hooks/blocking/test_precommit_code_rules_gate.py +32 -179
  24. package/hooks/blocking/test_precommit_code_rules_gate_native_owner.py +0 -1
  25. package/hooks/blocking/test_state_description_blocker.py +6 -4
  26. package/hooks/blocking/test_stop_dispatcher.py +5 -29
  27. package/hooks/hooks_constants/AGENTS.md +1 -6
  28. package/hooks/hooks_constants/bash_pre_tool_use_dispatcher_constants.py +0 -1
  29. package/hooks/hooks_constants/code_rules_enforcer_constants.py +3 -0
  30. package/hooks/hooks_constants/messages.py +0 -2
  31. package/hooks/hooks_constants/precommit_code_rules_gate_constants.py +3 -17
  32. package/hooks/hooks_constants/stop_dispatcher_constants.py +0 -2
  33. package/hooks/hooks_constants/test_bash_pre_tool_use_dispatcher_constants.py +0 -1
  34. package/hooks/hooks_constants/test_code_rules_enforcer_constants.py +7 -0
  35. package/hooks/hooks_constants/test_messages.py +5 -3
  36. package/hooks/hooks_constants/test_stop_dispatcher_constants.py +0 -2
  37. package/package.json +1 -1
  38. package/rules/AGENTS.md +3 -6
  39. package/rules/claims-as-quotes.md +0 -10
  40. package/rules/code-standards.md +6 -6
  41. package/rules/explore-thoroughly.md +0 -1
  42. package/rules/failure-blast-radius.md +0 -8
  43. package/rules/falsify-before-green.md +0 -8
  44. package/rules/file-global-constants.md +2 -2
  45. package/rules/filesystem-search.md +1 -1
  46. package/rules/git-workflow.md +1 -9
  47. package/rules/hedging-claims.md +2 -6
  48. package/rules/long-horizon-autonomy.md +1 -1
  49. package/rules/measurement-denominators.md +0 -9
  50. package/rules/research-mode.md +0 -6
  51. package/rules/verify-before-asking.md +0 -5
  52. package/rules/verify-runtime-state.md +0 -5
  53. package/scripts/codex_compat_materializer.py +0 -12
  54. package/scripts/sync_to_cursor/rules.py +0 -10
  55. package/scripts/tests/test_engine.py +0 -1
  56. package/scripts/tests/test_rules.py +0 -1
  57. package/scripts/tests/test_sync_to_cursor.py +0 -1
  58. package/system-prompts/software-engineer.xml +3 -3
  59. package/hooks/blocking/code_rules_dead_argparse_argument.py +0 -554
  60. package/hooks/blocking/code_rules_dead_config_field.py +0 -568
  61. package/hooks/blocking/code_rules_dead_dataclass_field.py +0 -348
  62. package/hooks/blocking/code_rules_dead_module_constant.py +0 -757
  63. package/hooks/blocking/code_rules_dead_split_branch.py +0 -225
  64. package/hooks/blocking/code_rules_mock_completeness.py +0 -295
  65. package/hooks/blocking/code_rules_scope_binding.py +0 -151
  66. package/hooks/blocking/code_rules_unused_imports.py +0 -197
  67. package/hooks/blocking/hedging_language_blocker.py +0 -221
  68. package/hooks/blocking/intent_only_ending_blocker.py +0 -148
  69. package/hooks/blocking/test_code_rules_enforcer_dead_argparse_argument.py +0 -534
  70. package/hooks/blocking/test_code_rules_enforcer_dead_config_field.py +0 -846
  71. package/hooks/blocking/test_code_rules_enforcer_dead_dataclass_field.py +0 -507
  72. package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +0 -679
  73. package/hooks/blocking/test_code_rules_enforcer_dead_module_constant_alias.py +0 -133
  74. package/hooks/blocking/test_code_rules_enforcer_dead_module_constant_read_cap.py +0 -103
  75. package/hooks/blocking/test_code_rules_enforcer_dead_split_branch.py +0 -105
  76. package/hooks/blocking/test_code_rules_enforcer_docstring_args_span_scope.py +0 -425
  77. package/hooks/blocking/test_code_rules_enforcer_docstring_cardinal_family.py +0 -176
  78. package/hooks/blocking/test_code_rules_enforcer_docstring_delegation_summary.py +0 -385
  79. package/hooks/blocking/test_code_rules_enforcer_docstring_fallback_branch.py +0 -398
  80. package/hooks/blocking/test_code_rules_enforcer_docstring_field_runmode_outcome.py +0 -129
  81. package/hooks/blocking/test_code_rules_enforcer_docstring_inline_literal_claim.py +0 -93
  82. package/hooks/blocking/test_code_rules_enforcer_docstring_length_constant_superlative.py +0 -198
  83. package/hooks/blocking/test_code_rules_enforcer_docstring_mark_glyph_enumeration.py +0 -262
  84. package/hooks/blocking/test_code_rules_enforcer_docstring_no_consumer.py +0 -93
  85. package/hooks/blocking/test_code_rules_enforcer_docstring_no_network.py +0 -115
  86. package/hooks/blocking/test_code_rules_enforcer_docstring_raises_largezipfile.py +0 -226
  87. package/hooks/blocking/test_code_rules_enforcer_docstring_returns_plural_cardinality.py +0 -207
  88. package/hooks/blocking/test_code_rules_enforcer_docstring_step_dispatch.py +0 -262
  89. package/hooks/blocking/test_code_rules_enforcer_docstring_type_checking_gate.py +0 -164
  90. package/hooks/blocking/test_code_rules_enforcer_docstring_unguarded_payload.py +0 -188
  91. package/hooks/blocking/test_code_rules_enforcer_import_block_sort.py +0 -157
  92. package/hooks/blocking/test_code_rules_enforcer_split_mocks_1.py +0 -303
  93. package/hooks/blocking/test_code_rules_enforcer_split_mocks_2.py +0 -111
  94. package/hooks/blocking/test_code_rules_enforcer_unused_imports.py +0 -656
  95. package/hooks/blocking/test_hedging_language_blocker.py +0 -261
  96. package/hooks/blocking/test_intent_only_ending_blocker.py +0 -209
  97. package/hooks/hooks_constants/dead_argparse_argument_constants.py +0 -28
  98. package/hooks/hooks_constants/dead_config_field_constants.py +0 -39
  99. package/hooks/hooks_constants/dead_dataclass_field_constants.py +0 -25
  100. package/hooks/hooks_constants/dead_module_constant_constants.py +0 -30
  101. package/hooks/hooks_constants/hedging_uncertainty_constants.py +0 -42
  102. package/hooks/hooks_constants/test_dispatcher_constants_docstrings.py +0 -44
  103. package/rules/conservative-action.md +0 -17
  104. package/rules/context7.md +0 -8
  105. package/rules/few-words.md +0 -3
  106. package/rules/parallel-tools.md +0 -23
@@ -18,8 +18,6 @@ DECISION_KEY = "decision"
18
18
  REASON_KEY = "reason"
19
19
 
20
20
  ALL_STOP_HOSTED_HOOK_PATHS: tuple[str, ...] = (
21
- "blocking/hedging_language_blocker.py",
22
21
  "blocking/question_to_user_enforcer.py",
23
- "blocking/intent_only_ending_blocker.py",
24
22
  "blocking/session_handoff_blocker.py",
25
23
  )
@@ -34,7 +34,6 @@ _EXPECTED_BASH_ORDER = (
34
34
  "blocking/pii_prevention_blocker.py",
35
35
  "blocking/conventional_pr_title_gate.py",
36
36
  "blocking/block_main_commit.py",
37
- "blocking/precommit_code_rules_gate.py",
38
37
  "blocking/session_edit_stage_gate.py",
39
38
  "blocking/test_preflight_check.py",
40
39
  "blocking/windows_rmtree_blocker.py",
@@ -17,6 +17,8 @@ if str(_HOOKS_ROOT) not in sys.path:
17
17
  sys.path.insert(0, str(_HOOKS_ROOT))
18
18
 
19
19
  from hooks_constants.code_rules_enforcer_constants import (
20
+ CONFIG_DIRECTORY_SEGMENT,
21
+ CONSTANTS_MODULE_SUFFIX,
20
22
  FUNCTION_WITH_JSDOC_PATTERN,
21
23
  JSDOC_RETURNS_STRUCTURED_OBJECT_PROMISE_PATTERN,
22
24
  RETURN_CALL_OPENING_PARENTHESIS_PATTERN,
@@ -91,3 +93,8 @@ def test_schema_property_key_pattern_matches_only_the_options_key() -> None:
91
93
  assert SCHEMA_OPTIONS_PROPERTY_KEY_PATTERN.search("{ label: 'x', schema : X }") is not None
92
94
  assert SCHEMA_OPTIONS_PROPERTY_KEY_PATTERN.search("{ agentType, phase }, HEAD_SCHEMA") is None
93
95
  assert SCHEMA_OPTIONS_PROPERTY_KEY_PATTERN.search("{ myschema: X }") is None
96
+
97
+
98
+ def test_constants_module_suffix_and_config_directory_segment_are_defined() -> None:
99
+ assert CONSTANTS_MODULE_SUFFIX == "_constants.py"
100
+ assert CONFIG_DIRECTORY_SEGMENT == "config"
@@ -3,9 +3,11 @@
3
3
  from hooks_constants import messages
4
4
 
5
5
 
6
- def test_user_facing_notice_is_nonempty_string() -> None:
7
- assert isinstance(messages.USER_FACING_NOTICE, str)
8
- assert messages.USER_FACING_NOTICE
6
+ def test_module_carries_no_hedging_or_intent_ending_notices() -> None:
7
+ """The hedging and intent-only-ending Stop hooks are removed; their
8
+ dedicated notices no longer live here."""
9
+ assert not hasattr(messages, "USER_FACING_NOTICE")
10
+ assert not hasattr(messages, "USER_FACING_INTENT_ENDING_NOTICE")
9
11
 
10
12
 
11
13
  def test_user_facing_tdd_notice_is_nonempty_string() -> None:
@@ -12,9 +12,7 @@ if _HOOKS_DIR not in sys.path:
12
12
  from hooks_constants.stop_dispatcher_constants import ALL_STOP_HOSTED_HOOK_PATHS # noqa: E402
13
13
 
14
14
  _EXPECTED_STOP_ORDER = (
15
- "blocking/hedging_language_blocker.py",
16
15
  "blocking/question_to_user_enforcer.py",
17
- "blocking/intent_only_ending_blocker.py",
18
16
  "blocking/session_handoff_blocker.py",
19
17
  )
20
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "2.28.0",
3
+ "version": "2.28.1",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
package/rules/AGENTS.md CHANGED
@@ -20,27 +20,24 @@ Rule files installed into `~/.claude/rules/` by `bin/install.mjs`. A rule withou
20
20
  | `cleanup-temp-files.md` | Remove temporary files created during a task when the task is complete |
21
21
  | `code-standards.md` | Pointer to `CODE_RULES.md` as the single source of truth, including §8 (TDD) and §7 (right-sizing); BDD is the outer process and TDD the inner loop |
22
22
  | `confirm-implementation-forks.md` | Stop and ask when two or more workable implementation paths change the deliverable |
23
- | `conservative-action.md` | Research and recommend when intent is ambiguous; act only on explicit request |
24
- | `context7.md` | Use Context7 MCP to fetch current library docs; always prefer live docs over built-in knowledge |
25
23
  | `destructive-commands.md` | Allowed removal forms and the ephemeral namespace the `destructive_command_blocker` auto-allows; keep destructive literals out of a Bash command string even as data |
26
24
  | `doc-inventory-integrity.md` | Three inventory shapes stay in step with the code: a per-directory `CLAUDE.md` file list, a package `README`/`SKILL.md` inventory, and an env-var summary table |
27
25
  | `docstring-prose-matches-implementation.md` | Prose enumerations in docstrings cover every behavior the body applies |
28
26
  | `durable-post-artifacts.md` | GitHub post bodies never reference volatile scratch paths; text embeds inline and binary artifacts upload to the `artifacts` release with the permanent URL linked |
29
27
  | `explore-thoroughly.md` | Read relevant files and map existing patterns before proposing a change |
28
+ | `failure-blast-radius.md` | Name what a raise stops — `RunFatal` for the whole run, `ItemBlocked` for one batch member — and keep the batch reaching a deliverable with parked members reported |
30
29
  | `falsify-before-green.md` | A check's green counts as evidence only after that same check ran red on a named break, with a passing control beside it |
31
30
  | `file-global-constants.md` | File-global constants need at least two same-file references; otherwise move value to `config/` |
32
- | `few-words.md` | The style reminder. Syncs to Cursor as an always-on `.mdc` rule. |
33
31
  | `filesystem-search.md` | Every filesystem search names a scope; `es.exe`, `Glob`, `Grep`, and `Read` are equally sanctioned, and the `unscoped_search_blocker` denies a walk from a root |
34
32
  | `gh-cli-conventions.md` | `--body-file` for every `gh` body; `--paginate --slurp` piped to external `jq` for every paginated list read |
35
- | `git-workflow.md` | PR workflow: always create as draft, one commit per review stage, never commit working docs or images; carries the review-response protocol and a See-also block for its seven siblings |
36
- | `hedging-claims.md` | State the evidence or name the claim unverified; the `hedging_language_blocker` Stop hook sends a hedged response back for a re-check |
33
+ | `git-workflow.md` | PR workflow: always create as draft, one commit per review stage, never commit working docs or images; carries the review-response protocol |
34
+ | `hedging-claims.md` | State the evidence or name the claim unverified; a hedge word stands in for evidence not gathered, prose discipline with no hook |
37
35
  | `long-horizon-autonomy.md` | Autonomous-run behaviors: act on what you have, do not end on a promise, delegate and keep working |
38
36
  | `measurement-denominators.md` | Every reported count names what it scanned and carries its denominator; a rate needs two runs; the consumer cross-checks the count against the scope its denominator names |
39
37
  | `nas-ssh-invocation.md` | Reach the NAS through the paramiko-backed `nas_ssh_key.py` runner, which signs in-process; every ssh-family client reads the key through file permissions, refuses it, and stalls an unattended run on a password prompt |
40
38
  | `no-cross-skill-duplicate-helpers.md` | Within one skill a duplicated helper is blocked; across two skill folders a small self-contained copy is a sanctioned isolation tradeoff that draws a non-blocking advisory naming the source skill |
41
39
  | `orphan-css-class.md` | Every `class="..."` attribute in Python-generated markup has a matching selector in the `<style>` block |
42
40
  | `paired-test-coverage.md` | A public function omitted by a module's established paired test suite must get a behavioral test |
43
- | `parallel-tools.md` | Make all independent tool calls in a single response |
44
41
  | `plain-illustrative-docstrings.md` | Public docstring narrative reads plainly and shows behavior with a diagram block (a `::` example or a doctest), painting a concrete scene a general developer follows on first read; a run-on backstop hook, a prose-wall backstop hook, and Category O9 audit enforce it |
45
42
  | `prompt-workflow-context-controls.md` | Keep prompt-workflow instruction layers small and stable; load heavy skills on demand |
46
43
  | `re-stage-before-commit.md` | Stage the files edited this session before `git commit`; the session edit stage gate denies a commit that leaves a tracked session edit unstaged, with `-a`, a pathspec, a preceding `git add`, and `# partial-commit` as escapes |
@@ -53,13 +53,3 @@ def build_refund(order, requested_amount):
53
53
  ## Enforcement
54
54
 
55
55
  This rule binds as prose discipline: a reviewer applies it to the claims a report, a verdict, or a PR body makes about existing code. No hook backs it, because telling a design-deciding claim from background prose needs meaning a regex cannot read.
56
-
57
- ## Sibling rules
58
-
59
- | Rule | Role |
60
- |---|---|
61
- | `research-mode.md` | Names what counts as a citation and grounds a factual claim in word-for-word quotes |
62
- | `hedging-claims.md` | Catches a hedge word standing in for evidence on a claim; this rule catches a claim missing its quote |
63
- | `verify-runtime-state.md` | A verdict about what runs rests on a live probe from this session |
64
- | `falsify-before-green.md` | A check's green counts once the check has been shown red |
65
- | `measurement-denominators.md` | Every count names what it scanned |
@@ -1,21 +1,21 @@
1
1
  # Code Standards
2
2
 
3
- > **Checked-in review contract:** [`.cursor/BUGBOT.md`](../../../.cursor/BUGBOT.md) — the human and AI review contract for code quality.
4
- > **Compact projection:** [`CODE_RULES.md`](../docs/CODE_RULES.md) — validated summary for generation load.
3
+ > **Canonical review contract:** [`CODE_RULES.md`](../docs/CODE_RULES.md) — the human and AI review contract for code quality, loaded on demand.
4
+ > **Checked-in pointer:** [`.cursor/BUGBOT.md`](../../../.cursor/BUGBOT.md) — the file Cursor BugBot reads; it points at `CODE_RULES.md`.
5
5
  > **Production enforcement:** `hooks/blocking/code_rules_enforcer.py` — hand-maintained Write/Edit gates; each mechanical rule carries a synchronization test.
6
6
 
7
7
  ## Policy surface map
8
8
 
9
9
  | Layer | Path | Role |
10
10
  |---|---|---|
11
- | Contract | `.cursor/BUGBOT.md` | Full review criteria for PR agents |
12
- | Projection | `docs/CODE_RULES.md` | Compact always-load reference; must not diverge from AGENTS |
11
+ | Contract | `docs/CODE_RULES.md` | Full review criteria for PR agents, loaded on demand |
12
+ | Pointer | `.cursor/BUGBOT.md` | Checked-in file Cursor BugBot reads; points at `CODE_RULES.md` |
13
13
  | Enforcer | `hooks/blocking/code_rules_enforcer.py` | Hand-maintained blockers; not generated from the docs |
14
14
  | Session rules | `rules/*.md` | Runtime session policy (questions, tasks, shell) |
15
15
 
16
- Load `.cursor/BUGBOT.md` when reviewing a PR or resolving a policy conflict. Load `CODE_RULES.md` when generating code under the compact checklist. Prefer linking these refs over restating rules.
16
+ Load `CODE_RULES.md` when reviewing a PR, resolving a policy conflict, or generating code. Prefer linking this ref over restating rules.
17
17
 
18
- Two standards live in the canonical policy in full (and in the projection by name):
18
+ Two standards live in `CODE_RULES.md` in full:
19
19
 
20
20
  - **TDD** — CODE_RULES §8 / AGENTS Tests: red, green, refactor; no production code before a failing test.
21
21
  - **Right-sized engineering** — CODE_RULES §7 / AGENTS Design: functions over classes; concrete over abstract; add an abstraction at the commit that introduces its second concrete implementation.
@@ -23,5 +23,4 @@ The depth budget shrinks once the evidence is in hand. When you can already name
23
23
 
24
24
  ## Relationship to other rules
25
25
 
26
- - **conservative-action.md** gates *whether* to act. This rule governs *how deeply* to investigate.
27
26
  - **research-mode.md** ensures factual claims are grounded. This rule ensures implementation plans are grounded in the actual codebase.
@@ -116,11 +116,3 @@ Report as: N of M complete, K parked, and what you are working now.
116
116
  Close with: what broke, how each one ended, and which of them deserve a
117
117
  durable fix.
118
118
  ```
119
-
120
- ## Sibling rules
121
-
122
- | Rule | Role |
123
- |---|---|
124
- | [`code-standards.md`](code-standards.md) | `CODE_RULES.md` §9.7 names the boundary that turns a recorded per-member failure into an explicit outcome |
125
- | [`confirm-implementation-forks.md`](confirm-implementation-forks.md) | A defect correction creates an implementation fork when it routes around parking; surface and decide that fork |
126
- | [`long-horizon-autonomy.md`](long-horizon-autonomy.md) | A parked member receives an explicit report entry and follow-up |
@@ -55,14 +55,6 @@ The harness writes the row, file, or event the assertion counts, so the assertio
55
55
 
56
56
  All three land together. A record carrying the red alone shows a check that fails on everything; a record carrying the control alone shows a check that passes on everything.
57
57
 
58
- ## Sibling rules
59
-
60
- | Rule | Role |
61
- |---|---|
62
- | `anti-corollary-tests.md` | Each test carries information; the stated mutation names one code change and how many tests it kills |
63
- | `verify-runtime-state.md` | A runtime verdict rests on a live probe from this session |
64
- | `measurement-denominators.md` | Every count names what it scanned; a rate needs two runs |
65
-
66
58
  ## Enforcement
67
59
 
68
60
  This rule binds as prose discipline: a reviewer reads the shown-red record beside each new check a PR adds. No hook backs it, because a green that measured the code and a green that measured nothing look the same to a regex — the difference sits in what the check reached at run time.
@@ -24,9 +24,9 @@ Constants placed in `config/` satisfy the constants-location rule; the use-count
24
24
 
25
25
  ## Dead constant in a dedicated constants module (cross-module)
26
26
 
27
- The use-count rule above governs a file-global constant in production code outside `config/` by counting same-file references. A dedicated constants module — a file whose name ends in `_constants.py`, or any module under a `config/` directory — exports its constants to importer modules elsewhere, so a same-file count proves nothing. A separate hook, `check_dead_module_constants` (dispatched from `code_rules_enforcer`), governs these modules: it flags an `UPPER_SNAKE` constant defined in the written module whose name appears in no `.py` module anywhere under the enclosing package tree — not imported, not read, not listed in another module's `__all__` literal, not named in a string annotation. That is the dead exported constant CODE_RULES §9.8 targets, caught at Write/Edit time.
27
+ The use-count rule above governs a file-global constant in production code outside `config/` by counting same-file references. A dedicated constants module — a file whose name ends in `_constants.py`, or any module under a `config/` directory — exports its constants to importer modules elsewhere, so a same-file count proves nothing.
28
28
 
29
- The scan resolves the enclosing package tree from the written file: for a constants module inside a package subdirectory, the tree is the package's parent (so an importer one directory up is in scope); for a `config/` module, the tree is the parent of the `config` directory. A module that declares its own `__all__` narrows the check to the constants its `__all__` list names the explicit export surface and requires each to be imported or read by another module; the module's own `__all__` entry does not count as that consumer, so an exported constant no module consumes is flagged, while a constant `__all__` omits is the author's private value and is left alone. A reference from a test module under the tree keeps a constant live. Test modules and migration modules are themselves exempt from the check.
29
+ This cross-module concern belongs to the audit lane, not a write-time hook: an `UPPER_SNAKE` constant defined in a constants module whose name appears in no `.py` module anywhere under the enclosing package tree not imported, not read, not listed in another module's `__all__` literal, not named in a string annotation is the dead exported constant CODE_RULES §9.8 targets. Category E (dead code) is where a PR audit checks a changed constants module's exports against the rest of the package tree; a reference from a test module under the tree keeps a constant live, and a constant `__all__` omits is the author's private value and is left alone.
30
30
 
31
31
  ## Examples
32
32
 
@@ -43,7 +43,7 @@ When `es.exe` fails or returns nothing, fall back to `Glob` or `Grep` without pa
43
43
 
44
44
  ## Shell batching
45
45
 
46
- Issue one shell search at a time when the walk is large. Parallel full-tree searches contend for the shell and can lock the host. Harness `Grep` and `Glob` calls carry no such cost and run in parallel freely — see [`parallel-tools.md`](parallel-tools.md).
46
+ Issue one shell search at a time when the walk is large. Parallel full-tree searches contend for the shell and can lock the host. Harness `Grep` and `Glob` calls carry no such cost and run in parallel freely.
47
47
 
48
48
  ## Enforcement
49
49
 
@@ -55,12 +55,4 @@ An image a PR needs as visual evidence is not an exception to that row. Upload i
55
55
 
56
56
  Repair only reported findings, then re-verify after every repair.
57
57
 
58
- ## See also
59
-
60
- | Rule | Covers |
61
- |---|---|
62
- | [`gh-cli-conventions.md`](gh-cli-conventions.md) | `--body-file` for post bodies; `--paginate --slurp` for list reads |
63
- | [`re-stage-before-commit.md`](re-stage-before-commit.md) | Staging session edits so a commit does not drop them |
64
- | [`durable-post-artifacts.md`](durable-post-artifacts.md) | Keeping volatile scratch paths out of a post body |
65
- | [`destructive-commands.md`](destructive-commands.md) | Allowed removal forms; destructive literals in commit and post bodies |
66
- | [`code-standards.md`](code-standards.md) | The code standards a PR's diff is reviewed against |
58
+ Every `gh` post in this workflow uses `--body-file` per `gh-cli-conventions.md` and keeps volatile scratch paths out per `durable-post-artifacts.md`; stage session edits per `re-stage-before-commit.md` before each commit.
@@ -1,11 +1,7 @@
1
1
  # Hedging Claims
2
2
 
3
- State a claim with the evidence that backs it, or name the claim unverified. A hedge word stands in for evidence you did not gather.
3
+ State a claim with the evidence that backs it, or name the claim unverified. A hedge word (`likely`, `probably`, `might be`, `appears to`, and similar) stands in for evidence you did not gather.
4
4
 
5
- `hedging_language_blocker` (Stop hook, hosted by `stop_dispatcher`) runs when `CLAUDE_PROSE_STYLE_ENFORCEMENT` is on (see [`docs/references/prose-style-enforcement.md`](../docs/references/prose-style-enforcement.md)). It blocks a response that carries a bare hedge word `likely`, `probably`, `presumably`, `perhaps`, `possibly`, `seemingly`, `apparently`, `arguably`, `supposedly`, `ostensibly`, `conceivably`, `plausibly`, `unlikely`, `probable`, and the phrases `might be`, `could be`, `seems to be`, `appears to be`, `in all likelihood`, `more likely than not`, `it's possible that` — **unless the same sentence** labels the claim with explicit uncertainty (`unverified`, `I don't know`, `I do not know`, `no source for this claim`, `without a source`).
6
-
7
- A label in another sentence does not clear a bare hedge. Deleting the hedge word and keeping the claim does not clear the block. Gather the source, run the probe, label the claim unverified in that sentence, or ask the user through `AskUserQuestion` — then re-output the whole revised response.
8
-
9
- When enforcement is off, bare hedges still emit privacy-safe advisory candidates for precision measurement (OP-07B).
5
+ A label elsewhere in the response does not cover a bare hedge in a different sentence. Label the claim unverified in the same sentence as the hedge, or replace the hedge: gather the source, run the probe, or ask the user through `AskUserQuestion`.
10
6
 
11
7
  Sibling rules: [`research-mode.md`](research-mode.md) names what counts as a citation; [`verify-runtime-state.md`](verify-runtime-state.md) names the live probe a runtime verdict rests on.
@@ -8,7 +8,7 @@ Source: [Anthropic - Prompting Claude Fable 5](https://platform.claude.com/docs/
8
8
 
9
9
  When you have enough to act, act. Do not re-derive facts already settled in the conversation, re-open a decision the user already made, or narrate options you will not pursue in user-facing text. When you weigh a choice, give a recommendation, not a full survey. This shapes user-facing messages, not your private reasoning.
10
10
 
11
- This is the autonomous-run partner to `conservative-action`: that rule covers the ambiguous case (research and recommend first); this one covers the clear case (once the evidence is in hand, act).
11
+ This is the autonomous-run partner to the ambiguous case: research and recommend first when intent is unclear; this rule covers the clear case, where the evidence is already in hand.
12
12
 
13
13
  ## Do not end a turn on a promise
14
14
 
@@ -34,15 +34,6 @@ A number written into a docstring or a doc carries its denominator beside it. A
34
34
 
35
35
  A sweep reports "read 3 files". The change under review touches 10 files. The arithmetic reads: the sweep covered 3 of 10, so its clean verdict covers 3 of 10. The gap is the finding — send the sweep back for the other 7, and hold the verdict until the two numbers meet.
36
36
 
37
- ## Sibling rules
38
-
39
- | Rule | Role |
40
- |---|---|
41
- | `falsify-before-green.md` | A check's green counts once the check was shown red |
42
- | `anti-corollary-tests.md` | Each test carries information; no corollary matrices; no suite that only matches the dead default |
43
- | `docstring-prose-matches-implementation.md` | A docstring enumeration covers every behavior the body applies |
44
- | `measurement-denominators.md` | Every count names what it scanned; a rate needs two runs |
45
-
46
37
  ## Enforcement
47
38
 
48
39
  This rule binds as prose discipline: a reviewer applies it to the counts a PR's prose and docstrings state, and to the counts a report claims. No hook backs it, because weighing a figure's denominator against the scope it covers needs meaning a regex cannot read.
@@ -25,9 +25,3 @@ The grounding requirement above never relaxes: state no claim you cannot source.
25
25
 
26
26
  ## Exceptions
27
27
  Creative thinking, brainstorming, and novel ideas don't require citation. You can synthesize across sources to reach new conclusions, but the inputs must be grounded.
28
-
29
- ## Sibling rules
30
-
31
- - [`explore-thoroughly.md`](explore-thoroughly.md) — grounds an implementation plan in the codebase, as this rule grounds a factual claim in a source.
32
- - [`verify-runtime-state.md`](verify-runtime-state.md) — a runtime verdict needs a live probe from this session, not a citation.
33
- - [`hedging-claims.md`](hedging-claims.md) — the Stop hook that catches a bare hedge word; an explicit uncertainty label in the same sentence is the allowed alternative to a citation.
@@ -47,8 +47,3 @@ Reserve user questions for:
47
47
 
48
48
  **Wrong:** "Is there a Prisma schema in this project?"
49
49
  **Right:** Glob for `schema.prisma` and check.
50
-
51
- ## Parent rules
52
-
53
- - [`ask-user-question-required.md`](ask-user-question-required.md) — once a question genuinely belongs to the user, this rule routes it through `AskUserQuestion`.
54
- - [`verify-runtime-state.md`](verify-runtime-state.md) — the same duty applied to a verdict: gather the live probe before you conclude, not just before you ask.
@@ -33,8 +33,3 @@ Only after a live signal backs the claim do you state it.
33
33
 
34
34
  **Wrong:** "The config sets the timeout to 30 seconds, so the timeout is fine."
35
35
  **Right:** Print the loaded config at runtime and report the value the process actually holds.
36
-
37
- ## Relationship to other rules
38
-
39
- - **`verify-before-asking`** answers questions with a tool before asking the user. This rule extends that to runtime verdicts: gather the live probe before you conclude, not just before you ask.
40
- - **`long-horizon-autonomy`** requires every progress claim to rest on a tool result from this session. A runtime verdict is a progress claim; this rule names the probes that back it.
@@ -64,18 +64,12 @@ codex_hook_dependency_manifest = (
64
64
  "hooks/blocking/code_rules_comments.py",
65
65
  "hooks/blocking/code_rules_constants_config.py",
66
66
  "hooks/blocking/codex_apply_patch.py",
67
- "hooks/blocking/code_rules_dead_argparse_argument.py",
68
- "hooks/blocking/code_rules_dead_config_field.py",
69
- "hooks/blocking/code_rules_dead_dataclass_field.py",
70
- "hooks/blocking/code_rules_dead_module_constant.py",
71
- "hooks/blocking/code_rules_dead_split_branch.py",
72
67
  "hooks/blocking/code_rules_docstrings.py",
73
68
  "hooks/blocking/code_rules_duplicate_body.py",
74
69
  "hooks/blocking/code_rules_enforcer.py",
75
70
  "hooks/blocking/code_rules_imports_logging.py",
76
71
  "hooks/blocking/code_rules_js_conventions.py",
77
72
  "hooks/blocking/code_rules_magic_values.py",
78
- "hooks/blocking/code_rules_mock_completeness.py",
79
73
  "hooks/blocking/code_rules_naming_collection.py",
80
74
  "hooks/blocking/code_rules_optional_params.py",
81
75
  "hooks/blocking/code_rules_orphan_css_class.py",
@@ -85,7 +79,6 @@ codex_hook_dependency_manifest = (
85
79
  "hooks/blocking/code_rules_probe_chains.py",
86
80
  "hooks/blocking/code_rules_probe_detection.py",
87
81
  "hooks/blocking/code_rules_probe_recording.py",
88
- "hooks/blocking/code_rules_scope_binding.py",
89
82
  "hooks/blocking/code_rules_shared.py",
90
83
  "hooks/blocking/code_rules_string_magic.py",
91
84
  "hooks/blocking/code_rules_test_assertions.py",
@@ -94,7 +87,6 @@ codex_hook_dependency_manifest = (
94
87
  "hooks/blocking/code_rules_test_layout.py",
95
88
  "hooks/blocking/code_rules_type_escape.py",
96
89
  "hooks/blocking/code_rules_typeddict_stub.py",
97
- "hooks/blocking/code_rules_unused_imports.py",
98
90
  "hooks/hooks_constants/__init__.py",
99
91
  "hooks/hooks_constants/any_type_config.py",
100
92
  "hooks/hooks_constants/banned_identifiers_constants.py",
@@ -103,10 +95,6 @@ codex_hook_dependency_manifest = (
103
95
  "hooks/hooks_constants/code_rules_enforcer_constants.py",
104
96
  "hooks/hooks_constants/code_rules_path_utils_constants.py",
105
97
  "hooks/hooks_constants/command_dispatch_constants.py",
106
- "hooks/hooks_constants/dead_argparse_argument_constants.py",
107
- "hooks/hooks_constants/dead_config_field_constants.py",
108
- "hooks/hooks_constants/dead_dataclass_field_constants.py",
109
- "hooks/hooks_constants/dead_module_constant_constants.py",
110
98
  "hooks/hooks_constants/duplicate_function_body_constants.py",
111
99
  "hooks/hooks_constants/hardcoded_user_path_constants.py",
112
100
  "hooks/hooks_constants/harness_scratchpad_constants.py",
@@ -67,7 +67,6 @@ _merged_mapping_key_order = (
67
67
  "bdd",
68
68
  "test-quality",
69
69
  "research-mode",
70
- "conservative-action",
71
70
  "explore-thoroughly",
72
71
  )
73
72
 
@@ -372,15 +371,6 @@ def _always_apply_mappings(rules_directory: Path, docs_directory: Path) -> tuple
372
371
  "Research mode: citations and I don't know",
373
372
  "near_verbatim",
374
373
  ),
375
- RuleMapping(
376
- "conservative-action",
377
- (rules_directory / "conservative-action.md",),
378
- "conservative-action.mdc",
379
- True,
380
- None,
381
- "Prefer research over action when intent is unclear",
382
- "near_verbatim",
383
- ),
384
374
  RuleMapping(
385
375
  "explore-thoroughly",
386
376
  (rules_directory / "explore-thoroughly.md",),
@@ -46,7 +46,6 @@ def _write_minimal_curated_rules(rules_directory: Path) -> None:
46
46
  encoding="utf-8",
47
47
  )
48
48
  (rules_directory / "research-mode.md").write_text("# RM\n", encoding="utf-8")
49
- (rules_directory / "conservative-action.md").write_text("# CA\n", encoding="utf-8")
50
49
  (rules_directory / "explore-thoroughly.md").write_text("# ET\n", encoding="utf-8")
51
50
 
52
51
 
@@ -30,7 +30,6 @@ def _write_minimal_curated_rules(rules_directory: Path) -> None:
30
30
  encoding="utf-8",
31
31
  )
32
32
  (rules_directory / "research-mode.md").write_text("# RM\n", encoding="utf-8")
33
- (rules_directory / "conservative-action.md").write_text("# CA\n", encoding="utf-8")
34
33
  (rules_directory / "explore-thoroughly.md").write_text("# ET\n", encoding="utf-8")
35
34
 
36
35
 
@@ -44,7 +44,6 @@ def _minimal_rule_files(claude_rules: Path) -> None:
44
44
  encoding="utf-8",
45
45
  )
46
46
  (claude_rules / "research-mode.md").write_text("# RM\n", encoding="utf-8")
47
- (claude_rules / "conservative-action.md").write_text("# CA\n", encoding="utf-8")
48
47
  (claude_rules / "explore-thoroughly.md").write_text("# ET\n", encoding="utf-8")
49
48
 
50
49
 
@@ -94,9 +94,9 @@
94
94
  </problem_solving>
95
95
 
96
96
  <code_quality>
97
- The checked-in .cursor/BUGBOT.md is the full code-quality review contract.
98
- ~/.claude/docs/CODE_RULES.md is the compact projection for generation load.
99
- The checklist below is a short reminder, not a
97
+ ~/.claude/docs/CODE_RULES.md is the full code-quality review contract, loaded on demand.
98
+ The checked-in .cursor/BUGBOT.md is the pointer file Cursor BugBot reads; it points at
99
+ CODE_RULES.md. The checklist below is a short reminder, not a
100
100
  second canonical source.
101
101
 
102
102
  Naming — full words only: