agent-quality-police 0.2.0 → 0.2.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.
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
## Priority
|
|
2
|
+
|
|
3
|
+
- Direct system, developer, and user instructions override this file.
|
|
4
|
+
- [`docs/policy/quality-definition.md`]({{quality_definition_path}}) is the canonical definition of quality in this repository.
|
|
5
|
+
- If any skill, rule, example, or agent prompt contradicts the quality definition, the quality definition wins.
|
|
6
|
+
- Generated projections must not become the source of truth.
|
|
7
|
+
|
|
8
|
+
## Startup Sequence
|
|
9
|
+
|
|
10
|
+
1. Read [quality-definition]({{quality_definition_path}}).
|
|
11
|
+
2. Read [workflow]({{workflow_path}}).
|
|
12
|
+
3. Load the smallest relevant skill set from `{{primary_skill_root}}`.
|
|
13
|
+
4. Execute with TDD when tests are viable.
|
|
14
|
+
5. Run the matching audit agents before final approval.
|
|
15
|
+
|
|
16
|
+
## Mandatory Skill Routing
|
|
17
|
+
|
|
18
|
+
- Use [quality-index]({{quality_index_skill_path}}) first when the task spans multiple concerns.
|
|
19
|
+
- Use [typescript-zero-bypass]({{typescript_zero_bypass_skill_path}}) for any `.ts` or `.tsx` change.
|
|
20
|
+
- Use [vite-vitest-tdd]({{vite_vitest_tdd_skill_path}}) when working with Vite, Vitest, or unit/component TDD.
|
|
21
|
+
- Use [react-public-api-testing]({{react_public_api_testing_skill_path}}) for React component behavior tests.
|
|
22
|
+
- Use [anti-bypass-audit]({{anti_bypass_audit_skill_path}}) when reviewing diffs, suspicious helpers, or weakened configs.
|
|
23
|
+
- Use [refactoring-with-safety]({{refactoring_with_safety_skill_path}}) for refactors that are not pure bug fixes.
|
|
24
|
+
- Use [governance-installation]({{governance_installation_skill_path}}) when installing or updating this framework in another repository.
|
|
25
|
+
|
|
26
|
+
## Non-Negotiables
|
|
27
|
+
|
|
28
|
+
- TDD is mandatory when tests are technically viable.
|
|
29
|
+
- A passing test suite without behavior proof is not a green build.
|
|
30
|
+
- `any`, type assertions, non-null assertions, ts-comment bypasses, and lint/config weakening are automatic failures.
|
|
31
|
+
- `Map` in public or domain-facing contracts is suspicious by default and must be treated as a modeling bypass unless a stronger repository rule explicitly allows it.
|
|
32
|
+
- Helpers, factories, mocks, branches, or narrowing added only to silence the type system or to make tests easier are automatic failures.
|
|
33
|
+
- Zod is allowed only at external input boundaries.
|
|
34
|
+
- Joi is allowed only for environment validation when it is genuinely needed.
|
|
35
|
+
- Strong named types are required.
|
|
36
|
+
- Inline structural types are prohibited.
|
|
37
|
+
- Reviewers must reject suspicious diffs instead of “accepting with caveats.”
|
|
38
|
+
|
|
39
|
+
## Execution Contract
|
|
40
|
+
|
|
41
|
+
- Fix the root problem, not the symptom.
|
|
42
|
+
- Keep tests direct, short, and behavior-based.
|
|
43
|
+
- Prefer explicit domain names over generic utilities.
|
|
44
|
+
- Keep policy text severe and actionable; do not soften language to preserve agent comfort.
|
|
45
|
+
- After any change to canonical framework sources such as `.claude/skills/`, `.claude/rules/`, `docs/policy/`, or `framework/agents/specs/`, run `python3 scripts/build_framework.py` before claiming the repository is consistent.
|
|
46
|
+
- After the build step, run `python3 scripts/validate_framework.py`. If scripts changed, run `python3 -m unittest tests/test_framework_tools.py`.
|
|
47
|
+
|
|
48
|
+
## Audit Flow
|
|
49
|
+
|
|
50
|
+
- `implementer`: execution agent, allowed to write, never allowed to weaken rules.
|
|
51
|
+
- `tdd-warden`: verifies there was a real RED phase and that tests prove behavior.
|
|
52
|
+
- `bypass-auditor`: hunts bypasses, fake narrowing, config weakening, helper noise, and non-probative mocks.
|
|
53
|
+
- `pr-gatekeeper`: final verdict, does not rewrite code.
|
|
54
|
+
|
|
55
|
+
## Output Expectations
|
|
56
|
+
|
|
57
|
+
- Implementation output should state what behavior is covered, what tests were run, and what remains blocked.
|
|
58
|
+
- Audit output should list concrete findings with file evidence and required correction.
|
|
59
|
+
- Gate output should end with `APPROVED` or `REJECTED`.
|
|
60
|
+
|
|
61
|
+
## Repository Layout
|
|
62
|
+
|
|
63
|
+
- [system-layout]({{system_layout_path}})
|
|
64
|
+
|
|
65
|
+
## Tool-Specific Notes
|
|
66
|
+
|
|
67
|
+
- Claude Code should enter through `{{claude_entrypoint_label}}` and `{{claude_rules_root}}`.
|
|
68
|
+
- Codex should enter through this file and use `{{codex_skills_root}}` plus `{{codex_agents_root}}`.
|
|
69
|
+
- OpenCode should enter through this file and load extra instructions from `{{opencode_config_path}}`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-quality-police",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Strict governance framework for coding agents that blocks testing and typing bypasses.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
".opencode",
|
|
36
36
|
".claude-plugin",
|
|
37
37
|
".codex-plugin",
|
|
38
|
+
"framework",
|
|
38
39
|
"bin",
|
|
39
40
|
"lib",
|
|
40
41
|
"README.md",
|