agent-quality-police 0.2.6 → 0.2.8

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-quality-police",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Strict governance framework for coding agents that blocks testing and typing bypasses.",
5
5
  "author": {
6
6
  "name": "Davy Massoneto",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-quality-police",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Strict governance framework for coding agents that blocks testing and typing bypasses.",
5
5
  "author": {
6
6
  "name": "Davy Massoneto",
package/AGENTS.md CHANGED
@@ -49,7 +49,3 @@
49
49
  - Use `bypass-auditor` for typing, config, mocks, helpers, or suspicious diffs.
50
50
  - Use `tdd-warden` when behavior or tests changed or should have changed.
51
51
  - Use `pr-gatekeeper` only for final approve-or-reject review.
52
-
53
- ## Tool-Specific Notes
54
-
55
- - AGENTS-aware tools should load only their local tool-specific skills and agents.
package/CLAUDE.md CHANGED
@@ -4,37 +4,40 @@
4
4
 
5
5
  - Direct system, developer, and user instructions override this file.
6
6
  - Prefer current local code and current official documentation over memory.
7
- - Load only the smallest relevant skill set for the task.
7
+ - Treat the required skills and auditors in this file as mandatory workflow requirements.
8
8
 
9
9
  ## Startup Sequence
10
10
 
11
11
  1. Read [quality-definition](docs/policy/quality-definition.md) when the task needs repository policy context.
12
12
  2. Read [workflow](docs/policy/workflow.md) when the repository defines one.
13
- 3. Load only the relevant skill set from `.claude/skills/`.
13
+ 3. Load the smallest required skill set from `.claude/skills/` before proposing edits or writing code.
14
14
 
15
15
  ## Skill Routing
16
16
 
17
- - Use [quality-index](.claude/skills/quality-index/SKILL.md) when the task spans multiple concerns.
17
+ - Use [quality-index](.claude/skills/quality-index/SKILL.md) when the task spans multiple concerns or when you are unsure which validators apply.
18
18
  - Use [typescript-zero-bypass](.claude/skills/typescript-zero-bypass/SKILL.md) for `.ts` or `.tsx` changes.
19
19
  - Use [vite-vitest-tdd](.claude/skills/vite-vitest-tdd/SKILL.md) for Vite or Vitest TDD.
20
20
  - Use [react-public-api-testing](.claude/skills/react-public-api-testing/SKILL.md) for React behavior tests.
21
+ - Use [anti-bypass-audit](.claude/skills/anti-bypass-audit/SKILL.md) when reviewing diffs, suspicious helpers, weakened configs, or type/config-heavy changes.
22
+ - Use [refactoring-with-safety](.claude/skills/refactoring-with-safety/SKILL.md) for refactors that are not pure bug fixes.
23
+ - Use [governance-installation](.claude/skills/governance-installation/SKILL.md) when installing or updating this governance package.
21
24
 
22
25
  ## Quality Rules
23
26
 
27
+ - Load the required skills before proposing edits or writing code.
28
+ - If a required skill is unavailable in the current runtime, stop and report `BLOCKED`.
24
29
  - Use behavior-first tests when tests are viable.
25
30
  - Avoid type bypasses, comment bypasses, config weakening, and fake greens.
26
31
  - Prefer named types and explicit models over inline structural shortcuts.
27
32
 
28
33
  ## Review Flow
29
34
 
30
- - Before final approval, run the relevant auditors for the actual risk surface.
31
- - Use `bypass-auditor` for typing, config, mocks, helpers, or suspicious diffs.
32
- - Use `tdd-warden` when behavior or tests changed or should have changed.
33
- - Use `pr-gatekeeper` only for final approve-or-reject review.
34
-
35
- ## Tool-Specific Notes
36
-
37
- - Claude Code should enter through `CLAUDE.md` and `.claude/rules/`.
35
+ - For code changes, explicitly invoke the required auditors before final approval.
36
+ - For code changes, do not finalize until the required auditors have run and their results were reviewed.
37
+ - For typing, config, mocks, helpers, or suspicious diffs, run `bypass-auditor`.
38
+ - For behavior changes or bug fixes, run `tdd-warden` and `bypass-auditor`.
39
+ - For final approval, release, or merge decisions, run `pr-gatekeeper` after the other required auditors.
40
+ - If a required skill or auditor cannot run in the current runtime, stop and report `BLOCKED`.
38
41
 
39
42
  ## Claude Code
40
43
 
@@ -17,7 +17,3 @@
17
17
  ## Review Flow
18
18
 
19
19
  {{review_flow_body}}
20
-
21
- ## Tool-Specific Notes
22
-
23
- {{tool_specific_notes}}
package/lib/install.mjs CHANGED
@@ -62,8 +62,7 @@ function entrypointReplacements({
62
62
  startupSequenceBody,
63
63
  skillRoutingBody,
64
64
  qualityRulesBody,
65
- reviewFlowBody,
66
- toolSpecificNotes
65
+ reviewFlowBody
67
66
  }) {
68
67
  return {
69
68
  quality_definition_path: qualityDefinitionPath,
@@ -81,8 +80,7 @@ function entrypointReplacements({
81
80
  startup_sequence_body: startupSequenceBody,
82
81
  skill_routing_body: skillRoutingBody,
83
82
  quality_rules_body: qualityRulesBody,
84
- review_flow_body: reviewFlowBody,
85
- tool_specific_notes: toolSpecificNotes
83
+ review_flow_body: reviewFlowBody
86
84
  };
87
85
  }
88
86
 
@@ -91,46 +89,40 @@ function globalPolicySections() {
91
89
  priorityBody: [
92
90
  "- Direct system, developer, and user instructions override this file.",
93
91
  "- Prefer current local code and current official documentation over memory.",
94
- "- Load only the smallest relevant skill set for the task."
92
+ "- Treat the required skills and auditors in this file as mandatory workflow requirements."
95
93
  ].join("\n"),
96
94
  startupSequenceBody: [
97
95
  "1. Read [quality-definition]({{quality_definition_path}}) when the task needs repository policy context.",
98
96
  "2. Read [workflow]({{workflow_path}}) when the repository defines one.",
99
- "3. Load only the relevant skill set from `{{primary_skill_root}}`."
97
+ "3. Load the smallest required skill set from `{{primary_skill_root}}` before proposing edits or writing code."
100
98
  ].join("\n"),
101
99
  skillRoutingBody: [
102
- "- Use [quality-index]({{quality_index_skill_path}}) when the task spans multiple concerns.",
100
+ "- Use [quality-index]({{quality_index_skill_path}}) when the task spans multiple concerns or when you are unsure which validators apply.",
103
101
  "- Use [typescript-zero-bypass]({{typescript_zero_bypass_skill_path}}) for `.ts` or `.tsx` changes.",
104
102
  "- Use [vite-vitest-tdd]({{vite_vitest_tdd_skill_path}}) for Vite or Vitest TDD.",
105
- "- Use [react-public-api-testing]({{react_public_api_testing_skill_path}}) for React behavior tests."
103
+ "- Use [react-public-api-testing]({{react_public_api_testing_skill_path}}) for React behavior tests.",
104
+ "- Use [anti-bypass-audit]({{anti_bypass_audit_skill_path}}) when reviewing diffs, suspicious helpers, weakened configs, or type/config-heavy changes.",
105
+ "- Use [refactoring-with-safety]({{refactoring_with_safety_skill_path}}) for refactors that are not pure bug fixes.",
106
+ "- Use [governance-installation]({{governance_installation_skill_path}}) when installing or updating this governance package."
106
107
  ].join("\n"),
107
108
  qualityRulesBody: [
109
+ "- Load the required skills before proposing edits or writing code.",
110
+ "- If a required skill is unavailable in the current runtime, stop and report `BLOCKED`.",
108
111
  "- Use behavior-first tests when tests are viable.",
109
112
  "- Avoid type bypasses, comment bypasses, config weakening, and fake greens.",
110
113
  "- Prefer named types and explicit models over inline structural shortcuts."
111
114
  ].join("\n"),
112
115
  reviewFlowBody: [
113
- "- Before final approval, run the relevant auditors for the actual risk surface.",
114
- "- Use `bypass-auditor` for typing, config, mocks, helpers, or suspicious diffs.",
115
- "- Use `tdd-warden` when behavior or tests changed or should have changed.",
116
- "- Use `pr-gatekeeper` only for final approve-or-reject review."
116
+ "- For code changes, explicitly invoke the required auditors before final approval.",
117
+ "- For code changes, do not finalize until the required auditors have run and their results were reviewed.",
118
+ "- For typing, config, mocks, helpers, or suspicious diffs, run `bypass-auditor`.",
119
+ "- For behavior changes or bug fixes, run `tdd-warden` and `bypass-auditor`.",
120
+ "- For final approval, release, or merge decisions, run `pr-gatekeeper` after the other required auditors.",
121
+ "- If a required skill or auditor cannot run in the current runtime, stop and report `BLOCKED`."
117
122
  ].join("\n")
118
123
  };
119
124
  }
120
125
 
121
- function toolNotesFor(target, { claudeEntrypointLabel = "CLAUDE.md", claudeRulesRoot = "rules/", codexSkillsRoot = "skills/", codexAgentsRoot = "agents/", opencodeConfigPath = "opencode.json" } = {}) {
122
- if (target === "claude") {
123
- return `- Claude Code should enter through \`${claudeEntrypointLabel}\` and \`${claudeRulesRoot}\`.`;
124
- }
125
- if (target === "codex") {
126
- return `- Codex should enter through this file and use \`${codexSkillsRoot}\` plus \`${codexAgentsRoot}\`.`;
127
- }
128
- if (target === "opencode") {
129
- return `- OpenCode should enter through this file and load extra instructions from \`${opencodeConfigPath}\`.`;
130
- }
131
- return "";
132
- }
133
-
134
126
  function renderAgentsRoot(policy, replacements) {
135
127
  return `# AGENTS.md\n\n${renderTemplate(policy, replacements).trimEnd()}\n`;
136
128
  }
@@ -192,8 +184,7 @@ function rootReplacements(target) {
192
184
  primarySkillRoot: "skills/",
193
185
  skillRoot: "skills",
194
186
  systemLayoutPath: "docs/policy/system-layout.md",
195
- ...globalPolicySections(),
196
- toolSpecificNotes: toolNotesFor("claude", { claudeEntrypointLabel: "CLAUDE.md", claudeRulesRoot: "rules/" })
187
+ ...globalPolicySections()
197
188
  });
198
189
  }
199
190
  if (target === "codex") {
@@ -203,8 +194,7 @@ function rootReplacements(target) {
203
194
  primarySkillRoot: "../.agents/skills/",
204
195
  skillRoot: "../.agents/skills",
205
196
  systemLayoutPath: "docs/policy/system-layout.md",
206
- ...globalPolicySections(),
207
- toolSpecificNotes: toolNotesFor("codex", { codexSkillsRoot: "../.agents/skills/", codexAgentsRoot: "agents/" })
197
+ ...globalPolicySections()
208
198
  });
209
199
  }
210
200
  if (target === "opencode") {
@@ -214,8 +204,7 @@ function rootReplacements(target) {
214
204
  primarySkillRoot: "skills/",
215
205
  skillRoot: "skills",
216
206
  systemLayoutPath: "docs/policy/system-layout.md",
217
- ...globalPolicySections(),
218
- toolSpecificNotes: toolNotesFor("opencode", { opencodeConfigPath: "opencode.json" })
207
+ ...globalPolicySections()
219
208
  });
220
209
  }
221
210
  throw new Error(`Unsupported target: ${target}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-quality-police",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Strict governance framework for coding agents that blocks testing and typing bypasses.",
5
5
  "type": "module",
6
6
  "license": "MIT",