agent-rules-kit 0.2.1__py3-none-any.whl
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.
- agent_rules_kit/__init__.py +3 -0
- agent_rules_kit/cli.py +345 -0
- agent_rules_kit/discovery.py +109 -0
- agent_rules_kit/findings.py +85 -0
- agent_rules_kit/governance.py +608 -0
- agent_rules_kit/init_plan.py +73 -0
- agent_rules_kit/init_write.py +143 -0
- agent_rules_kit/redaction.py +78 -0
- agent_rules_kit-0.2.1.dist-info/METADATA +613 -0
- agent_rules_kit-0.2.1.dist-info/RECORD +13 -0
- agent_rules_kit-0.2.1.dist-info/WHEEL +4 -0
- agent_rules_kit-0.2.1.dist-info/entry_points.txt +2 -0
- agent_rules_kit-0.2.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-rules-kit
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Local read-only CLI to diagnose AGENTS.md, Claude Code, Gemini CLI, Cursor and Copilot instruction files.
|
|
5
|
+
Project-URL: Repository, https://github.com/CoderDeltaLAN/agent-rules-kit
|
|
6
|
+
Project-URL: Issues, https://github.com/CoderDeltaLAN/agent-rules-kit/issues
|
|
7
|
+
Project-URL: Changelog, https://github.com/CoderDeltaLAN/agent-rules-kit/blob/main/CHANGELOG.md
|
|
8
|
+
Project-URL: Security, https://github.com/CoderDeltaLAN/agent-rules-kit/security/policy
|
|
9
|
+
Project-URL: Release, https://github.com/CoderDeltaLAN/agent-rules-kit/releases/tag/v0.2.1
|
|
10
|
+
Author: CoderDeltaLAN
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: agent-instructions,agents-md,ai-agents,claude-code,cli,code-quality,cursor,developer-tools,gemini-cli,github-copilot,linting,local-first,python,read-only,repository-diagnostics
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: ruff<1,>=0.8; extra == 'dev'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
<a id="readme-top"></a>
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<img
|
|
30
|
+
width="100%"
|
|
31
|
+
src="https://capsule-render.vercel.app/api?type=waving&height=220§ion=header&color=0:000000,42:111827,72:d4af37,100:000000&text=agent-rules-kit&fontColor=ffffff&fontSize=50&fontAlign=50&fontAlignY=38&desc=Local%20CLI%20%C2%B7%20AI%20agent%20instruction%20diagnostics%20%C2%B7%20read-only%20by%20default&descAlign=50&descAlignY=62&animation=twinkling"
|
|
32
|
+
alt="agent-rules-kit banner"
|
|
33
|
+
/>
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<h1 align="center">agent-rules-kit</h1>
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<strong>Local read-only Python CLI for diagnosing AGENTS.md, CLAUDE.md, GEMINI.md, Cursor rules, GitHub Copilot instructions, and other AI agent instruction files in repositories.</strong>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p align="center">
|
|
43
|
+
<a href="https://github.com/CoderDeltaLAN/agent-rules-kit/actions/workflows/ci.yml">
|
|
44
|
+
<img alt="CI" src="https://github.com/CoderDeltaLAN/agent-rules-kit/actions/workflows/ci.yml/badge.svg?branch=main&label=CI" />
|
|
45
|
+
</a>
|
|
46
|
+
<img alt="Python 3.12" src="https://img.shields.io/badge/Python-3.12-111827?logo=python&logoColor=white" />
|
|
47
|
+
<img alt="Local CLI" src="https://img.shields.io/badge/Runtime-local%20CLI-d4af37" />
|
|
48
|
+
<img alt="Read-only by default" src="https://img.shields.io/badge/Default-read--only-0f766e" />
|
|
49
|
+
<img alt="No LLM" src="https://img.shields.io/badge/LLM-none-5a0f0f" />
|
|
50
|
+
<img alt="No network" src="https://img.shields.io/badge/Network-none-111827" />
|
|
51
|
+
<img alt="License MIT" src="https://img.shields.io/badge/License-MIT-d4af37" />
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<a href="https://www.paypal.com/donate/?hosted_button_id=YVENCBNCZWVPW">
|
|
56
|
+
<img alt="Support with PayPal" src="https://img.shields.io/badge/Support-PayPal-003087?style=for-the-badge&logo=paypal&logoColor=white&labelColor=050505" />
|
|
57
|
+
</a>
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
<p align="center">
|
|
61
|
+
<a href="#screenshots">Screenshots</a>
|
|
62
|
+
·
|
|
63
|
+
<a href="#overview">Overview</a>
|
|
64
|
+
·
|
|
65
|
+
<a href="#installation">Installation</a>
|
|
66
|
+
·
|
|
67
|
+
<a href="#release-and-pypi-publishing">Release and PyPI</a>
|
|
68
|
+
·
|
|
69
|
+
<a href="#commands">Commands</a>
|
|
70
|
+
·
|
|
71
|
+
<a href="#governance-findings">Governance Findings</a>
|
|
72
|
+
·
|
|
73
|
+
<a href="#safety-boundary">Safety Boundary</a>
|
|
74
|
+
·
|
|
75
|
+
<a href="#quality-gates">Quality Gates</a>
|
|
76
|
+
·
|
|
77
|
+
<a href="#development-status">Development Status</a>
|
|
78
|
+
·
|
|
79
|
+
<a href="#maintainer-workflow">Maintainer Workflow</a>
|
|
80
|
+
·
|
|
81
|
+
<a href="#support">Support</a>
|
|
82
|
+
</p>
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Screenshots
|
|
87
|
+
|
|
88
|
+
### Help and repository check
|
|
89
|
+
|
|
90
|
+
<p align="center">
|
|
91
|
+
<img
|
|
92
|
+
src="docs/screenshots/readme/agent-rules-kit-help-check.png"
|
|
93
|
+
alt="Terminal screenshot showing agent-rules-kit help output and a repository check detecting AGENTS.md"
|
|
94
|
+
width="100%"
|
|
95
|
+
/>
|
|
96
|
+
</p>
|
|
97
|
+
|
|
98
|
+
### JSON and Markdown output formats
|
|
99
|
+
|
|
100
|
+
<p align="center">
|
|
101
|
+
<img
|
|
102
|
+
src="docs/screenshots/readme/agent-rules-kit-output-formats.png"
|
|
103
|
+
alt="Terminal screenshot showing agent-rules-kit check output in JSON and Markdown formats"
|
|
104
|
+
width="100%"
|
|
105
|
+
/>
|
|
106
|
+
</p>
|
|
107
|
+
|
|
108
|
+
### Governance findings and structured evidence
|
|
109
|
+
|
|
110
|
+
<p align="center">
|
|
111
|
+
<img
|
|
112
|
+
src="docs/screenshots/readme/agent-rules-kit-governance-findings.png"
|
|
113
|
+
alt="Terminal screenshot showing agent-rules-kit governance findings and structured JSON evidence"
|
|
114
|
+
width="100%"
|
|
115
|
+
/>
|
|
116
|
+
</p>
|
|
117
|
+
|
|
118
|
+
### Explicit init behavior
|
|
119
|
+
|
|
120
|
+
<p align="center">
|
|
121
|
+
<img
|
|
122
|
+
src="docs/screenshots/readme/agent-rules-kit-init-safety.png"
|
|
123
|
+
alt="Terminal screenshot showing init dry-run, explicit write, and backup behavior"
|
|
124
|
+
width="100%"
|
|
125
|
+
/>
|
|
126
|
+
</p>
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Overview
|
|
131
|
+
|
|
132
|
+
`agent-rules-kit` is a local, read-only diagnostic CLI for repositories that use AI coding agents or assistant-specific instruction files.
|
|
133
|
+
|
|
134
|
+
It helps developers inspect `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, Cursor rules, GitHub Copilot instructions, and GitHub instruction files without network calls, LLM calls, or repository command execution.
|
|
135
|
+
|
|
136
|
+
It focuses on files such as:
|
|
137
|
+
|
|
138
|
+
- `AGENTS.md`
|
|
139
|
+
- `CLAUDE.md`
|
|
140
|
+
- `.claude/CLAUDE.md`
|
|
141
|
+
- `GEMINI.md`
|
|
142
|
+
- `.cursor/rules/*.mdc`
|
|
143
|
+
- `.github/copilot-instructions.md`
|
|
144
|
+
- `.github/instructions/*`
|
|
145
|
+
|
|
146
|
+
The project is positioned as a doctor/lint tool for agent instruction files.
|
|
147
|
+
|
|
148
|
+
It is not:
|
|
149
|
+
|
|
150
|
+
- a universal instruction generator;
|
|
151
|
+
- a security scanner;
|
|
152
|
+
- an LLM agent;
|
|
153
|
+
- a repository automation bot;
|
|
154
|
+
- a CI/CD security auditor;
|
|
155
|
+
- a dependency vulnerability scanner.
|
|
156
|
+
|
|
157
|
+
The default behavior is read-only.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## What This Project Does
|
|
162
|
+
|
|
163
|
+
Current `main` prepares the `v0.2.1` patch release and PyPI publication path after the published `v0.2.0` baseline and post-release fixes.
|
|
164
|
+
|
|
165
|
+
The implemented behavior includes:
|
|
166
|
+
|
|
167
|
+
- discovers supported AI agent instruction files;
|
|
168
|
+
- reports repository-relative paths;
|
|
169
|
+
- supports console, JSON, and Markdown output;
|
|
170
|
+
- provides `init --dry-run` for planning baseline instruction files;
|
|
171
|
+
- provides explicit `init --write` behavior for creating or replacing root `AGENTS.md`;
|
|
172
|
+
- backs up existing root `AGENTS.md` before replacement;
|
|
173
|
+
- redacts supported secret-like values in supported output, including finding messages, paths, and evidence payloads;
|
|
174
|
+
- avoids network calls;
|
|
175
|
+
- avoids LLM calls;
|
|
176
|
+
- avoids executing commands from analyzed repositories.
|
|
177
|
+
|
|
178
|
+
Governance diagnostics were introduced in `v0.2.0` and have received post-release fixes on `main`.
|
|
179
|
+
|
|
180
|
+
These diagnostics are heuristic findings for instruction-file governance. They are meant to flag review-worthy instruction patterns, not to prove that a repository is safe.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Governance Findings
|
|
185
|
+
|
|
186
|
+
Current `main` evaluates the following governance finding rules, in stable evaluation order:
|
|
187
|
+
|
|
188
|
+
| Rule | Severity | Purpose |
|
|
189
|
+
| --- | --- | --- |
|
|
190
|
+
| `AIRK-SYS001` | `warning` | Flags supported instruction files that cannot be analyzed as UTF-8. |
|
|
191
|
+
| `AIRK-SYS002` | `warning` | Flags supported instruction file paths that are symlinks and are not analyzed. |
|
|
192
|
+
| `AIRK-GOV006` | `warning` | Flags unsupported security, production-readiness, or maturity claims. |
|
|
193
|
+
| `AIRK-GOV003` | `warning` | Flags guidance that appears to bypass review, CI, PRs, or safe integration. |
|
|
194
|
+
| `AIRK-GOV004` | `warning` | Flags unsafe command execution guidance without an explicit confirmation boundary. |
|
|
195
|
+
| `AIRK-GOV005` | `warning` | Flags runtime network, LLM, or external API dependency guidance that conflicts with local-first boundaries. |
|
|
196
|
+
| `AIRK-GOV002` | `warning` | Flags missing secret-handling boundaries. |
|
|
197
|
+
| `AIRK-GOV001` | `warning` | Flags missing instruction scope or authority. |
|
|
198
|
+
|
|
199
|
+
Governance findings are intentionally conservative and pattern-based. They may produce false positives or false negatives, and they are not a substitute for maintainer review.
|
|
200
|
+
|
|
201
|
+
The `v0.2.0` GitHub Release introduced this governance rule set. Current `main` may include unreleased fixes and coverage improvements after that tag.
|
|
202
|
+
|
|
203
|
+
For detailed rule purpose, evidence, limits, and false-positive notes, see `docs/RULES.md`.
|
|
204
|
+
|
|
205
|
+
For CLI output examples in console, JSON, and Markdown formats, see `docs/OUTPUTS.md`.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## What This Project Does Not Do
|
|
210
|
+
|
|
211
|
+
`agent-rules-kit` does not claim to make a repository secure.
|
|
212
|
+
|
|
213
|
+
It does not:
|
|
214
|
+
|
|
215
|
+
- prove that a repository is safe;
|
|
216
|
+
- scan dependencies for vulnerabilities;
|
|
217
|
+
- execute repository commands;
|
|
218
|
+
- inspect private infrastructure;
|
|
219
|
+
- call external APIs;
|
|
220
|
+
- call an LLM;
|
|
221
|
+
- modify files during `check`;
|
|
222
|
+
- modify files during `init --dry-run`;
|
|
223
|
+
- provide complete secret scanning;
|
|
224
|
+
- replace human review.
|
|
225
|
+
|
|
226
|
+
A clean report means only that the implemented checks did not find a supported issue. It is not proof of safety, completeness, or production readiness.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Installation
|
|
231
|
+
|
|
232
|
+
`v0.2.1` is the next GitHub Release and PyPI publication line being prepared from current `main`.
|
|
233
|
+
|
|
234
|
+
Release publication is configured to use PyPI Trusted Publishing from the GitHub Release workflow. The package must not be treated as available from PyPI until the `v0.2.1` GitHub Release has been published and the PyPI publish workflow has completed successfully.
|
|
235
|
+
|
|
236
|
+
### Normal CLI use
|
|
237
|
+
|
|
238
|
+
Requirements for using a published CLI release:
|
|
239
|
+
|
|
240
|
+
- Python 3.12 or newer;
|
|
241
|
+
- a Python virtual environment;
|
|
242
|
+
- a published PyPI release of `agent-rules-kit`.
|
|
243
|
+
|
|
244
|
+
After `v0.2.1` is published to PyPI, install it in a virtual environment:
|
|
245
|
+
|
|
246
|
+
python -m venv .venv
|
|
247
|
+
.venv/bin/python -m pip install agent-rules-kit==0.2.1
|
|
248
|
+
.venv/bin/agent-rules-kit --version
|
|
249
|
+
.venv/bin/agent-rules-kit check /path/to/repository --format console
|
|
250
|
+
|
|
251
|
+
Normal CLI use does not require Ruff or any development dependency.
|
|
252
|
+
|
|
253
|
+
### Development from source
|
|
254
|
+
|
|
255
|
+
Requirements for working on the repository and running local checks:
|
|
256
|
+
|
|
257
|
+
- Python 3.12 or newer;
|
|
258
|
+
- a Python virtual environment;
|
|
259
|
+
- editable install with development dependencies.
|
|
260
|
+
|
|
261
|
+
Set up a local development environment from the source tree:
|
|
262
|
+
|
|
263
|
+
python -m venv .venv
|
|
264
|
+
.venv/bin/python -m pip install -e '.[dev]'
|
|
265
|
+
PATH="$PWD/.venv/bin:$PATH" ./scripts/check.sh
|
|
266
|
+
|
|
267
|
+
The development dependency group installs tools used by local checks, including Ruff. Installing only a system `ruff` binary is not enough for `./scripts/check.sh` if the active Python cannot import the `ruff` module.
|
|
268
|
+
|
|
269
|
+
The source tree can also be used directly for quick CLI inspection:
|
|
270
|
+
|
|
271
|
+
PYTHONPATH=src python -m agent_rules_kit.cli --help
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Release and PyPI Publishing
|
|
276
|
+
|
|
277
|
+
The `v0.2.1` release path is prepared to publish through PyPI Trusted Publishing.
|
|
278
|
+
|
|
279
|
+
Release publishing is handled by:
|
|
280
|
+
|
|
281
|
+
.github/workflows/publish-pypi.yml
|
|
282
|
+
|
|
283
|
+
The workflow is intentionally limited:
|
|
284
|
+
|
|
285
|
+
- it runs only when a GitHub Release is published;
|
|
286
|
+
- it builds distributions in a separate build job;
|
|
287
|
+
- it runs local checks before building distributions;
|
|
288
|
+
- it verifies distributions with Twine before publishing;
|
|
289
|
+
- it smoke-tests the wheel before publishing;
|
|
290
|
+
- it uploads the built distributions as a short-lived workflow artifact;
|
|
291
|
+
- it publishes through the `pypi` GitHub environment;
|
|
292
|
+
- it grants `id-token: write` only to the publish job;
|
|
293
|
+
- it does not use a static PyPI token, username, or password.
|
|
294
|
+
|
|
295
|
+
Do not treat `agent-rules-kit==0.2.1` as available from PyPI until:
|
|
296
|
+
|
|
297
|
+
- the `v0.2.1` GitHub Release is published from the verified release SHA;
|
|
298
|
+
- the PyPI publish workflow completes successfully;
|
|
299
|
+
- a clean virtual environment can install and run `agent-rules-kit==0.2.1` from PyPI.
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Commands
|
|
304
|
+
|
|
305
|
+
### Check a repository
|
|
306
|
+
|
|
307
|
+
Installed CLI usage:
|
|
308
|
+
|
|
309
|
+
.venv/bin/agent-rules-kit check /path/to/repository --format console
|
|
310
|
+
|
|
311
|
+
Source-tree development usage:
|
|
312
|
+
|
|
313
|
+
PYTHONPATH=src python -m agent_rules_kit.cli check tests/fixtures/repositories/single-agent
|
|
314
|
+
|
|
315
|
+
Example console output:
|
|
316
|
+
|
|
317
|
+
agent-rules-kit check: tests/fixtures/repositories/single-agent
|
|
318
|
+
Found 1 supported instruction file(s):
|
|
319
|
+
- AGENTS.md [agents]
|
|
320
|
+
|
|
321
|
+
### JSON output
|
|
322
|
+
|
|
323
|
+
Installed CLI usage:
|
|
324
|
+
|
|
325
|
+
.venv/bin/agent-rules-kit check /path/to/repository --format json
|
|
326
|
+
|
|
327
|
+
Source-tree development usage:
|
|
328
|
+
|
|
329
|
+
PYTHONPATH=src python -m agent_rules_kit.cli check tests/fixtures/repositories/single-agent --format json
|
|
330
|
+
|
|
331
|
+
### Markdown output
|
|
332
|
+
|
|
333
|
+
Installed CLI usage:
|
|
334
|
+
|
|
335
|
+
.venv/bin/agent-rules-kit check /path/to/repository --format markdown
|
|
336
|
+
|
|
337
|
+
Source-tree development usage:
|
|
338
|
+
|
|
339
|
+
PYTHONPATH=src python -m agent_rules_kit.cli check tests/fixtures/repositories/single-agent --format markdown
|
|
340
|
+
|
|
341
|
+
### Init dry-run
|
|
342
|
+
|
|
343
|
+
`init --dry-run` shows what would happen without writing files:
|
|
344
|
+
|
|
345
|
+
PYTHONPATH=src python -m agent_rules_kit.cli init /path/to/repo --dry-run
|
|
346
|
+
|
|
347
|
+
Example behavior:
|
|
348
|
+
|
|
349
|
+
Mode: dry-run
|
|
350
|
+
No files will be modified.
|
|
351
|
+
Planned file actions:
|
|
352
|
+
- AGENTS.md [create] - baseline agent instruction file would be created
|
|
353
|
+
|
|
354
|
+
### Init write
|
|
355
|
+
|
|
356
|
+
`init --write` must be requested explicitly:
|
|
357
|
+
|
|
358
|
+
PYTHONPATH=src python -m agent_rules_kit.cli init /path/to/repo --write
|
|
359
|
+
|
|
360
|
+
If root `AGENTS.md` already exists, it is backed up before replacement:
|
|
361
|
+
|
|
362
|
+
AGENTS.md.agent-rules-kit.bak
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Output Formats
|
|
367
|
+
|
|
368
|
+
Supported `check` formats:
|
|
369
|
+
|
|
370
|
+
| Format | Purpose |
|
|
371
|
+
| --- | --- |
|
|
372
|
+
| `console` | Human-readable terminal output |
|
|
373
|
+
| `json` | Machine-readable output |
|
|
374
|
+
| `markdown` | Markdown report output |
|
|
375
|
+
|
|
376
|
+
The output format is selected with:
|
|
377
|
+
|
|
378
|
+
--format console
|
|
379
|
+
--format json
|
|
380
|
+
--format markdown
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Safety Boundary
|
|
385
|
+
|
|
386
|
+
The runtime boundary is intentionally narrow.
|
|
387
|
+
|
|
388
|
+
The project must preserve these rules:
|
|
389
|
+
|
|
390
|
+
- read-only by default;
|
|
391
|
+
- no network access in runtime behavior;
|
|
392
|
+
- no LLM dependency in runtime behavior;
|
|
393
|
+
- no execution of commands from analyzed repositories;
|
|
394
|
+
- no unsupported security guarantees;
|
|
395
|
+
- secret-like values must be redacted;
|
|
396
|
+
- write behavior must require explicit user intent;
|
|
397
|
+
- generated or overwritten files must be handled conservatively.
|
|
398
|
+
|
|
399
|
+
Security-sensitive changes must be isolated in their own phase and covered by tests.
|
|
400
|
+
|
|
401
|
+
See:
|
|
402
|
+
|
|
403
|
+
- `SECURITY.md`
|
|
404
|
+
- `docs/THREAT-MODEL.md`
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Repository Layout
|
|
409
|
+
|
|
410
|
+
.
|
|
411
|
+
├── .github/
|
|
412
|
+
│ ├── ISSUE_TEMPLATE/
|
|
413
|
+
│ ├── pull_request_template.md
|
|
414
|
+
│ └── workflows/
|
|
415
|
+
│ ├── ci.yml
|
|
416
|
+
│ └── publish-pypi.yml
|
|
417
|
+
├── docs/
|
|
418
|
+
│ ├── BUILD-PLAN.md
|
|
419
|
+
│ ├── OUTPUTS.md
|
|
420
|
+
│ ├── PRODUCT-STRATEGY.md
|
|
421
|
+
│ ├── RULES.md
|
|
422
|
+
│ ├── THREAT-MODEL.md
|
|
423
|
+
│ ├── V0.2-GOVERNANCE-RULES-SPEC.md
|
|
424
|
+
│ └── screenshots/
|
|
425
|
+
│ └── readme/
|
|
426
|
+
│ ├── agent-rules-kit-governance-findings.png
|
|
427
|
+
│ ├── agent-rules-kit-help-check.png
|
|
428
|
+
│ ├── agent-rules-kit-init-safety.png
|
|
429
|
+
│ └── agent-rules-kit-output-formats.png
|
|
430
|
+
├── scripts/
|
|
431
|
+
│ └── check.sh
|
|
432
|
+
├── src/
|
|
433
|
+
│ └── agent_rules_kit/
|
|
434
|
+
│ ├── __init__.py
|
|
435
|
+
│ ├── cli.py
|
|
436
|
+
│ ├── discovery.py
|
|
437
|
+
│ ├── findings.py
|
|
438
|
+
│ ├── governance.py
|
|
439
|
+
│ ├── init_plan.py
|
|
440
|
+
│ ├── init_write.py
|
|
441
|
+
│ └── redaction.py
|
|
442
|
+
├── tests/
|
|
443
|
+
├── AGENTS.md
|
|
444
|
+
├── CHANGELOG.md
|
|
445
|
+
├── CONTRIBUTING.md
|
|
446
|
+
├── LICENSE
|
|
447
|
+
├── README.md
|
|
448
|
+
├── SECURITY.md
|
|
449
|
+
├── SUPPORT.md
|
|
450
|
+
└── pyproject.toml
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Quality Gates
|
|
455
|
+
|
|
456
|
+
Local verification is handled by:
|
|
457
|
+
|
|
458
|
+
PATH="$PWD/.venv/bin:$PATH" ./scripts/check.sh
|
|
459
|
+
|
|
460
|
+
Run this after installing development dependencies with:
|
|
461
|
+
|
|
462
|
+
.venv/bin/python -m pip install -e '.[dev]'
|
|
463
|
+
|
|
464
|
+
The local check suite verifies:
|
|
465
|
+
|
|
466
|
+
- Python syntax;
|
|
467
|
+
- unit tests;
|
|
468
|
+
- Ruff lint checks;
|
|
469
|
+
- UTF-8 text files;
|
|
470
|
+
- LF line endings;
|
|
471
|
+
- final newline;
|
|
472
|
+
- no trailing whitespace;
|
|
473
|
+
- Git whitespace checks.
|
|
474
|
+
|
|
475
|
+
Current verified local result on `main`:
|
|
476
|
+
|
|
477
|
+
./scripts/check.sh passes
|
|
478
|
+
|
|
479
|
+
The exact unit test count may change as coverage evolves. The source of truth is the current `./scripts/check.sh` output and the matching GitHub Actions run for `main`.
|
|
480
|
+
|
|
481
|
+
CI installs project development dependencies and then runs the same local check script through GitHub Actions.
|
|
482
|
+
|
|
483
|
+
The required status check for `main` is:
|
|
484
|
+
|
|
485
|
+
local-checks / Python 3.12
|
|
486
|
+
|
|
487
|
+
---
|
|
488
|
+
|
|
489
|
+
## Development Status
|
|
490
|
+
|
|
491
|
+
Current status:
|
|
492
|
+
|
|
493
|
+
- `v0.2.0` is published as a GitHub Release;
|
|
494
|
+
- `main` is preparing the `v0.2.1` patch release and PyPI publication path from post-`v0.2.0` fixes;
|
|
495
|
+
- no stable support or API guarantee yet;
|
|
496
|
+
- release tag `v0.2.0` points to the verified release SHA;
|
|
497
|
+
- local CLI behavior implemented;
|
|
498
|
+
- governance diagnostics, structured finding evidence, and evidence redaction are implemented;
|
|
499
|
+
- CI active;
|
|
500
|
+
- branch protection is active with the required `local-checks / Python 3.12` status check;
|
|
501
|
+
- the `pypi` GitHub environment exists for the release publishing workflow;
|
|
502
|
+
- `.github/workflows/publish-pypi.yml` is prepared to publish `v0.2.1` through PyPI Trusted Publishing when the GitHub Release is published;
|
|
503
|
+
- README screenshots are generated from real local CLI commands;
|
|
504
|
+
- security boundaries documented;
|
|
505
|
+
- threat model documented.
|
|
506
|
+
|
|
507
|
+
Before publishing `v0.2.1`, verify:
|
|
508
|
+
|
|
509
|
+
- all intended unreleased fixes for the patch release are merged into `main`;
|
|
510
|
+
- no known release-blocking audit finding remains open;
|
|
511
|
+
- local checks pass from a development virtual environment;
|
|
512
|
+
- CI passes for the release SHA;
|
|
513
|
+
- sdist and wheel build and install from clean temporary environments;
|
|
514
|
+
- PyPI Trusted Publishing workflow is configured for the expected PyPI project, repository, workflow file, and `pypi` environment;
|
|
515
|
+
- the GitHub Release publication triggers the PyPI publish workflow successfully through the `pypi` environment;
|
|
516
|
+
- the published PyPI package installs and runs from a clean virtual environment;
|
|
517
|
+
- output examples and screenshots are generated from real commands;
|
|
518
|
+
- README documents normal CLI use, source-tree development use, virtual environment setup, development dependencies, and local checks;
|
|
519
|
+
- README does not claim unsupported maturity;
|
|
520
|
+
- SECURITY.md and CHANGELOG.md are current;
|
|
521
|
+
- private vulnerability reporting is enabled or its absence is clearly documented;
|
|
522
|
+
- tag and GitHub Release point to the verified release SHA;
|
|
523
|
+
- no real secrets or private data are present.
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
## Maintainer Workflow
|
|
528
|
+
|
|
529
|
+
This repository follows a strict Always-Green workflow.
|
|
530
|
+
|
|
531
|
+
Required discipline:
|
|
532
|
+
|
|
533
|
+
- never work directly on `main` after Genesis;
|
|
534
|
+
- start each phase from clean, synchronized `main`;
|
|
535
|
+
- create one branch per logical phase;
|
|
536
|
+
- read real files before editing;
|
|
537
|
+
- make minimal changes;
|
|
538
|
+
- avoid `git add .`;
|
|
539
|
+
- stage only expected files;
|
|
540
|
+
- inspect staged diff before commit;
|
|
541
|
+
- run local checks before push;
|
|
542
|
+
- verify remote branch SHA after push;
|
|
543
|
+
- open PR;
|
|
544
|
+
- verify PR state, diff, and CI;
|
|
545
|
+
- merge only after green checks;
|
|
546
|
+
- use exact head SHA for merge;
|
|
547
|
+
- verify `main` after merge;
|
|
548
|
+
- verify CI on `main`;
|
|
549
|
+
- delete local and remote phase branches.
|
|
550
|
+
|
|
551
|
+
A phase is complete only when:
|
|
552
|
+
|
|
553
|
+
main is clean
|
|
554
|
+
origin/main is synchronized
|
|
555
|
+
local checks pass
|
|
556
|
+
CI is green
|
|
557
|
+
the PR is merged
|
|
558
|
+
phase branches are deleted
|
|
559
|
+
|
|
560
|
+
---
|
|
561
|
+
|
|
562
|
+
## Contributing
|
|
563
|
+
|
|
564
|
+
See `CONTRIBUTING.md`.
|
|
565
|
+
|
|
566
|
+
Any contribution must preserve the safety boundary documented in `AGENTS.md`, `SECURITY.md`, and `docs/THREAT-MODEL.md`.
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
## Support
|
|
571
|
+
|
|
572
|
+
If this project helps you, you can support CDLAN public work here:
|
|
573
|
+
|
|
574
|
+
<p align="center">
|
|
575
|
+
<a href="https://www.paypal.com/donate/?hosted_button_id=YVENCBNCZWVPW">
|
|
576
|
+
<img
|
|
577
|
+
alt="Support with PayPal"
|
|
578
|
+
src="https://img.shields.io/badge/Support%20CDLAN-PayPal-003087?style=for-the-badge&logo=paypal&logoColor=white&labelColor=050505"
|
|
579
|
+
/>
|
|
580
|
+
</a>
|
|
581
|
+
</p>
|
|
582
|
+
|
|
583
|
+
Support is optional. It does not change the license, support policy, or project boundaries.
|
|
584
|
+
|
|
585
|
+
---
|
|
586
|
+
|
|
587
|
+
## License
|
|
588
|
+
|
|
589
|
+
MIT.
|
|
590
|
+
|
|
591
|
+
See `LICENSE`.
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
## Scope Disclaimer
|
|
596
|
+
|
|
597
|
+
`agent-rules-kit` is a focused diagnostic tool for AI agent instruction files.
|
|
598
|
+
|
|
599
|
+
It is not a security product, not a general repository auditor, not a secret scanner, not an autonomous fixer, and not a replacement for maintainer review.
|
|
600
|
+
|
|
601
|
+
---
|
|
602
|
+
|
|
603
|
+
<p align="center">
|
|
604
|
+
<strong>CDLAN · Less noise. More system.</strong>
|
|
605
|
+
</p>
|
|
606
|
+
|
|
607
|
+
<p align="center">
|
|
608
|
+
<img
|
|
609
|
+
width="100%"
|
|
610
|
+
src="https://capsule-render.vercel.app/api?type=waving&height=160§ion=footer&color=0:000000,55:d4af37,100:111827&animation=twinkling"
|
|
611
|
+
alt="agent-rules-kit footer wave"
|
|
612
|
+
/>
|
|
613
|
+
</p>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
agent_rules_kit/__init__.py,sha256=QOuxSSwVx70L5ZkBjbKy2eror77owZls_nMGGl0Yy_8,54
|
|
2
|
+
agent_rules_kit/cli.py,sha256=KLil6Hox62RhuvO8AQj4mocdTUXpbpxSQQSKu74adZg,10765
|
|
3
|
+
agent_rules_kit/discovery.py,sha256=_45HxCBw7A6fkI24diqUpwtOqyUyw5i6kUQvOFfV7_4,3555
|
|
4
|
+
agent_rules_kit/findings.py,sha256=czTHsuEiCYzDg4DGnxq7snwAc4kpUm1okrs-j6SQBT8,2714
|
|
5
|
+
agent_rules_kit/governance.py,sha256=59W3wPl6uKSAu_7pX-it984wjwTI52SvVq7FOhpAB7A,21267
|
|
6
|
+
agent_rules_kit/init_plan.py,sha256=lr_ExKhQOWycbqd2TTBXcJvwyrXyzvdEefTKVtQddEA,1774
|
|
7
|
+
agent_rules_kit/init_write.py,sha256=1I0NGLY97wt87ygWb6ADQGE4HRypVpumlUS6DMPiXjo,4266
|
|
8
|
+
agent_rules_kit/redaction.py,sha256=HYvMts7d8FMJF6mXW3P8LKH-tTLmUO7nxSxayYrihqQ,1941
|
|
9
|
+
agent_rules_kit-0.2.1.dist-info/METADATA,sha256=gYpHj0Hr3VfuzfAJk7Q65_jN8VIzbPdUevpZtU_xRCM,20188
|
|
10
|
+
agent_rules_kit-0.2.1.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
11
|
+
agent_rules_kit-0.2.1.dist-info/entry_points.txt,sha256=GyZSGUJ0IETVcg4lZla0Df2fo785BFE1nP9loTsizGQ,61
|
|
12
|
+
agent_rules_kit-0.2.1.dist-info/licenses/LICENSE,sha256=qrYpvYYQClREsXcVve9fZcrTwqtAsArXk0-K6LrcJW0,1070
|
|
13
|
+
agent_rules_kit-0.2.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CoderDeltaLAN
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|